I am a big aquarist and loved spending time creating my freshwater aquariums. My latest aquarium is a 160l planted tank which requires it’s fair share of routine maintenance. Imagine a swimming pool, just times that by ten! I have been looking into automation of my tank for a few months now and I have now invested in my first Raspberry Pi and hooked it up to Cayenne. The world is now my oyster.
The first phase will be to only turn the filters and lights on/off and monitor the tank temperature via Cayenne.
The second phase is to connect the water change system I designed and be able to do water changes via Cayenne. If you know anything about fish tanks (especially planted tanks) its all about the water changes. 50% per week! The water change system is already operational in its manual format using gate valves which connect to the tank filter and a reservoir in the other room which holds the clean water. The water is then pumped from the reservoir via the filter to the tank.
Phase three I will be implementing the dosing system, which will dose the tank with the necessary nutrients on a daily basis and doses the water reservoir with dechlorinator on a weekly basis.
For now its just the Raspberry Pi connected to an 8 channel relay.
Triggers & Alerts
I certainly will be. Triggers and Alerts will be used for interaction with a number of the components.
Temperature sensor - monitors temperature of the tank, with an altert for high and low extremes.
Flow sensor - to monitor the amount of water exchanged between water changes.
Lighting sensor - monitor any lighting fluctuations
Water level sensor - monitor water level for water changes and top ups.
Nice project. I’am also into planted tanks and hopefully going to reef tanks. In the middle of doing a similar project as well. One of my concern here would be, what if your pi/arduino becomes offline? Is there a way to hard-code a set of instructions that will be executed if the unit becomes offline? I’m not good at programming but is there a way to do something line:
“if online, then do this”
“else, do these instead”
You can always keep chatting here, but there is always the private message option too (click his name and click the message button). If you guys do end up making progress please share!
True this seems to work. I didn’t realise it keeps the whole thread.
@Noriel Instructor - you can buy a UPS hat for the pi that will last about
8 hours if there is a power failure. As far as I know Cayenne will hold the
current relay positions if connection to the software is lost. May not be
so good if one of the relays is set to fill the tank! I think we would need
to put some more thought into that.
If anyone has any suggestions. Feel free.
The build is not cheap, especially with water level sensors and then onto
ph sensors and other water chemistry. It may be cheaper to meter flow in
litres, instead of metering the water level?
I was kinda thinking of adding a code alteration… to keep the main loop code running even if there is no internet connection…
In blynk they had blynk.connected() which tells if it is connected to the net or not. Does cayenne have something like that? We can use that to do an “if” to two two separate instructions if cayenne is offline?
I don’t schedules would be enough. The aquarium controller i got does a lot more (turn on/off heaters/chillers as needed, feed fish, fade lights, turn pump on/off after feeding, water sensors etc).
I am just being paranoid, but what if my internet does not connect for a week? would schedule still work?
Since my controller is already working (cause i just downloaded the program and uploaded to my aduino cause I am THAT BAD with programming… hehe), I just need to make it pass through cayenne to enable me to control it via internet…
wow, that is nice! If all else fails, I can fall back with schedule then. By the way, my wiring and packaging is as good as my coding. The device works but it looks like a jungle of wires. Hahahaha, but you can check what it should look like:
The software i used is Jarduino, and I just purchased arduino, shield and TFT sreen, uploaded and im good to go. I just want it level up now (i’ve been using it for a year now) and make it online.
I made a simple monitor for my tank with an Arduino and a LCD…
Works fine but water level detection is giving me a hard time.
I’m trying to incorporate remote sensing at the moment…
hello there ,
i am thinking to do the same kind of project as an aquarium controler , does anyone knows if cayenne NEEDS internet or it can be autonomous on the PI ?
With the MQTT release coming up it will be possible to create a local fallback server, but as of right now you will have to have an Internet connection