straight forward float valve control

Request new hardware or ideas for the controller
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Cool.
Just add an exclamation mark :)

Code: Select all

digitalWrite(highATOPin,!ReefAngel.IO.GetChannel(0)); 
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

thx, buddy, works like a charm.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

Well, I built my bracket, installed everything, and it works like a charm. However, the buzzer is not very loud. It is plugged into ato high, as described earlier,

Is there a way to make it louder, or does someone sell one that will SCREAM when this float valve triggers? :shock:

Thx, as always, in advance.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

You can get a little bit louder if you use one of the PWM ports.
ATO ports = 5V
PWM ports = 10V
But if you need something much louder, you will need to use on of the relay ports and a stand alone buzzer.
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

rimai wrote:You can get a little bit louder if you use one of the PWM ports.
ATO ports = 5V
PWM ports = 10V
But if you need something much louder, you will need to use on of the relay ports and a stand alone buzzer.
So then...how would I change this line of code:

Code: Select all

 //turn off port 8 - main pump when switch is tripped and sound buzzer 
     ReefAngel.Relay.Set(Port8,ReefAngel.IO.GetChannel(0));
     pinMode(highATOPin,OUTPUT);
     digitalWrite(highATOPin,!ReefAngel.IO.GetChannel(0)); 
to use the pwm port. Thx in advance
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Which port would you want to use? Actinic or Daylight?
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

daylight
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Replace the above with this:

Code: Select all

//turn off port 8 - main pump when switch is tripped and sound buzzer 
     ReefAngel.Relay.Set(Port8,ReefAngel.IO.GetChannel(0));
     ReefAngel.PWM.SetDaylight(ReefAngel.IO.GetChannel(0)*100); 
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

rimai wrote:Replace the above with this:

Code: Select all

//turn off port 8 - main pump when switch is tripped and sound buzzer 
     ReefAngel.Relay.Set(Port8,ReefAngel.IO.GetChannel(0));
     ReefAngel.PWM.SetDaylight(ReefAngel.IO.GetChannel(0)*100); 
This ALMOST works. I put in the line of code and now the buzzer screams when the switch is NOT TRIPPED rather than when it is. I tested by tripping the switch and it turned off. I probably need a !, but not sure where to put it. Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Try this:

Code: Select all

//turn off port 8 - main pump when switch is tripped and sound buzzer 
     ReefAngel.Relay.Set(Port8,ReefAngel.IO.GetChannel(0));
     ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(0)*100)); 
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

First Question:
rimai wrote:Try this:

Code: Select all

//turn off port 8 - main pump when switch is tripped and sound buzzer 
     ReefAngel.Relay.Set(Port8,ReefAngel.IO.GetChannel(0));
     ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(0)*100)); 
This works as designed. Thanks. As I was testing, I got to thinking, however. I read a blurb on here recently where once the overflow trips, you want it to stay tripped until you can get to the tank and clear the blockage or whatever was causing the overflow switch to stop the pump. This would prevent the tank from draining, resetting the float switch, restarting the pump until it backed up and tripped the switch again. Is this possible?

Second Question
Oh, in this case it is simple.
You can use one of the custom variables.
CODE: SELECT ALL
ReefAngel.CustomVar[0]=ReefAngel.IO.GetChannel(0);
ReefAngel.CustomVar[7]=1;

Then, on the Portal, you can set a trigger to send you alerts when C0 = 0.
How long does it take the portal to pick up these alerts and send out the emails? Again I was testing tonite, held the switch tripped for 40-50 seconds, at least, but still didn't send. LMK and Thanks as always.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

The controller sends data to portal every 5 minutes.
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

so that means it would have to stay tripped for whatever length of time elapses from when it happens until the controller next sends, yes?

Then that makes my first question very important... how do you make it stay tripped, once tripped? THx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Wouldn't it stay tripped if it does trip?
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

actually no. The water level in the tank with the pump off is below the float valve. So when the water rises enough to trip the float valve, the pump stops and the water level falls (which is what I want.) However, under the current design when the water falls, it resets the switch and the pump turns back on.

While this is not catastrophic I was referring to the post regarding letting a pump cycle on and off and it not being good for it. LMK what you think. Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Is it an overflow you are trying to measure or is it something else?
Just curious.
If you want to make it trip and disable the pump until you inspect, we can do that.
Right now, it will turn on /off the port depending on the state of the float switch.
We can also leave the pump the way it is and make the custom variable stick, so if it does trip, the custom variable will change and not go back until you inspect.
Which one you prefer?
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

It is an overflow and it is working like you said...

Your idea:
We can also leave the pump the way it is and make the custom variable stick, so if it does trip, the custom variable will change and not go back until you inspect.
sounds like exactly what I want. Keep in mind we have a setting on the portal to send a email\text message when CustomField0 changes from 1 to 0. Don't want this new code to override that. Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: straight forward float valve control

Post by rimai »

Change this:

Code: Select all

ReefAngel.CustomVar[0]=ReefAngel.IO.GetChannel(0);
To this:

Code: Select all

if (ReefAngel.IO.GetChannel(0)) ReefAngel.CustomVar[0]=1;
It will require you to reboot the controller once the flag is set, though.
You shouldn't be having this happening at all to begin with.
If you are, there is an underlying problem and this is not going to be your solution.
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: straight forward float valve control

Post by rossbryant1956 »

You are right. I am attempting to fix a problem with my glass-holes overflow, but this is not the answer. I'll keep thinking. Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
Post Reply