V1.0.9 DC pump control

Related to the development libraries, released by Curt Binder
PostPosted: Wed Jun 19, 2013 4:06 pm
I have noticed in the new version that the wizard can build code for the control of DC pumps using memory locations that can be changed in the portal.

Is it possible to use the same function and code it with AtoLOWPin to control a WP-25, so that the mode could be changed via the portal?
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Jun 19, 2013 4:15 pm
Not without adding support in the libraries...but it could be doable..
PostPosted: Wed Jun 19, 2013 6:03 pm
Not without adding support in the libraries...but it could be doable..


I have been playing with the AtoLOWPin to control a WP-25 as I dont have a PWM expansion and am using the two channels on the main relay box for my LED's.

If a library function could be developed it would be great for me and also for others that are in a similar position. Unfortunately I don't have the knowledge to write a library function so any help would be gratefully revived.

Thanks
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Jun 19, 2013 6:19 pm
It would only be a few lines. I wont have a chance for a bit..havent even updated yet...3 weeks of straight coding and my wife gives me evil looks when i go near the laptop..i'll see what i can manage on the train.
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Jun 19, 2013 6:57 pm
Looks like the way its written would be more than a few lines....but quite straight forward...hmm
PostPosted: Wed Jun 19, 2013 7:22 pm
Give it a try when you can, many thanks!
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Thu Jun 20, 2013 7:28 pm
Ok, please pull my atopump branch on http://github.com/lnevo/Libraries

I can't really test it but I think it should be good.

All you have to do now is define ReefAngel.DCPump.LowATOChannel = Sync ; // or Anti-Sync however it should be.. Then when you change the mode in the portal it will run the pump through lowato same as any other pwm port. Multiplied by 2.55 of course.
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Thu Jun 20, 2013 7:31 pm
https://github.com/lnevo/Libraries/archive/atopump.zip
PostPosted: Fri Jun 21, 2013 3:55 am
Hi Lee

Thanks for doing this, I will give it a try over the weekend and report back.
PostPosted: Sat Jun 22, 2013 8:29 am
Hi Lee

Using your new library function I have been testing the WP-25 on a spare RA board (32,225 bytes memory) with my standard build.

I am finding that both the new ReefAngel.DCPump.DaylightChannel , ReefAngel.DCPump.ActinicChannel and .DCPump.LowATOChannel , create very large INO files.

As a test I built a Vanilla file with no functionality.

This "Vanilla" .ino file had a size of 27,802 bytes

Code: Select all
#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);
   
    ReefAngel.Init();  //Initialize controller
   

 

    // Ports that are always on

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

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

void loop()
{
   
    ////// Place your custom code below here
   

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

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


The next file was Vanilla + DC pump on PWM channels had a file size of 36,798 bytes

Code: Select all
#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);
   
    ReefAngel.Init();  //Initialize controller
   
    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = None;
   
    ////// Place your custom code below here
   

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

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



The I set the file for Vanilla + DCPump.LowATOChannel, which had a complied size of 36,794 bytes.

Code: Select all
#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);
   
    ReefAngel.Init();  //Initialize controller
   

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


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DCPump.UseMemory = true;
 
    ReefAngel.DCPump.LowATOChannel = Sync ; // Jebo connected to AtoPINLow
 

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

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


The conclusion I have come to is that the V1.0.9 library files are using more memory as they have fixed bugs and increased functionality. I feel that neither of the two new DC pump options can be used with the basic RA controller even with a massively stripped down INO file.

If I have missed something or you can suggest options please let me know.

Else, I guess I will have to upgrade my RA :D (Just need to get the boss to sign off on spend!)
Next

Return to Development Libraries

Who is online

Users browsing this forum: No registered users and 4 guests