ORP as a controller
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
ORP as a controller
Can i use the orp expantion as a controller to turn ozone unit on and off?
Re: ORP as a controller
Yes, you can do this. I do not believe this functionality is built into the libraries. You can do something like this:butcherman wrote:Can i use the orp expantion as a controller to turn ozone unit on and off?
Code: Select all
if (ReefAngel.Params.ORP >= 400 ) ReefAngel.Relay.Off(Port8);
if (ReefAngel.Params.ORP <= 300 ) ReefAngel.Relay.On(Port8);
You would place this code inside your loop() along with the other functions. You can also change the values. I do not know what values are good for ORP, so I just picked some to use as an example.
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
Can i use the ph funcion on port8 on the wizzard and change the ph code to orp code?
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
will this work
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 <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 280 );
// Ports that are always on
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardATO( Port1,120 );
ReefAngel.StandardLights( Port2,7,0,20,0 );
ReefAngel.StandardLights( Port3,7,0,20,0 );
ReefAngel.StandardFan( Port4,250,260 );
ReefAngel.StandardHeater( Port5,240,250 );
ReefAngel.StandardHeater( Port7,240,250 );
if (ReefAngel.Params.ORP >= 400 ) ReefAngel.Relay.Off(Port8);
if (ReefAngel.Params.ORP <= 300 ) ReefAngel.Relay.On(Port8);
ReefAngel.PWM.SetDaylight( PWMParabola(9,0,20,0,11,100,11) );
ReefAngel.PWM.SetActinic( PWMParabola(9,0,20,0,10,100,10) );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "butcherman" );
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();
// ORP
ReefAngel.LCD.DrawText( COLOR_PALEVIOLETRED,DefaultBGColor,75,66, "ORP:" );
ReefAngel.LCD.DrawText( COLOR_PALEVIOLETRED,DefaultBGColor,99,66, ReefAngel.Params.ORP );
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 93, TempRelay );
pingSerial();
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
i incorperated it in the coderimai wrote:No, it won't work
You will need to use the code posted by binder
void loop()
{
ReefAngel.StandardATO( Port1,120 );
ReefAngel.StandardLights( Port2,7,0,20,0 );
ReefAngel.StandardLights( Port3,7,0,20,0 );
ReefAngel.StandardFan( Port4,250,260 );
ReefAngel.StandardHeater( Port5,240,250 );
ReefAngel.StandardHeater( Port7,240,250 );
if (ReefAngel.Params.ORP >= 400 ) ReefAngel.Relay.Off(Port8);
if (ReefAngel.Params.ORP <= 300 ) ReefAngel.Relay.On(Port8);
ReefAngel.PWM.SetDaylight( PWMParabola(9,0,20,0,11,100,11) );
ReefAngel.PWM.SetActinic( PWMParabola(9,0,20,0,10,100,10) );
////// Place your custom code below here
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
thx, as soon as i get some orp calibration fluid ill try it out.
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
if i change the library code can i use 220mV calibration fluid?
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
Thanks will see what i can get me hands on.
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
how do I know if the orp expansion os working. I have a STD pwm module wifi unit and orp expansion module. I have loaded the code and ,injected the expansion module. The orp readout remains 0 even in calibration fluid. After calibration. There are do values displayed during calibration either besides 0. What should I try to test the expansion module or the USB port on the relay box?
Sent from my GT-I9100 using Tapatalk 2
Sent from my GT-I9100 using Tapatalk 2
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
I will re-check that.
Anything else?
Sent from my GT-I9100 using Tapatalk 2
Anything else?
Sent from my GT-I9100 using Tapatalk 2
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
My unit only had one jumper I had only moved it. I added a second and it and now it seems to be working. do I need both jumpers inplace?
Sent from my GT-I9100 using Tapatalk 2
Sent from my GT-I9100 using Tapatalk 2
Re: ORP as a controller
You need all 3.
If you are missing any and don't have laying around, send me a PM
If you are missing any and don't have laying around, send me a PM
Roberto.
-
- Posts: 44
- Joined: Thu Apr 05, 2012 11:14 am
Re: ORP as a controller
I have spares from old hard drives and cdroms, I'll put in all 3
Sent from my GT-I9100 using Tapatalk 2
Sent from my GT-I9100 using Tapatalk 2