Controlling Jebao/Tunze/Speedwave pumps

Would you like to help?
Share your walkthrough tutorial with others
Sebyte

Re: Controlling Jebao/Tunze pumps

Post by Sebyte »

I would love to get one of these pumps going but don't have any free PWM ports, or do I?

I am using the Water level expansion so I do have the two ATO ports free and I seem to remember that they can provide a 0-5v PWM output.

I guess the question is would this output be sufficient to drive the the pump? If so how would the above code need to be changed to get the ATO ports in to use.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze pumps

Post by rimai »

Only one ATO port can do PWM.

Code: Select all

pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,ReefCrestMode(60,20,true)*2.55);
The cable is designed to work on 0-10VDC signals.
You will need to mod the cable if you want to use 0-5VDC signal.
Take one resistor and bridge the pads instead.

Edited: Pads do not need to be bridged. Only removal of resistor R2 is necessary
Roberto.
Sebyte

Re: Controlling Jebao/Tunze pumps

Post by Sebyte »

Thanks, I thought that was the case. As I have not seen the cable harnes I am not sure what you mean by bridge the pads?


Any chance of a circuit diagram?

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

Re: Controlling Jebao/Tunze pumps

Post by rimai »

Remove R2.
Attachments
Jebao.png
Jebao.png (2.39 KiB) Viewed 8377 times
Roberto.
Sebyte

Re: Controlling Jebao/Tunze pumps

Post by Sebyte »

Thanks Roberto

I will get a pump sent over and the place an order for cable and a couple of other bits as well.

Thanks again
mluz
Posts: 4
Joined: Wed Mar 20, 2013 11:38 am

Re: Controlling Jebao/Tunze pumps

Post by mluz »

First I would like to thank you all for the great info and help. I've owned my RA for about three weeks and I found everything I needed to get it running in this forum.

I also bought a WP40 pump and cable. I was able to upload the code (reef crest) and its working great, thank you to Roberto for the tutorial.

My question is, can I use the portal or the reef angel client to change the settings on PWM? How do i go about doing that? Specifically change the maximum and minimum percentage settings on reef crest.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze pumps

Post by rimai »

You could leverage the RF memory locations until we have developed memory locations specific for Jebao.
For example:

Code: Select all

  ReefAngel.PWM.SetDaylight( ReefCrestMode(InternalMemory.RFSpeed_read(),InternalMemory.RFDuration_read(),true) ); 
The above function would use the RF Speed as the average speed and RF Duration as the offset.
Now you can change it in the Portal :)
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Controlling Jebao/Tunze pumps

Post by lnevo »

Take a look at this post as well. It has logic to leverage all the "vortech" modes.

http://forum.reefangel.com/viewtopic.php?p=23072#p23072
Ciwyn
Posts: 24
Joined: Tue May 21, 2013 6:18 pm

Re: Controlling Jebao/Tunze pumps

Post by Ciwyn »

Can anyone recommend a code for just running one WP40? Should I just set my relay (port5) to always on, then put one of the codes in the custom code section? I currently have the reefcrest code in there. May try the random mode code that Roberto posted though.

Right now I have port 5 set to wavemaker random and the pump stays off for longer than I care for it to.

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

Re: Controlling Jebao/Tunze pumps

Post by rimai »

You can actually plug it to the wall and use Port 5 for something else you may want to control.
Roberto.
Ciwyn
Posts: 24
Joined: Tue May 21, 2013 6:18 pm

Re: Controlling Jebao/Tunze pumps

Post by Ciwyn »

Alright so I was thinking correctly. Currently I have ports available, I will stash that away for future reference though. Thanks again
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze pumps

Post by rimai »

All the functions are already in the libraries.
What do you have in mind?
Yes, you could put codes into a .h file and call the #include in the code.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Controlling Jebao/Tunze pumps

Post by lnevo »

