How to control 2 WP-40s and a DC6000 with the DCPUMP class?

Do you have a question on how to do something.
Ask in here.
Post Reply
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

How to control 2 WP-40s and a DC6000 with the DCPUMP class?

Post by Smotz »

Hi all,

I have 2x WP40s and a DC6000 DC return pump. My current code is listed below (I haven't implemented the return pump yet). I will be adding the DC6000 using the modified Jebao cable for ATO.


How can I set a different setting for the return pump than what I have set for my WP-40?

For instance, I want to turn the DC6000 off during feeding mode but keep my WP-40's on 30%.

Code: Select all

ReefAngel.DCPump.FeedingSpeed=30;
  ReefAngel.DCPump.WaterChangeSpeed=0;
  ReefAngel.DCPump.DaylightChannel = Sync;
  ReefAngel.DCPump.ActinicChannel = Sync;
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by lnevo »

Dont use the dc pump class for the return pump. Use it through the PWM class the way we used to.. Put an if feeding mode then set to whatever % or 0.
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by Smotz »

Gotcha. I am debating on not using the DCPUMP class all together coz of the memory increase - I don't use the portal to control my wave makers. Can you think of any other benefit?
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by Smotz »

lnevo wrote:Dont use the dc pump class for the return pump. Use it through the PWM class the way we used to.. Put an if feeding mode then set to whatever % or 0.

Hey dude, would you be able to elaborate a bit? What would the command be to use the PWM class with the ATO? would this be it:

Code: Select all

pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,45*2.55);
the above would set it to 45% ? If so - whats with the * 2.55 ?

To take it further - how can I set the value for this in internal memory so I can change it when I want?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by rimai »

Yes, that's it.
*2.55 is because the controller uses a range from 0-255, but we humans use 0-100 so, we need to multiply by 2.55.
If you want to use internal memory, you can do something like this:

Code: Select all

    pinMode(lowATOPin,OUTPUT);
    analogWrite(lowATOPin,InternalMemory.LEDPWMActinic_read()*2.55);
Then use the android app to change the value you want to use.
Roberto.
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by Smotz »

rimai wrote:Yes, that's it.
*2.55 is because the controller uses a range from 0-255, but we humans use 0-100 so, we need to multiply by 2.55.
If you want to use internal memory, you can do something like this:

Code: Select all

    pinMode(lowATOPin,OUTPUT);
    analogWrite(lowATOPin,InternalMemory.LEDPWMActinic_read()*2.55);
Then use the android app to change the value you want to use.
Nice - sorry for the barrage of questions but I have more :)

What memory location would I change for this? I don't quite understand LEDPWMActinic_read .. ?

Can I set a default value - say 50% ? that gets changed via the droid app - I would want that value to stick should I reboot, etc ... is that possible ?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by rimai »

Yeah, just use android app and set the memory location PWM Actinic to 50. Internal memory is persistent, so it doesn't get erased when power is lost.
Roberto.
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla

Post by Smotz »

rimai wrote:Yeah, just use android app and set the memory location PWM Actinic to 50. Internal memory is persistent, so it doesn't get erased when power is lost.
Nice. Thx man.
Post Reply