Aquarium automation: hardware choices

This is my first post in this forum so I hope this is the right place for my question.

My question is about component choices for my new project, the automation of my aquariums. It has been 8 years since my last “electronics project” (mecanum wheel robot and drone with Arduino).

Since then, developments in “our world” have gone fast and I have lost the latest state of affairs. I have read a lot on the Internet in recent days and have come to the next architecture.

Currently I have the following questions:

Q1
Which smart switch should I choose (power of the devices is <7 Watt)? I understand from the Internet that Shelly is “winning” from Sonoff and that that is the best choice. Is that correct?

Q2 / Q4
It is a small-scale project and I expect that an HA installation on the Raspeberry Pi will suffice and that I can also run a small database (SQLite) on it. Is that a good assumption or is it likely that I will regret it after a while and can I better install on a VM from scratch?

Q3
For the brain of the “water quality measuring system”. Should I go for the Raspberry Pi or Arduino? I assume that they both can do the job and that integration is the key consideration. Do you agree? And if yes: whitch one integrates best with HA?

1 Like

I did something similar a few years back and documented it here Aquarium monitor/controller

Q1) If you are capable of doing the wiring yourself, consider using an 8 channel relay board connected to the brains of the controller.

Q2) Pi should be fine to start with, and if you decide to get more in to HA you can move to something else later. HA has a built in DB which will log based on how you configure it so you might not need an additional DB.

Q3) Based on my experience I would go with an Arduino, however it depends on how you are going to try to get internet connectivity. There aren’t any cheap WiFi Arduinos of course you could try to use an ESP8266 or ESP32 if there will be enough pins. If you are going to be able to hardwire there are ethernet boards for Arduino but they are kinda tricky to get working.

The problem I had with originally using an Rpi was failure do to unexpected power outages causing SD card issues. If this controller isn’t working for me, my turtle could die from the cold so I tried to remove all points of failure.

I should mention that I am not monitoring any of the water quality things you are wanting to do, and I did look in to doing it, but its expensive and there didn’t seem to be a good way to monitor long term, they all seemed like quick check sensors that needed some sort of priming solution prior to inserting in the water. Would love to know if this has changed/gotten cheaper.

Good luck!

If this is just going to be for the tank, the pi has gpio that you can directly connect sensors and relays to. So no additional arduino boards needed. I agree with the idea of using a relay expansion board; you can get those with i2c input to make wiring easier. Yeah I figured the quality sensors might be pricey for something that actually works… but then again what comes on the slow boat can be surprising. I used to be big into reef tanks. So I know the complexity you may be dealing with. I’m curious what sensors/dosing pumps you come up with to automate things.

Quick Google turns up seneye… but that can only do ph and ammonia which requires ‘slides’ that only last 30days. Sucks they don’t at least have nitrate sensors.

Hi,

thanks for your responses they really helped.

The x channel relay board is new to me; I looked into it and they sounds like a great option, so I go for it. The aquariums are located in different places in our house. I therefore have to make two “tank controllers”. So I decided to go for two four channel relay boards, with I2C support. Is this a good choice? GeeekPi Raspberry Pi Expansion Board 4 Channel Relay Board Module Power Relay Module for Raspberry Pi 4B & Raspberry Pi 3 Model B+ & Raspberry Pi 3/2 Model B (No Programming Required/Programmable). Sorry - I can’t put in the link since newbies are limited to two links per post :wink:

I will be redesigning my nano aquariums soon. I am going to use a rich soil substrate with lots of nutrients, so the water values ​​will fluctuate considerably in the first weeks. Many water changes are also required during this period. I want to follow that process closely and am therefore engineering the measuring station. The measuring station will become a separate unit that I can optionally use in one or the other aquarium. The ESP32 is also new to me, and again it seems a good option, and again, I go for it!

I still have to figure out if my PH sensor is compatible with the ESP. I have seen that some models work with the ESP (https://www.youtube.com/watch?v=EqFw561pO5k), but I don’t know for sure if that also counts for mine. If not, then I have to use an Arduino (or Rpi) and come up with a solution for the connectivity with my “smart home network”.

I expect to take measurements of 2 a 4 water values: two samples per hour for let’s say two months. I have bought a sensor for the measurement of PH (E60) and temperature (E8). I still doubt if I will also buy a sensor for dissolved oxygen (E170) and conductivity (E70) mainly because those sensors are indeed expensive.

The PH sensors that I bought: https://www.dfrobot.com/product-1110.html

The amount of data is limited. I consider to initially store the data on a sdCcard of the measureStation and maybe later in the on-board database of the home assistant Rpi. Do you think that’s a good approach? End goal is to have the data available on a PC/laptop in our home network for analysis. Maybe I don’t need to use the database at all and can I retrieve the data directly off the SD-card via Blue tooth or WiFi.

Taking all this into consideration, I have adjusted my architecture as follows:

Something that I have not yet figured out is the configuration of the relay board. The idea is to do that through a scene, script or automation in HA. Do you foresee an issue there?

Everything together it becomes a real project. The bill of material so far is as follows:

  • 3 x Rpi4B @ E35 => E105
  • 2 x Relayboard @ E15 => E30
  • 1 x ESP32 => E15
  • 1 x SD card => E12
  • 1 x PH sensor kit => E60
  • 1 x temp sensor kit => E8
  • 10% @ power adpaters and other small material
  • Total +/- E250 (serious money :wink:)

The next step is to formulate a backlog for HA, the tank controller and the measuringStation (Automating, timing, measuring, configuration, output, controlling, dosing pumps, sensors etc.). And to think about the power supply of the constituent three subSystems. And to think about ……

Please let me know what you think. I am curious about your reactions, tips and suggestions.

Regards, Ko

I have been in contact with engineers or Greenponik about the compatibility of my PH probe with the ESP32 chip. They have extensive experience in this area and have published a great deal about it. My probe seems indeed to be compatible with the ESP32, but in their projects they switched to Rpi (in stead of ESP32) as the brain for several reasons and they advised me to do the same. If I relate that to my architecture, a homogeneous environment of cooperating Rpi’s remains.

I like it, so I ordered two Rpi’s and the relay boards I mentioned in my previous post. When the goods arrive I move physicaly forward with my project and in the meantime I study Rpi projects and instruction video’s at youTube. I guess that with this the hardware part of my project is concluded and that I have to move to one of the other forum categories for further QA, tips and discussion.

So Ko, did you ended up executing your project? It’s been an interesting thread so I’m curious to learn how it ended.

3 Likes

Any updates on this project? I am curious to learn how it turned out. I would like to do something similar for my aquarium.

2 Likes