![]() |
![]() |
![]() |
#1 |
Registered Member
Join Date: Jun 2003
Posts: 713
|
Nano tank ATO / Water change controller
I figured I would add this here even though I no longer have salt tanks. Maybe it will help someone.
First off I'd like to say the warnings that I'm not responsible for hurting yourself or your property if you follow this guide, this is just what I did. So I have been looking for a top off for my Mr Aqua Low Iron crystal shrimp tank and nothing off the shelf did it for me. They were either too bulky, not safe enough and most flowed way too fast for what I was looking for. So I decided to build a simple one using an Arduino Nano V3, 2 optical sensors off of amazon and an aqualifter (~1.5gph) . first here is a really simple schematic of what I did. To get the AC input and Output I just bought a $2 extension cord at the hardware store and cut and spliced it. The 3 leds are for status lights. Each green one is for if the sensor reads water or not. If ON then no water is touching the sensor. The red is for if power to the pump/relay is active. ![]() Next you cant have a small custom ATO with a bad bracket. This bracket is used for glass that is ~0.200" thick. For my rimless cube this is perfect. I added drill holes on the back to put 1/4-20 plastic screws in to really lock it in place. But they aren't necessary . The small holes in the center are to route 3/16's hard tubing for the fill port. ![]() ![]() ![]() ![]() All of this got Jammed into a small project box with a grommet on the side. ![]() I bench tested it for a while before putting it on my tank. Its made so the pump wont turn on until 15mins has passed since power on or the last time the pump ran. This means it wont run for super short bursts 10000x a day and that when I want to do water changes I just unplug it and I get 15mins to drain before it fills it back up. Since its for CRS I wanted it to be pretty slow and the aqualifter does a great job of that. Things I wish I added and can in the future if it really bothers me is:
|
![]() |
![]() |
![]() |
#2 |
Registered Member
Join Date: Jun 2003
Posts: 713
|
Here is my code, its not the most efficient but it works and didnt take long to do.
Copy Below this line*** const int ato1Pin = A6; const int ato2Pin = A7; const int ato1LEDPin = 4; const int ato2LEDPin = 3; const int pumpLEDPin = 2; const int relayPin = 6; long delayTime= 900000; //15min in millis unsigned long relayDelay =0; unsigned long timer=0; long timeCompare; int ato1Value = 0; int ato2Value = 0; int pumpONBool =0; void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); pinMode(6, OUTPUT); } void loop() { ato1Value = analogRead(ato1Pin); ato2Value = analogRead(ato2Pin); Serial.print(pumpONBool); Serial.print(" "); Serial.print(relayDelay); Serial.print(" "); Serial.print(timeCompare); Serial.print(" "); Serial.print(timer); Serial.print(" "); Serial.print(ato1Value); Serial.print(" "); Serial.println(ato2Value); //* sensor logic ** timer = millis(); if (ato1Value >800) { digitalWrite(ato1LEDPin,HIGH); ato1Value=1 } else { digitalWrite(ato1LEDPin,LOW); ato1Value=0; } if (ato2Value >800) { digitalWrite(ato2LEDPin,HIGH); ato2Value=1; } else { digitalWrite(ato2LEDPin,LOW); ato2Value=0; } // * TURNING ON PUMP ** if(timer-relayDelay >=delayTime) { while(ato1Value ==1 && ato2Value==1) { ato1Value = analogRead(ato1Pin); ato2Value = analogRead(ato2Pin); digitalWrite(pumpLEDPin,HIGH); digitalWrite(relayPin,HIGH); pumpONBool =1; relayDelay = millis(); } } if ( ato1Value ==0 || ato2Value==0) { digitalWrite(pumpLEDPin,LOW); digitalWrite(relayPin,LOW); pumpONBool =0; } //max value of millis rerolled over. ~49 Days so nothing weird happens if( millis() >= 4294967200) { relayDelay=0; } } |
![]() |
![]() |
![]() |
#3 |
Registered Member
Join Date: Jun 2003
Posts: 713
|
Here is the files for the ATO with the original if you want to modify it. I use a Mr Aqua Low Iron rimless Cube 12x12x12". Glass is ~0.200" thick.
Nano Rimless Tank ATO Bracket by slythy |
![]() |
![]() |
![]() |
#4 |
Registered Member
Join Date: Jan 2007
Location: ft lauderdale
Posts: 2,729
|
This is perfect for my new tank! How reliable have you found the sensor?
__________________
Chris Addicted to the Reef- Current Tank Info: Starting a 20g |
![]() |
![]() |
![]() |
#5 | |
Registered Member
Join Date: Jun 2003
Posts: 713
|
Quote:
I think if I was to make a V2 I would add a second output for a second pump then you could choose topoff or Waterchange and add a button to turn it off for how ever long it takes to do thw water change. If you want to make it and you have any questions feel free to ask. I think I have less than $50 total in it. Also if you measure your glass and its a different size I can mod the file for you! |
|
![]() |
![]() |
![]() |
#6 |
Registered Member
Join Date: Jan 2007
Location: ft lauderdale
Posts: 2,729
|
One thing I’m thinking of is adding to the code a moving average of avg run time and avg daily run time and shut it down if it runs for more then 1.5x avg (assume that means something is very wrong). Other then that looks like I’m setting my 3D printer back up.
__________________
Chris Addicted to the Reef- Current Tank Info: Starting a 20g |
![]() |
![]() |
![]() |
#7 | |
Registered Member
Join Date: Jun 2003
Posts: 713
|
Quote:
I want to make a PCB for this to add a bunch of parts and make it all pretty. But then again its working really well and I'm lazy. Post what you end up doing code wise and we can keep a rolling update for anyone else. One thing to note is I kept the height of the optical sensor lower than the plastic on the inside of the tank. Some printed materials can be toxic so I wanted to keep the plastic out of the water. I'm just glad someone might use it or find it helpful, I debated posting it for that reason. Thanks! |
|
![]() |
![]() |
![]() |
#8 |
Registered Member
Join Date: Jan 2007
Location: ft lauderdale
Posts: 2,729
|
It is going to be a few months before I even get to this. I’m
Just starting the tank now. And I swore to myself no diy this time. That lasted a whole week.
__________________
Chris Addicted to the Reef- Current Tank Info: Starting a 20g |
![]() |
![]() |
![]() |
#9 |
Registered Member
Join Date: Jun 2003
Posts: 713
|
|
![]() |
![]() |
![]() |
|
|