Buzzer on while ATO pump relay is active

Do you have a question on how to do something.
Ask in here.
Post Reply
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer on while ATO pump relay is active

Post by 00Warpig00 »

So in my setup...

Do I still need this

Code: Select all

    //*****Begin ATO By Salinity Additions

    byte ATOBrutePort = Port2;
or should I change it to Port7 since at startup Port7 will become my ATO port in the first loop due to salinity being 0 anyhow. Thinking about it... I guess it really doesn't much matter what it is initialized as...

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Buzzer on while ATO pump relay is active

Post by rimai »

I don't think it matters now.
That code should be able to handle the state changes properly.
Roberto.
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer on while ATO pump relay is active

Post by 00Warpig00 »

This seems to be working 95% of what I am hoping for...

The ATO selection code I am working with for now is as follows

Code: Select all

        //*****Begin ATO By Salinity Additions
        
        if (ReefAngel.Params.Salinity<300)//if salinity is low switch to Saltwater ATO
          {
            ReefAngel.StandardATO(Port7,40 );//ATO Port is now Saltwater Port7
            ReefAngel.Relay.Off(Port2);//Turn off RO/DI Port2 
            ATOBrutePort=Port7;
            char ATOBruteText[ ] = "ATOSW";
          }
        else//if Salinity is high switch to RO/DI Topoff
          {
            ReefAngel.StandardATO(Port2,40 );//ATO Port is now RO/DI Port2
            ReefAngel.Relay.Off(Port7);//Turn off Saltwater Port7
            ATOBrutePort=Port2;
            char ATOBruteText[ ] = "ATORO";
          }        
        if (iochannel2flag == 1)//IF ATO Brute is empty do not pump
          {
            ReefAngel.Relay.RelayMaskOff=~(Port7Bit);//Mask Off Saltwater Brute Pump 
          }
        if (iochannel4flag == 1)//IF ATO Brute is empty do not pump
          {
            ReefAngel.Relay.RelayMaskOff=~(Port2Bit);//Mask Off RO/DI Brute Pump
          }
         
        //*****End ATO By Salinity Additions

The Buzzer code seems to mostly work. For some reason The buzzer gets stuck on at 25 about 50% of the time the ATO tops off. All the alert variables return to 0 but the
ReefAngel.PWM.SetActinic & ReefAngel.PWM.SetDaylight I am guessing need an else statement to insure they are off when the variable drops back from 25 to 0.

my current (not quite right) code is below.

Code: Select all

        overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
        atoflag = InternalMemory.read( ATO_Exceed_Flag );
        iochannel0flag = ! ReefAngel.IO.GetChannel( 0 );
        iochannel1flag = ! ReefAngel.IO.GetChannel( 1 );
        iochannel2flag = ! ReefAngel.IO.GetChannel( 2 );
        iochannel3flag = ! ReefAngel.IO.GetChannel( 3 );
        iochannel4flag = ! ReefAngel.IO.GetChannel( 4 );
        iochannel5flag = ! ReefAngel.IO.GetChannel( 5 );
        AlertATOPump = ReefAngel.Relay.Status(Port2);
        AlertNonCritical = atoflag + iochannel2flag + iochannel3flag + iochannel4flag + iochannel5flag;
        AlertCritical = AlertATOPump + overheatflag + iochannel0flag + iochannel1flag;   
        if ( AlertNonCritical >= 1 ) AlertNonCritical = 25;
        if ( AlertCritical >= 1 ) AlertCritical = 25;   
        if ( AlertNonCritical >= 1 ) ReefAngel.PWM.SetActinic(millis()%60000<100?AlertNonCritical:0);
        if ( AlertNonCritical >= 1 ) ReefAngel.PWM.SetDaylight(millis()%60000<100?AlertNonCritical:0);
        if ( AlertCritical >= 1 ) ReefAngel.PWM.SetActinic(millis()%300<100?AlertCritical:0);
        if ( AlertCritical >= 1 ) ReefAngel.PWM.SetDaylight(millis()%300<100?AlertCritical:0);   

Guessing I need to change the bottom 4 if statements of the above to be something like this.