You could have but it's no longer necessary to do that nor put the functions into your INO file. Just go ahead and use them and the new libraries will take care of it.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Controlling Jebao/Tunze pumps

Post by jjdezek »

rimai wrote:You could do something like this:

Code: Select all

if (hour()>=8 && hour()<12)
{
  ReefAngel.PWM.SetDaylight( ReefCrestMode(60,20,true) ); // ReefCrest at 60% +/- 20% on sync mode
  ReefAngel.PWM.SetActinic( ReefCrestMode(60,20,false) ); // ReefCrest at 60% +/- 20% on anti-sync mode
}
else if (hour()>=12 && hour()<18)
{
  ReefAngel.PWM.SetDaylight( ShortPulseMode(0,60,200,true) ); // Short pulse at 60% with 200ms pulse on sync mode
  ReefAngel.PWM.SetActinic( ShortPulseMode(0,60,200,false) ); // Short pulse at 60% with 200ms pulse on anti-sync mode
}
else
{
  ReefAngel.PWM.SetDaylight( LongPulseMode(0,60,10,true) ); // Long pulse at 60% with 10s pulse on sync mode
  ReefAngel.PWM.SetActinic( LongPulseMode(0,60,10,false) ); // Long pulse at 60% with 10s pulse on anti-sync mode
}
when i loaded this code it shut my right leds off completly my middle whites off and the rest were still on. what would cause that to happen......why is it every code i try for the jebao on here it doesnt work
Image
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

Re: Controlling Jebao/Tunze pumps

Post by ReeferBee »

Do you have the harness for it? What ports do you have the wp40 hooked up to?
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Controlling Jebao/Tunze pumps

Post by jjdezek »

i just realized i used an older code set up that doesnt have my current light set up....i rewired my lights into all dimming ports and the code i used to load this one in was from when i had the lights wired into two ports. rookie mistake. not sure whats ups with the other codes i have tried though.
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Controlling Jebao/Tunze pumps

Post by jjdezek »

plugged it in my current code set and works fine.
Image
User avatar
oscarinw
Posts: 31
Joined: Fri Apr 19, 2013 1:00 pm

Re: Controlling Jebao/Tunze pumps

Post by oscarinw »

rimai wrote:Only one ATO port can do PWM.

Code: Select all

pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,ReefCrestMode(60,20,true));
The cable is designed to work on 0-10VDC signals.
You will need to mod the cable if you want to use 0-5VDC signal.
Take one resistor and bridge the pads instead.

Roberto,
I am also connecting the WP40 to the ATO PWM...
Considering this is a different wattage PWM, what are the proper values to be used for the different modes??
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by rimai »

Sorry, that post is incorrect.
I'll update it, but here is how it needs to be:

Code: Select all

pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,ReefCrestMode(60,20,true)*2.55);
analogWrite has a range of 0-255 instead of 0-100
Roberto.
daniella3d
Posts: 93
Joined: Wed Nov 14, 2012 8:34 pm

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by daniella3d »

just wondering if I only have one jebao pump connected do I need both of these lines? or just one?

////// Place your custom code below here

ReefAngel.PWM.SetDaylight( ReefCrestMode(60,20,true) ); // ReefCrest at 60% +/- 20% on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(60,20,false) ); // ReefCrest at 60% +/- 20% on anti-sync mode

////// Place your custom code above here
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by rimai »

You can just use one
Roberto.
carlii
Posts: 91
Joined: Sat Mar 17, 2012 7:22 pm

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by carlii »

I see that the Tunze control in in the portal now. Way cool!. I assume that I need to use internal memory to use the portal. How do I code that for Tunze pumps on a PWM expansion box?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by lnevo »

ReefAngel.DCPump.ExpansionChannel[0]=Sync;
ReefAngel.DCPump.ExpansionChannel[1]=AntiSync;

Change the channel number and the type to however you want to configure it. That's all there is to it. If you want you can define the speed for Water Change and Feeding Modes...

ReefAngel.DCPump.FeedingSpeed=10;
ReefAngel.DCPump.WaterChangeSpeed=0;
Sebyte

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by Sebyte »

Inevo wrote
If you want you can define the speed for Water Change and Feeding Modes...

ReefAngel.DCPump.FeedingSpeed=10;
ReefAngel.DCPump.WaterChangeSpeed=0;
I have been using the ATOPinLow port and memory settings via the Portal to control my Jeboa for some time.

Today I have tried adding ReefAngel.DCPump.FeedingSpeed=10; to my code, but the pump did not operate during the feed mode. I have tried a number of values up to 50 with the same result.

I am not sure if the ReefAngel.DCPump.FeedingSpeed should work with the ATOPinLow port or not also if it should do I have the command in the right place in my code.

Any suggestions please.

My INO
// Created using Wizard 14/09/2013

// DC pump set to use ATOPinLow



#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
    // This must be the first line
    
    InternalMemory.LCDID_write(0); // new LCD screen
    ReefAngel.Init(); //Initialize controller
    
    // Ports toggled in Feeding Mode
    
    ReefAngel.FeedingModePorts = Port1Bit | Port6Bit;
    
    // Ports toggled in Water Change Mode
    
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port6Bit | Port7Bit | Port8Bit;
    
    // Ports toggled when Lights On / Off menu entry selected
    
    ReefAngel.LightsOnPorts = 0;
    
    // Ports turned off when Overheat temperature exceeded
    
    ReefAngel.OverheatShutoffPorts = Port3Bit;
    
    // Use T1 probe as temperature and overheat functions
    
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;

    // Feeeding and Water Change mode speed
    
    ReefAngel.DCPump.FeedingSpeed=50;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port1 );
    ReefAngel.Relay.On( Port6 );

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
   // ReefAngel.StandardATO( Port2 );
    ReefAngel.StandardHeater( Port3 );
    ReefAngel.DosingPumpRepeat1( Port7 );
    ReefAngel.DosingPumpRepeat2( Port8 );
    ReefAngel.PWM.DaylightPWMParabola();
    ReefAngel.PWM.ActinicPWMParabola();
  
    ReefAngel.DCPump.UseMemory = true;
    
    ReefAngel.DCPump.LowATOChannel = Sync ; // Jebo connected to AtoPINLow
   
   
   // Waterlevel code changed 20/04/13 to stop quick cycle of ATO pump

byte l = ReefAngel.WaterLevel.GetLevel();
  if (l>85) ReefAngel.Relay.Off(Port2);
  if (l<82 && l>0) ReefAngel.Relay.On(Port2);

  if (now()%20<10)
      
   //

 // Delay turning Skimmer back on
    ReefAngel.Relay.DelayedOn( Port1,60 );
   
   
    ////// Place your custom code below here
    
     //********************************************************************************************************************************
  // Activate Watch Dog Timer at 6am and 6pm

  if ((now()%86400)==21600) delay(1000);

  if ((now()%86400)==43200) delay(1000);

// Wavemaker not available 9 pm to 10 am

  if ( (hour() >= 20) || (hour() <= 9) )
  {

    ReefAngel.DCPump.Mode==Custom;

  }


 //********************************************************************************************************************************

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "sebyte" );
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Water Level
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by ReeferBee »

rimai wrote:

Code: Select all

pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,ReefCrestMode(60,20,true)*2.55);
Where do I post this in my code? Thanks!
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by rimai »

In the loop() section.
Roberto.
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by ReeferBee »

above the "place custom code below here"? Thanks again Roberto
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by rimai »

Place it below that line
Roberto.
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by ReeferBee »

Got it working. Thanks!
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

Re: Controlling Jebao/Tunze/Speedwave pumps

Post by ReeferBee »

Is it odd that both of my float switch ports run my wp40?
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Post Reply