How to check if dosing pumps are running

Basic / Standard Reef Angel hardware
Post Reply
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

How to check if dosing pumps are running

Post 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.
Last edited by paintguru on Wed Jul 16, 2014 4:25 am, edited 1 time in total.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to check of dosing pumps are running

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to check of dosing pumps are running

Post 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
Roberto.
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post 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.
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post 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 :).
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to check of dosing pumps are running

Post 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.
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post 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.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to check of dosing pumps are running

Post 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
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How to check of dosing pumps are running

Post 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
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post by paintguru »

Thanks Colin, I'll try it out!
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to check of dosing pumps are running

Post by lnevo »

Thats a cool way to go about it :)
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How to check of dosing pumps are running

Post by cosmith71 »

Not fancy, but it works! :D

--Colin
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post 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?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to check of dosing pumps are running

Post by lnevo »

Yep
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post by paintguru »

Well it compiled. I will try uploading it a bit later.
paintguru
Posts: 10
Joined: Sat Apr 12, 2014 4:27 pm

Re: How to check of dosing pumps are running

Post 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!
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How to check of dosing pumps are running

Post by cosmith71 »

You're welcome!

--C
Post Reply