loading

This Instructable will show you how to make a Aquarium Controller.

First of all: I'm not an engineer and I'm not a programmer. There may be errors, so please ask if there are any ambiguities. We do not want to make a fishcooker :)

I hope you have some fun und enjoy this project.

Ok, now some background: I have 4 aquariums and needed a lot of time switches for the light, because I use daylight, zwilight, nightlight or spotlight. Than I need time switches for CO2-solenoid valves (CO2-switches?) and some sockets for some heater.

A lot switches, a lot sockets, a lot of money you need. It would be much easier if an Arduino could do that all.

I thought a little: I do not want high voltage on my controller, because I'm not a professional. I want all in one and I want to see how it works. That´s all ;)

The goal: An Arduino that controls daylight (LED and Fluorescent lamps), twilight (LED), nightlight / spots (LED) by time and length and the light should not go on and out suddenly, but slowly dimmed. The Arduino should measures the temperature and switch the heater on or off. The Arduino should send radio to radio-sockets for lamps or things with high voltage. And the Arduino should give me some information about all values (temp, ph, light, sockets) on a nice and little screen and I want an motion detection sensor for switching on an nightlight if I want to look in the tank when all light scenes off (in the middle of the night e.g.) That´s not so much, right? ;)

  • You can find a flow-chart at the end. It describes the function.

Update: The project continues... see Step 10.

Software & Updates only on my next projekts - Aquarium Controller II + III + IV

Step 1: What You Will Need

- 1x Arduino UNO

- 1x RGB-Shield*

- 1x Prototype-Shield*

- 1x TFT 1.8" Display

- 1x RealTimeClock DS3231RTC

- 1x Waterproof DS18B20 temperature sensor

- 1x PH-probe and electronic (for the future)

- 1x Resistor 4k7

- 1x Radio Sender RF433MHz (only for german use?)

- some radio sockets (radio receiver?)

- 1x Ultrasonic-Sensor HC-SR04*

- 3x FETs (BUZ11)*

- 3x Resistor 1K*

- 3x Resistor 1M*

(*you can also use an RGB-shield)

- 1x Power supply 12V 5-10A

- 1x Power supply 5V (only for Arduino)

- 1x A case you like.

- wires, cables, ribbon cable

- screwing connectors

- male & female plug connectors

- some tools

You can get all parts on eBay, for example. If you want to use a different FET, please take a FET that is specially designed for TTL on Gate. (5V range)

You can use an Voltage regulator from 12V to 5V for the Arduino, but I suppose the regulator will become warm or hot, but also you should not use the 12V for the Arduino. So, a 5V power supply for the Arduino is an good idea.

Step 2: Connecting All Parts With Each Other

It looks somewhat difficult, but it's not ;)

Let´s begin. Step by Step.

First, you must decide whether you want to build with items or want to use a shield.

Let`s try it in DIY. It`s cheaper ;)

I use for my Aquarium-light LED-Strips. One in full length for twilight, with a second one together for daylight and blue-LEDs or short LED-Strip as a spotlight for simulating moonshine.

So I need one FAT (W1 = white1) for Daylight, one FAT (W2 = white2) for daylight/twilight and a third FAT (B = blue) for moonshine.

Step 3: Solder FATs

I solder 3 FATs and the 1k and 1M resistors on a circuit board.

The 1k resistor at the left Pin from BUZ11, the 1M resistor between left and right Pin from the BUZ11. Ground at the right Pin and the middle Pin is output.

You need this 3 times. But you can use max 5 FATs. Because you have 5 free PWMs (Arduino Outputs) for that.

For the LED strips and the power supply you should use screw connectors.

And for the connection between circuit board and Arduino I have used ribbon cable. With or without connectors.

Step 4: Solder RTC, RF433MHz, Temp-Sensor

Prototype-boards have cupper strips for +5V and ground in the middle and at the left and right side.

If you skillfully arrange the items, you will save wire and soldering ;)

I put the realtime-clock (with the battery on top) and the RF433MHz in a row in the middle on plug contacts. It´s easier the change them, if they are useless or damaged.

