Nano tank ATO / Waterchange controller.

slythy

Valuable Member
View Badges
Joined
Aug 3, 2021
Messages
1,122
Reaction score
906
Location
USA
Rating - 100%
1   0   0
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.

R0CC7Wp.png


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.

4aHqScz.jpg



QKyYjNL.jpg

66mjb7q.jpg

STJKhqJ.jpg



All of this got Jammed into a small project box with a grommet on the side.

dHuL9BA.jpg



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:
  1. A button for waterchanges so it turns on the 15min delay without power cycling.
  2. Then on my 180 gal I have a float safety on my for my reservoir so if its empty it doesnt keep just pumping nothing
 
OP
OP
slythy

slythy

Valuable Member
View Badges
Joined
Aug 3, 2021
Messages
1,122
Reaction score
906
Location
USA
Rating - 100%
1   0   0
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;
}

}
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Very nice :-)
Thank you for sharing
 

JMaccaz

Community Member
View Badges
Joined
Nov 15, 2022
Messages
31
Reaction score
6
Location
AUSTRALIA
Rating - 0%
0   0   0
Sorry for reviving this threads but how did this end up holding up after all these years?
 
OP
OP
slythy

slythy

Valuable Member
View Badges
Joined
Aug 3, 2021
Messages
1,122
Reaction score
906
Location
USA
Rating - 100%
1   0   0
Sorry for reviving this threads but how did this end up holding up after all these years?

Still truckin! I have had to replace the sensors once in the ~5 years its been running. Sometimes it needs the sensors wiped. But still original everything else
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 34 26.4%
  • 100% dry rock + 100% live sand

    Votes: 45 34.9%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 29 22.5%
  • 75% live rock, 25% live sand

    Votes: 11 8.5%
  • 25% live rock, 75% live sand

    Votes: 10 7.8%
Back
Top