loading

With an Arduino Nano at its heart, this DIN rail mountable control box can monitor and help maintain the environment required for your fish to thrive. With sensors to monitor pH levels and temperature, and relays to control heaters, lights and pumps this little box can work to keep conditions within preset thresholds.
The device can output data and alerts via serial over the USB port or i2c giving huge options to expand the system; I have mine connected to Python webserver running on a Raspberry Pi to give a user friendly Web based interface to monitor and control the tank.
Multiple Aquariumatic V1 units can be connected to the raspberry Pi via i2c to allow Multi-Aquarium control all from the same Web interface!

Step 1: Collect Your Parts

Parts required:
DIN rail enclosure
Arduino Nano
Nano's screw terminal shield
16x2 lcd screen module
4 channel relay board
pH sensor board and probe
Temperature sensor
Solid core wire/ male/female headered wires (depending on how you want to wire everything up)
Stereo jack and socket

I will provide some links to the parts I selected for these. They can be found on EBay for dirt cheap in most cases!

Step 2: Cut the Case

Cut the holes in the enclosure for the Screen, the BNC connector for the pH sensor, the jack socket for the temperature sensor,, the potentiometer for setting screen brightness and any holes to stop the relays and Arduino USB port being obscured.

Depending on the DIN rail case you have chosen to house your components in you may need to adjust the hole locations to suit your needs.

Once I have some links to the case I've used I will draw up a template to follow.

Step 3: Mount Relays & Nano

The relay board and the Arduino nano screw terminal shield fit nicely alongside each other in the Base of the enclosure.
Once you're happy with their position use a dollop of hot glue to hold these beasties in place.

NOTE: Depending on your enclosure and it may be better to pre-wire the components before sticking them in place; it can be quite tricky to fit the wires into the screw terminals with the relay board in the way.

Step 4: Mount PH Sensor Board

With the hole for the BNC Connector cut or drilled its a case of fitting the connector through the hole and using some glue to hold into place. As with the other parts it may be best to attach your wiring to the board before placement.

Step 5: Mount LCD Screen

As with the other parts fit the screen into it's pre-cut hole and secure with an adhesive of your choice.

I am hoping to one day design a series of brackets to hold the components in place in the case without the need to glue them in.

It'll be much neater and make for a much cleaner build.

Step 6: Mount Jack for Temperature Sensor

Unscrew the jack, slot it through the hole and screw back together. Nice and easy!

Step 7: Wiring

Wiring diagram to follow!

Step 8: Programming

The code I have used is under constant development as I keep working on this project.

My code is available on my GitHub.

Once I have a stable version for this unit in it's current configuration I shall add here.

Step 9: Install and Enjoy!

Attach your freshly built and programmed unit to a DIN Rail of your choice.

I'd recommend mounting it close to your tank to make connections easy and to keep your cable runs short.

CAREFULLY wire up your power sources. When we put together our prototype we used an old PSU power supply (12v 4A) to provide 12v power to our Arduino and relays alongside the mains supply for the relays. For demo purposes we mounted some sockets to a display unit to plug our heater, pump and lights into and witred the relays to these sockets. This meant we didn't have to alter our Aquarium's devices in any way.

If you're interested in this please drop me a message - I'll gladly provide info and help where I can!

I'm also documenting further development on a new version of this device over on Hackaday.io - check it out!

Cheers

Craig