Code: Select all

        if ( AlertNonCritical >= 1 ) ReefAngel.PWM.SetActinic(millis()%60000<100?AlertNonCritical:0);
        else { ReefAngel.PWM.SetActinic(0) }
        if ( AlertNonCritical >= 1 ) ReefAngel.PWM.SetDaylight(millis()%60000<100?AlertNonCritical:0);
        else { ReefAngel.PWM.SetDaylight(0) }
        if ( AlertCritical >= 1 ) ReefAngel.PWM.SetActinic(millis()%300<100?AlertCritical:0);
        else { ReefAngel.PWM.SetActinic(0) }
        if ( AlertCritical >= 1 ) ReefAngel.PWM.SetDaylight(millis()%300<100?AlertCritical:0);   
        else { ReefAngel.PWM.SetDaylight(0) }

Not sure of my syntax above, but I am guessing that's what I need to do to be sure the buzzer turns OFF

Also, I realize I am using both my PWM ports for the buzzer. Did that because both were unused and I made it so it did not matter which port I plugged the buzzer into.

That will be changing after I return from my business trip. I just purchased my Eheim auto feeder yesterday and have been gathering my parts 5V relay\3V ac adapter etc to modify it and hook it up to the other port when I return from my trip. Gonna leave it on timer feed for now while I am gone.

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer on while ATO pump relay is active

Post by 00Warpig00 »

So my ATO is acting funny still after all.

1.ATO float switch triggers top off

2.correct pump starts to pump for ATO.

3.Buzzer does it's thing to warn me it's topping up.

4.about 4 seconds into the topoff the pump shuts down and the buzzer stop.

5. 35 seconds later my ATO times out. Red light skimmer shuts down ato flag is set.

my ATO timer is set at 40 seconds. Why would the pump turn off 4 seconds or so in but the ATO still time out?

This seems to happen very frequently. 80% of the ATO cycles.

confused... Seems like the pump knows the ATO cycle is over and turns off but the controller continues to count to 40 and times out.

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Buzzer on while ATO pump relay is active

Post by rimai »

I just tested the code to be sure and seems to be working fine.
Is 4 seconds enough to make your water level rise from the bottom float and activate the top float?
Seems very short to me.
Roberto.
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer on while ATO pump relay is active

Post by 00Warpig00 »

yes 4 to 8 seconds for a top off is not uncommon. my low and high float water levels are really close together in my sump.

normally (no water needed state) my float switches sit at ATO Low = Off & ATO High = 0n
If I remove 1/4 cup of water (with a measuring cup) from my sump my ATO High switch changes to Off so both High and Low switches report off. If I remove an additional 3/4 cup (with a measuring cup) of water from my sump The ATO Low Switch will change to On so High will be Off and Low will be on. Also my ATO pump is either a Maxijet 600 (filling with RO) or a Maxijet 1200 (filing with SW). Total pump on time seems to average around 8 seconds although it takes a couple seconds for water to hit the sump after it kicks on because the supply container is at the other end of about 10 feet of 3/8 id hose.

Just strange. I have never had issues with my ATO timing out in the past with this setup.
180G FOWLR
20GH QT#1
29G QT#2

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Buzzer on while ATO pump relay is active

Post by rimai »

Are you sure there is not an override for port 2 or port7 somewhere else in the code?
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Buzzer on while ATO pump relay is active

Post by lnevo »

Where's the full code listed?
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer on while ATO pump relay is active

Post by 00Warpig00 »

I do not see another override for port 2 or 7 except for in waterchange mode...

Full code is here. Way down at the bottom. Version 109. I did make a few slight changes per my ideas a few posts above about the buzzer locking on. So now I am running my Version 110 (also at the end of that thread).

In the past few days with an ATO happening a few times a day running my Version 110 The ATO has not timed out even once nor has the buzzer locked on (buzzing).

http://forum.reefangel.com/viewtopic.php?f=11&t=4722

I may have resolved the issue, not sure. If I did I'm not sure why my changes made any difference tot he ATO timeout. I only expected changes with the buzzer not locking on.

Nick

I have made a code change
180G FOWLR
20GH QT#1
29G QT#2

Image
Post Reply