For the temp-sensor I also use plug contacts. I solder the pins on the sensor and the female header on the board near the Arduino PIN7.

I solder the ribbon cable for the FATs at the bottom. So, it is located between Prototype-board and Arduino.

See the picture above.

Step 5: Solder TFT-Screen

There are many types of TFT-Screens. Please take a look at the bottom of the board or at the connector for detailed use!

You need:

  • power supply (+5V and ground)
  • reset -> Reset
  • CS -> PIN8
  • DC -> PIN4
  • SDA -> A4
  • SCK -> A5

(on left the TFT board, on right the Arduino)

Maybe you have Pins like BL = Backlight. You will need to connect to 5V/GND.

Some TFT-Screens have an SD-slot. I don´t use it.

To connect the screen to the Arduino, I use also plug connectors and ribbon cable.

The Display will show you:

  • The name of the controller ;)
  • Temperatur from the temp-sensor
  • Time (hh:mm) / maybe in the future PH value in this line
  • Water level or maybe status food feeder (now without function)
  • Status (for now: damaged items / operating temperature)
  • Radio controlled light
  • Radio controlled heater
  • Radio controlled CO2
  • Intensity of lighting (Daylight, twilight, moonlight)

  • Graphic representation of the lighting

Step 6: Preparing Radio Sockets

There are some different types of radio sockets. Some with dip switches, some with rotary switches.