<p>Great project Craig :)</p><p>I've done something similar but not quite so elegant!</p>
Thanks mate! Is your project documented on here toor? <br>I'm very keen to get some input on this.<br><br>If you're on Hackaday feel free to join the project :-)
<p>I've not documented mine as yet as it's very simple, just a couple of 433MHz sockets to control the air pump and lighting. These are controlled from an arduino with a 433MHz transmitter connected to a PC running eventghost that switches them on.</p><p>You've given me some ideas concerning monitoring the pH and temperature though :) I'm using quite a few ESP8266 modules for things around the house so may well WiFi up the fishtank!</p><p>Thanks.</p>
I like it! Simple and does the job! Exactly what I'm trying to achieve, just without the need of a PC to do the work.<br>Next version I'm aiming to do well have a custom pcb containing the arduino nano, relay and sensor stuff, with optional sockets for a Pi Zero and an ESP8266.<br>The Zero will run a full webserver (replacing the pc in your setup) and monitor many arduino units via i2c. the ESP will be there to either act as a webserver when there's no Pi Zero (if one unit is running in standalone, for example ) or to connect and stream data to an IoT site for data tracking via that method.<br><br>That's the plan anyway :-D
<p>Oh that sounds great :)</p><p>I'm just starting out using Domoticz on and old Model A Pi that was lying around, I'm thinking of teaming that with some Sonoff WiFi mains relays (to replace the 433MHz sockets) and then add in a Dallas waterproof thermometer, the pH sensor you mentioned.<br><br>Then just set some scenes/alarms in Domoticz to automate the lot (I stole your idea for the DIN box!)</p>
Nice! I'm pretty new to the whole automation game so having fun learning from scratch in that sense. I enjoy writing in Python, so it made sense for me to use that for my automation processing. I stumbled across the Tornado module for Python, and it enables simple Webserver to be written really quite easily. mix that with the serial and i2c modules then I've got a great little script to handle user input and monitoring and communicating between devices.<br>It won't take much to be able to schedule tasks as well as react to thresholds being set. It's a work in progress but I'm not too far off!
<p>Nice, I'm a complete programming luddite, I'm trying to learn Python but haven't got very far yet, I'm more of a &quot;find an example&quot; and bend it to my will kind of coder ;) I use tasker for Android - a lot! but Eventghost is written in Python and there are things I'd like to be able to do with it which I cannot currently.</p><p>I could do away with the PC now for home automation but it runs the media centre anyway so it makes no difference if I have it on or off.</p><p>I'm running a custom MQTT program on the Sonoff wifi switches that works really well and communicated with Domoticz on the RPi.</p>
<p>I think that's the way everyone starts innit :)</p><p>That's how I learn; modify code to suit what you need accomplish, and while modifying learn how it works. I need to be working towards a goal to learn. This project, for example, was a friend's project that he was doing for college. I wanted to learn how to do the whole webserving and automation thing, so offered to help. I don't even have an aquarium at the minute ha ha!</p><p>This particular project can be slightly modded to work for any kind of monitoring and automation. I can't wait to get this made and get a fully finished product!</p>
<p>Haha yup that's the way indeed, I'm pretty pleased with how everything is working here ATM, it's a constantly evolving system so I'm always adding bits and improving things. Our little flat was all voice controlled before Amazon had even thought of Alexa LOL</p><p>It's all coming together in an integrated system now with customisations you simply can't get from stuff you buy off the shelf (also no one could easily hack my IoT devices as they don't share one single command with anything on the market LOL)</p><p>I currently have some WS2812b LEDs that sit behind my computer monitor as a nice Ambilight but they change colour when it's rubbish bin day, or flash on and off green when my phone battery is charged, flash red on an incoming call (like the Batphone).</p>
I reckon I'll be at a point of happiness once I get the pcb made ha ha.<br>Mate, you need to get your flat up on here for me to see :-P<br>I love the idea of the ambilight notifications; I was looking to adding one to my TV (controlled by an add on available through Kodi on my android box) for the more conventional ambilight stuff, but really interested in stealing an idea or two from yours!
I made this one for my TV ;)<br><br>http://www.tweaking4all.com/home-theatre/xbmc/xbmc-boblight-openelec-ws2811-ws2812/
Aaaahhhh, Boblight is one of the add ons I've been looking at! :-)

About This Instructable

3,214views

61favorites

License:

More by craighissett:Arduino Mega Expansion Board Aquariumatic v1: Arduino powered Multi-Aquarium Monitor  Raspberry Pi video player for Children 
Add instructable to: