HELP Dosing function use as a food timer on port 2

Requests for new functions or software apps
User avatar
Posts: 31
Joined: Fri May 04, 2012 10:13 am
PostPosted: Tue Mar 22, 2016 10:23 pm
First of all, Great products.
I have been using RA for years.

Now, I need a little help pls.
Im not a code maker I use the
wizard to get things done.

But this specific task I need help below.

As we all know we like to keep our fish
healthy all the time without over feeding
or polluting our tank.

so I decide to built and design a heavy duty
food timer. Basically the motor power is approx 4watts
and I have plug it using port 2. so far without any
permanent fish food yet. coz I need help to fix this
one major thing.

I used the wonderful wizard and select for
memory setting - Internal memory
then in Port 2 i used the function Dosing Pump.

This function turns on every 240 (m) for 2 (s).

This is great function. Except the problem is I
do not want it to dose at night from 8:30pm until 8:30am.
Because during this time some fish maybe sleeping
and my lights almost all dim and ready to be OFF.

Please let me know what code can
bypass the function during this specific
sleeping and wake up hour of the fish.
and resume running normal auto mode after 8:31am til 8:29pm

Note: The code I wish to use should not affect the options like change of setting during the day
feeding mins and seconds.

I wish still have the benefit of changing the two
the functions (mins and seconds) in my apps internal memory during the hours my lights are
on Auto mode. I have radion lights above my tank on a separate timer.

Do let me know were to insert this custom code you suggest so I can cut and past it
in my ino file.

Thanks
md
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Wed Mar 23, 2016 3:07 am
Put this line after your dosing pump code.

Code: Select all
  if ((hour()>19 && minute()>29) || (hour()<8 && minute()<30)) ReefAngel.Relay.Off(Port2);


--Colin
User avatar
Posts: 31
Joined: Fri May 04, 2012 10:13 am
PostPosted: Wed Mar 23, 2016 8:24 am
Instead of 19 for the hour I made it 20. I think this is what you mean.

Before I update my code. I got a question.

I wonder how does the internal clock run now.
Lets assume I set the function in the dosing pump for example
turns on every 180 (m) for 2 (s).

The internal timer should be ON after 8:31 AM and
does this means it will feed at 11am, 2:00pm, 5pm and 8pm. Is this correct.

if ((hour()>20 && minute()>29) || (hour()<8 && minute()<30)) ReefAngel.Relay.Off(Port2);
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Wed Mar 23, 2016 8:30 am
19 is correct. It states >19. If you make it 20, it won't shut off until 21. You could also change it to >=20.

Every 180 minutes means it will run every 3 hours with a base at midnight, so with this code it would be 0900, 1200, 1500, 1800.

--Colin
User avatar
Posts: 31
Joined: Fri May 04, 2012 10:13 am
PostPosted: Wed Mar 23, 2016 10:31 am
Great! Thanks I will test it.
User avatar
Posts: 31
Joined: Fri May 04, 2012 10:13 am
PostPosted: Sat Apr 02, 2016 9:16 am
Hi Colin,
Works exactly what is its suppose to do. I watch it different hours of the day by monitoring it during the time it is suppose to be ON and the time it is suppose to OFF and timing the seconds too.
Thanks lot!
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Sat Apr 02, 2016 2:01 pm
You're welcome

--Colin
User avatar
Posts: 31
Joined: Fri May 04, 2012 10:13 am
PostPosted: Sun Apr 03, 2016 11:15 am
Hi Colin,
I have another post in the forum I posted it in hardware request but I think it should be software.
Maybe you can help me over there.

Thanks
User avatar
Posts: 31
Joined: Fri May 04, 2012 10:13 am
PostPosted: Thu Jan 04, 2018 9:29 am
Can anyone help me.

My DIY food timer is set using the Dosing function.

My problem is recently when i upgraded the RA STAR controller I began to experience negative effect.
When controller began to restarts or reboots itself automatically one day.
I was sleeping when it all began.

Port 2 is where I am connecting to my DIY FOOD TIMER. Its run by a RC SERVO.

What I ignored before and did not realise that can cause a crash was every time the RA STAR reboot or restarts I could here myDIY FOOD TIMER SPINS and stops. I taught this was ok. But if it happens to often this can be deadly.

What i need help is how to cut that short electricity from the relay when it RA STAR Reboot or restarts.

My tank almost crash because this erratic experience of this unstable on and off.

The RA STAR just one day started to go crazy. Kept on rebooting and restarting in the middle of the night til
early morning. I was still a sleep. When i woke up my entire tank was cloudy due to the uneaten pellets by my food timer spinning ON then OFF when ever the RA RESTARTS.

Anyway. Can anyone help me create a fail safe code.

I need a code that if the RA STAR Restarts or reboot. It will not throw electrical current in port 2.
The code should not remove the dosing function I set it with. Example If i set it to dose every 180 mins for 2 seconds, this function should still work.

The problem is this short electrical currents make my DIY Food timer spins when it sense this short surge power in the port then stops.


Thanks
MD

Posts: 64
Joined: Wed Apr 27, 2011 9:08 am
PostPosted: Thu Jan 04, 2018 1:59 pm
Although I'm not sure if this can be done in code as the RA reboots all the relays before running the code I think. What you can do is get a relay delay and set it to run say 10 sec after power is on to your feeder. You would just make the feeder run for 10 sec longer. This will prevent power from going to your feeder on any reboot.

tim
Next

Return to Requests

Who is online

Users browsing this forum: No registered users and 2 guests