I use sockets with rotary switches to set the transmission code and my sketch (Arduino-program) provides this type of radio sockets. But it`s easy to change the code to use radio sockets with dip switches (Group and Unit).

To setup the sockets I use the first rotary wheel as a group to select the aquarium and set three sockets to 1.

And then I set the second wheels. I choose one socket for fluorescent lamps (Aquarium 1, Socket 1), one for the heater (Aquarium 1, Socket 2) and one for CO2 (Aquarium 1, Socket 3). The same for Aquarium 2 (Aquarium 2, Socket 1,...) and so on...

The order of the sockets is provided in the software and should not be changed, because the TFT-Screen is also designed by this order.

Step 7: Motion Detection

Ok, at this point, the Arduino takes control ;)

Light is time controlled and no switch could be used or is needed to light up the aquarium! Fine.

But I need some switches to light up when..., uhm... this is what I wanted to remove! :/

Lights on at daytime. Lights off at nighttime. But I want some separate control ;) Motion detection is my solution.

I think, it is a good idea to light up a small light (spot or blue-Led) as a moonlight, when I want to look in an Aquarium at night, when all lights are off.

An ultasonic sensor could detect me when I was near the tank, switch a small spotlight on and goes off after a while, but smooth not suddenly.

It´s simple, trigger the sensor, wait for echo and calculate a little. Only when the sensor detects me at a distance of 2-3 feet and it´s after 10pm, the B-FET(blue-light) lights up for 50%. Voila, moonlight ;)

Step 8: What Comes Next ;)

Arduinos memory is not full, we still have outputs. What else can we do?

I had already suggested it, I would like to have a PH control. The parts are ordered. Delivery still takes. I'll tell you later ;)

Another idea relates to an automatic feeder. Ok, you can buy a lot of feeder, but this feeder does not function properly, because the feed is too much or too little. What about feeding tablets?

Normally, you get feeder with a rolling food tank from which something falls twice a day in to the Aquarium. Ok, not the best solution, right? But it´s simple ;)

I think of something different. Do you know the old cigarette dispenser? You put money into it and then you pull out a drawer and get your box of cigarettes. Only ONE box, because the drawer is the same size that only one box fits in.

OK, you need your fish feed box and a drawer that only fits as much food as you need.

Now imagine the fish feed box as a silo and the drawer is under this silo. And imagine there is a servo that moves the drawer.

Well, the drawer is located in or under the food box and is therefore full of food. The servo pulls the drawer out, the food falls into the aquarium. As often as you want, controlled by the Arduino.

Then the servo pushes the drawer back into the feed box and this fills itself again with the feed which from above automatically falls in. And as with the cigarette dispenser, the following cigarette boxes do not block anything, this must also be at this machine. Sounds simple, hm? ;)

I have a pretty accurate idea of it, but I need to think about it. I´ll tell you later....

Yesterday, I saw Nutrient pumps. But... I'll tell you later ;)

Step 9: Code

Phew...

How can I explain or translate this?

I wrote the program in simple "Arduino-language". I have not used any difficult codes and probably you can do a lot better.

Update: I added a description of the function.

I think it's the best, you look at it and ask me if something is equivocal.

.

Step 10: Nutrient Pumps - a Consideration

I use liquid fertilizers for my aquariums.

• Daily in the morning 8ml NPK fertilizer
• 1 time a week 8ml iron fertilizer
• 1 time a week 15ml iron fertilizer
• 1 time a week 8ml N fertilizer

It would be nice if this could happen automatically ;)

On Ebay I found small pumps, which are operated with 12V (just like the LED lighting, thats fine) I bought 3 pieces ;)
For each fertilizer I have now a pump, but I need a control, which takes the dosage. The Arduino ;)
But my AquaController-Arduino does not have enough outputs. And I need some inputs for manual control, too. After the water change, for example.

Another Arduino? Yes, but an Arduino Mini Pro. Cheap and small. I bought 5 pieces for 12 € (about 12 dollars) This is enough for other projects. ;)

The Mini Pro will communicate with the Arduino Uno. I'll use I2C for that. So I can handle a lot of inputs and outputs with only a few wires.

The Uno will tell the Mini Pro when fertilization should be started. Then the Mini Pro controls the amount of fertilizer and prompts some buttons to manually add fertilizer.


That is the plan ;)

Nice addition!! isnt it a lot more efficient to use one esp8266e/f?? mine has feed and light control. 3 temp sensors and a waterlevel warning. still have 60-65% mem left!
<p>Hey,</p><p>yes, I guess you'll be right. But I wrote that I had left the parts from old projects. For me it&acute;s much cheaper, it&acute;s fun and I'm over 50 :D</p><div><div>You write some code and bind the sensors, done.<strong>That is practical, 100% ! Good job!</strong><br><p>But I wanted to know how controllers can communicate with each other. This project was the answer.</p><p>And maybe there is someone who does not want only to be efficient, but simply has the same fun at the thing. ;)</p><p>Best regards</p></div></div>
<p><a href="https://www.instructables.com/member/tsmeey/" rel="nofollow">tsmeey</a> Can you post some pics of your setup including the lights?<br>I'm just now getting into Arduino and I, too, have an aquarium that I would like to contol with Arduino.</p>
<p>If you need suggestions for good examples please visit for example <a href="http://www.just-aquascaping.de.">www.just-aquascaping.de.</a></p><p>If you want to see my controller, please look my photos.</p><p>The 1st is my little plant-tank with 5 LED strips. In the middle one little spot. (nightlight, controlled by US-sensor)</p><p>In the base cabinet on the left foreground the pump controller, in the background the light controller. On the right side CO2 bottle with pressure reducer.</p><p>The 4th photo shows the controller from my big tank with a bottle iron fertilizer on it :/</p><p>The 5th photo shows the controller from my little african tank and the last you see the tank with open lid. You see the 4 LED strips. 2 strips warm white, 2 strips cold white.</p>
<p>That's all very nice. Thanks for showing them. Also, thanks for posting the links.</p>
<p>If you need some another suggestions for good examples please visit for example <a href="http://www.einrichtungsbeispiele.de">www.einrichtungsbeispiele.de</a></p><p>And please visit my other project Aquarium controller II. On this side I post software updates.</p>
<p>Nice aquarium setup. If I had something like this I might actually be able to keep fish alive.</p>

About This Instructable

7,356views

137favorites

License:

More by tsmeey:Protect your ideas, protect your work Aquarium Controller IV - Visualize mySQL to Charts Aquarium Controller III - Logging to MySQL 
Add instructable to: