Page 1 of 1
How to check if dosing pumps are running
Posted: Wed Jul 09, 2014 5:59 am
by paintguru
Quick question. Using the program wizard, I installed two RA dosing pumps and programmed them to run for 9 seconds once/day. Is there a way to tell when/if this is actually occurring? The Portal updates only occur every 5 minutes, so I'm sure it is not catching the activity. Just curious if there is a better way to do this. Thanks.
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 6:14 am
by lnevo
This is a long thread but I helped someone do just that...i also do it but it involves a bit more. You can look at my dosing code routines to see what I'm doing as well.
http://forum.reefangel.com/viewtopic.php?t=3262#p26140
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 7:54 am
by rimai
The dosing pump function calculation starts at midnight.
So, your dosing is probably happening at midnight.
If you want to see it in action, we can code it differently, so you can actually see it.
This is piece of code that would do the same thing:
Code: Select all
if (hour()==10 && minute()==0 and second()<9)
ReefAngel.Relay.On(Port1);
else
ReefAngel.Relay.Off(Port1);
This would turn the relay on at 10:00:00 AM and turn it off at 10:00:09 AM
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 9:18 am
by paintguru
Thanks guys. I tried to setup a trigger in the portal to send me an email when those two ports turned on (well when they = 1), but I didn't get anything.
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 9:30 am
by paintguru
lnevo wrote:This is a long thread but I helped someone do just that...i also do it but it involves a bit more. You can look at my dosing code routines to see what I'm doing as well.
Just read through the thread and I think your result is exactly what I'd love to see, a time each day of how long a particular port runs. I noticed a lot of iterations, did you ever come up with a final code to add and where to do it? I don't want to fall down the rabbit hole and relive the thread

.
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 1:29 pm
by lnevo
I'll take a look later, the latest iteration I would say is in my code but that would have some dependencies on a few custom memory locations and be a challenge to integrate unless you know some code. Depends how comfortable you are. I'll see if I can find the latest "independent" code but the problem with that is that it requires a few custom variables minute/second for each pump. Whereas what I use only stores the ml dosed in one custom variable per pump. Let me know which way you want to go and we can focus on that. Let's keep the discussion in this thread for your implementation.
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 3:16 pm
by paintguru
I'm perfectly happy knowing how many seconds the pump has run and not convert it to ml. I assume time is an easier variable to deal with. As I believe you were shooting for in the other thread, resetting it once/day would be great.
Re: How to check of dosing pumps are running
Posted: Wed Jul 09, 2014 3:48 pm
by lnevo
The prob with seconds is we can only store 255 (or a bit over 4 minutes) before it wraps so we have to store as minutes in one variable and seconds in the other making it harder to graph. Converting to ml we can graph up to 255ml instead. Either way..the minute second logging should be in that thread, i'll find the exact post it should be copy/paste
Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 3:13 am
by cosmith71
Here's what I use. This will not track how long the pumps run, but will allow you to see the relay activity in the portal. Note that Box2 doesn't actually exist (use a relay box that you don't have). This is for two pumps. Modify to your needs.
Up top in the globals:
Code: Select all
#define VirtAlk Box2_Port1
#define VirtCal Box2_Port2
unsigned long LastUpdate1=0;
unsigned long LastUpdate2=0;
Down in the loop()
Code: Select all
// Turn on imaginary relays for 5 minutes when dosing pumps activate so Portal can track them
if (ReefAngel.Relay.Status(AlkPump) && LastUpdate1==0)
{
LastUpdate1 = now();
ReefAngel.Relay.On (VirtAlk);
}
if (now() - LastUpdate1 >= 300 && LastUpdate1 != 0)
{
LastUpdate1 = 0;
ReefAngel.Relay.Off (VirtAlk);
}
if (ReefAngel.Relay.Status(CalPump) && LastUpdate2==0)
{
LastUpdate2 = now();
ReefAngel.Relay.On (VirtCal);
}
if (now() - LastUpdate2 >= 300 && LastUpdate2 != 0)
{
LastUpdate2 = 0;
ReefAngel.Relay.Off (VirtCal);
}
--Colin
Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 5:10 am
by paintguru
Thanks Colin, I'll try it out!
Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 5:39 am
by lnevo
Thats a cool way to go about it

Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 6:10 am
by cosmith71
Not fancy, but it works!
--Colin
Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 2:33 pm
by paintguru
Silly question, but I didn't rename my ports, so would I simply rename your "CalPump" and "AlkPump" terms to "Port7" and "Port8" respectively?
Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 2:55 pm
by lnevo
Yep
Re: How to check of dosing pumps are running
Posted: Thu Jul 10, 2014 3:43 pm
by paintguru
Well it compiled. I will try uploading it a bit later.
Re: How to check of dosing pumps are running
Posted: Fri Jul 11, 2014 4:19 am
by paintguru
Looks like it worked! Had a spike at 12am and 1am on both virtual ports, which makes sense as I have a 60m delay between the two. May have to try it for my topoff at some point too. Thanks again for the help!
Re: How to check of dosing pumps are running
Posted: Fri Jul 11, 2014 7:23 am
by cosmith71
You're welcome!
--C