Page 1 of 1

V1.0.9 DC pump control

Posted: Wed Jun 19, 2013 4:06 pm
by Sebyte
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?

Re: V1.0.9 DC pump control

Posted: Wed Jun 19, 2013 4:15 pm
by lnevo
Not without adding support in the libraries...but it could be doable..

Re: V1.0.9 DC pump control

Posted: Wed Jun 19, 2013 6:03 pm
by Sebyte
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

Re: V1.0.9 DC pump control

Posted: Wed Jun 19, 2013 6:19 pm
by lnevo
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.

Re: V1.0.9 DC pump control

Posted: Wed Jun 19, 2013 6:57 pm
by lnevo
Looks like the way its written would be more than a few lines....but quite straight forward...hmm

Re: V1.0.9 DC pump control

Posted: Wed Jun 19, 2013 7:22 pm
by Sebyte
Give it a try when you can, many thanks!

Re: V1.0.9 DC pump control

Posted: Thu Jun 20, 2013 7:28 pm
by lnevo
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.

Re: V1.0.9 DC pump control

Posted: Thu Jun 20, 2013 7:31 pm
by lnevo

Re: V1.0.9 DC pump control

Posted: Fri Jun 21, 2013 3:55 am
by Sebyte
Hi Lee

Thanks for doing this, I will give it a try over the weekend and report back.

Re: V1.0.9 DC pump control

Posted: Sat Jun 22, 2013 8:29 am
by Sebyte
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!)

Re: V1.0.9 DC pump control

Posted: Sat Jun 22, 2013 8:52 am
by lnevo
Yes. I believe the DCPump functionality and the 1.0.9 are pretty large memory wise. I've never been a fan of the plain RA. For the $50 it's so worth it to have the extra memory!

Re: V1.0.9 DC pump control

Posted: Sat Jun 22, 2013 9:11 am
by Sebyte
Unfortunatly when I got into RA there was only one memory size, so I think the time has come to upgrade! Maybe Roberto now needs to make new users more aware of the limitation of the basic RA memory, or not make it available anymore!

Thanks again for your help.

Re: V1.0.9 DC pump control

Posted: Sat Jun 22, 2013 9:35 am
by rimai
Yeah, we've evolved to a point where staying backward compatible is becoming hard.
But the standard RA can still do a lot. Just not DC pump integrated with the Portal.
This new class is too big because it has to carry the code for all the modes so you can switch it within the Portal.
You don't really need to use. It's optional.
You should still be able to manually code just like before we started using this class, but that would be local and without Portal integration.

Re: V1.0.9 DC pump control

Posted: Sat Jun 22, 2013 9:46 am
by Sebyte
Granted, I was not trying to diss the standard RA as it can still do so much, but with all the new functions and add on's perhaps the there should be a revision to the comparison web page showing that the RA+ would be required for these new options. :)

Re: V1.0.9 DC pump control

Posted: Fri Aug 30, 2013 8:43 am
by kimacom
this is what i am looking for.
thanks

Re: V1.0.9 DC pump control

Posted: Tue Nov 17, 2015 5:34 am
by lnevo
If you search for custom portal you may find my code as a base to start. The other option is the UApp is all html5 and could run anywhere. You'd need the newest dev code for your RA and not sure what version of UApp but Roberto could chime in. The new version is needed for cross domain calls (i probably have the terminology wrong)