This is a simple aquarium controler. It is based on Arduino and TMP36.  

The leds 2 and 3 can be replaced by PWM controled led drivers and leds 4 and 5 by optocoupler controled relays.


The code is here:


The project page is here:


Login to post a comment...

flav1972 1 year, 8 months ago

updated howto

jkuchcik 1 year, 8 months ago

Hello Flav, I added a couple of questions related to the Flow Sensor code up on your FAQ's's-from-02-23-18. Thank you again for all your help.

jkuchcik 1 year, 8 months ago

Thank you so much Flav. Just finished reviewing the FAQ's. I'm going to attempt to modify the code to check my algorithm for the flow meter and convert to Gal/Hr. Thanks again. I will keep in touch with you through Fritzing.

flav1972 1 year, 9 months ago

hello, I have created a FAQ in the Wiki on github to answer your questions. flav

jkuchcik 1 year, 9 months ago

Hello Flav, Thank you for your reply... After looking at your content on GetHub, I noticed a more robust design which incorporates a Flow Meter, Different Temp Sensor, 4 Relay Module and Power Converter. What a great design!!! I have purchased all the components and have built that circuit. It is working perfectly and in exact alignment with my Reef Tank Algae Turf Scrubber application. I will be using the temp sensor to measure the temperature within the body of the turf scrubber and I will use the flow meter to adjust the flow that is moving over the media. As of now, everything is working exactly per your design. Although, Not being an Arduino programmer (C++), by any stretch of the imagination, I am attempting to make some tweaks to the program and have some questions: 1. The Flow Meter, I purchased a DIGITEN G3/4" Water Flow Hall Sensor Switch Flow Meter Flowmeter Counter 1-60L/min (Purchased on AMAZON). The specifications are: Frequency: F=5.5 * Q (L / Min), error:2% voltage :3.5-24VDC, current cannot exceed 10mA, 330 pulses/liter, F=onstant * units of flow (L / min) * time (seconds). Flow range:1-60L/min. Maximum current:15 mA(DC 5V). I reviewed the algorithm under your “Flow” programming and I was hoping you could help me with two things: a. Ensure that the algorithm is aligned with the Flow Hall Sensor that I purchased. b. Attempt to change the unit of measure from L/H to Gal/H. 2. On the LCD Display, after the Temp Display, and between the flow there is a “0”. Example: 32.5C 0 000L/H. What does that 0 signify? 3. Through the menu structure, the 4th option is to perform a Temp Setup. A few questions on this menu area: a. What is the purpose for this area once you enter the settings? b. Is Tresh supposed to signify Threshold? c. What is Swi? 4. On the Top of the LCD, there are 6 “A’s”. I realize what the “A” signifies (i.e. Auto, On, Off, Max). I also realize that I can manually manipulate 2 of the relays and the 2 Mean Well drivers using the push buttons. What are the additional 2 “A”s represent? I assumed it was for the additional 2 relays. Is that true? And if so, can they be manually changed through the push buttons? Flav, any assistance you can provide me on these questions would greatly be appreciated. If you elect not to, I totally understand and wanted to extend my appreciation for the great work that you did here. Thanks, P.S. If there is a better way to directly communicate with you, please let me know.

flav1972 1 year, 9 months ago

hello, yes it is supposed to repeat that every day. check also the fading durration. some info is in "other" on github: the setup is stored in eeprom. when pressing button and not in menu it toggles the (light1/light2/sw1/sw2 depending on button) to Auto/Max/1 -on /0 off.

jkuchcik 1 year, 9 months ago

Hello Flav, I figured out what i did wrong with the Mean Well LDD Driver. I missed connecting it to the Adruino ground in addition to the ground from the power supply. Sketch is uploaded and working, although I noticed when programming the automatic Stop time through the menu, it will not shut down the LED's. Thoughts? one other question related to the Start/Stop/Pow configuration: Lets say I want it to start at 02:00 and Stop at 16:00 with a POW of 50. is it supposed to repeat that setting every day? Let me know.

jkuchcik 1 year, 9 months ago

Hello, This project is exactly what I was looking for. I am building a self controlled algae scrubber for my reef aquarium. I completed building the circuit as you have documented, uploaded the sketch. Everything works perfectly accept for controlling the Mean Well LDD-1000H's. I have it connected exactly how you show in the schematic. But for some reason, when provide my 12V power to the LDD driver, it automatically turns the LED's on. In other words, I cannot control the LED's from the controller. Even if I use the buttons to override to off, it will not shut the LED's down. Any assistance would be greatly appreciated. Thanks...

flav1972 1 year, 9 months ago

hi, buttons are (look at the code) #define BT_SET 1 #define BT_LEFT 2 #define BT_RIGHT 3 #define BT_UP 4 #define BT_DOWN 5 pressing left, right, up, down changes the current status of the ligths and first 1 relays. (0 = off, 1 = on, M = max) pressing set goes in menu walk in menu with up and down, et out with left and entre sub menu with right. once in a submenu change values with left right (move curson) up down (change value) save the value with set if you do not want to save the changed value wait for timeout . you will exit from menu

Frotown 1 year, 9 months ago

Thank you so much for this program. I built this circuit and it seems to work perfectly. Do you have instructions for the programming of the lights and what the five buttons do? Thank you, Jeff

myosotys60 2 years, 5 months ago

Hello, I give you some news I can not do it In addition, I wanted to dissociate the two channels is it possible ?

myosotys60 2 years, 5 months ago

Hello Thank you for the information, I will try to make cordially

flav1972 2 years, 5 months ago

Hi, The vars you are looking for are in globals.h : unsigned int asked_l[SWITCHSET]; // new asked level (*256) unsigned int current_l[SWITCHSET]; // current level multiplied by //256 in order to avoid floating calculations int incr_l; // step increment level multiplied by 256 in order to avoid floating calcultations // we are using only one increment for all transitions. // It is calculated to go from 0 to MAX in transitionDuration Please feel free to fork the project on github and send me the updates. Flav

myosotys60 2 years, 5 months ago

Hello Flav1972 Congratulations for what you do is good work For my part, I am interested in the aquarium controller V2. I wanted to put a progress bar for each of the lights outputs but I can not find the variable. Would it be possible for you to inform me thank you cordially Ps: google translation

flav1972 4 years, 5 months ago

Hello cube, I've received the notification just now. You should start by reading the arduino tutorials: - you will have to install the IDE. The read:

cube 4 years, 9 months ago

Hello. Im trying to build this same thing, but just relay switch. but unfortunately, i dont know how to edit the code, or actually which part i need to edit. ill be glad if anyone here can help me with this. FYI, i am new to arduino. i just want to use the lcd, buttons rtc and the relay board as switch. Any help would be great. TIA

Longbow 5 years ago

hello, first time thanks! they have done a very good work. Germany is my home, I am 59 years old. After the sketch / program, I've been looking for. My english is not perfect, so I often have to use the google-translator. now I have soldered the circuit on a strip-board scanning and works. In the next step a PC temperature sensor (PTC) integrated, I do not have a TMP36 (is ordered). Formulas have been adjusted in the sketch. Fan control (cooling) is integrated and works. My hobby is freshwater and saltwater aquaristik, saltwater mini reef, 30 liters. I unfortunately unsuccessful, attempts to integrate a DS18B20 in their sketch. that would be my suggestion. my brain is no longer in a position to fully use C ++. I have an ingenious designs, as their fall back. whether google the text, understood it, has translated we will see, -.} Friendly greetings from Germany / Bavaria Hubert for exchange of ideas / information exchange: [email protected]