ESP8266 Aquarium Controller Part 1
I recently started a new aquarium, so of course I had to add some automation to it. Since there are live plants and fish in the aquarium it has specific temperature and light requirements. The fish need a normal, regular light schedule to give them time to rest. The plants require some light to live, but too much light will encourage algae blooms. Temperature control is also important because we have tropical fish. So I need a controller to handle all of that and also future expansions (like CO2).
I already have Home Assistant automating and controlling many aspects of my house, so it’s natural to make the fish tank controller interface with it. For this project I’ve chose a NodeMCU ESP8266 with a set of relays. The ESP8266’s built in wifi will communicate with Home Assistant using MQTTT.
My goal is to have a single unit with recepticles to plug in my lights, heater, and temperature sensor. I’ll have a third outlet for a possible future expansion to a CO2 injector. Everything will be in a single work box with one plug for a power cable and an off-off switch. Total cost for the project is about $40.
For the first part, I’ll add three outlets to a standard work box. I’ll also add the power switch and an inlet plug for a standard 3 prong cable.
Parts and Tools:
Step 1: Cut out the holes for the plugs
I measured the plugs and drew the template in Microsoft Word. Nearly any program will work – you don’t need expensive design tools for this step. I used Word because it was easy to draw a box, type its dimensions, and print it.
Then I cut out and taped the templates to the box using clear packing tape.
Using a dremel, I cut out the gray squares and inserted the plugs. The power socket slid into its new slot just fine. The outlets were tricky because they are designed to go into a thinner panel. A little bit of fiddling and modifications to the clips got them to stay in securely. I added a bit of hot glue to make them more secure.
Here’s the final product! Stay tuned for the next part: Wiring the plugs!