Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Hydroponics board EC resistance
PostPosted: Thu Oct 26, 2017 1:32 pm 

Joined: Thu Oct 26, 2017 1:17 pm
Posts: 1
Hello,

I have the hydroponics board from cooking hacks and I received it with both the EC and pH probes.
Everything was working fine with the EC until I changed the probe. Even though I recalibrate with the new probe, the value is off by a few points (I double check with a separate digital EC probe).

After digging in the code and understanding the equation I see that the missing link is calculating the resistance.
In the repository the resistance is calculated with values that "Have been obtained experimentally" (Pasted below) and I have no clue how to obtain them myself.

My question then is:
- Are these values dependent on the probe as well as the circuit? For this reason, another probe would need different values?

- If this is the case, how can I replicate the experiments to get it with a different probe?

Thanks

```
#define SW_COND_CAL_01 0.0271
#define SW_COND_CAL_02 0.0365
#define SW_COND_CAL_03 0.0478
#define SW_COND_CAL_04 0.0676
#define SW_COND_CAL_05 0.1151
#define SW_COND_CAL_06 0.1997
#define SW_COND_CAL_07 0.3190
#define SW_COND_CAL_08 0.3698
#define SW_COND_CAL_09 0.5047
#define SW_COND_CAL_10 0.5990
#define SW_COND_CAL_11 0.6860
#define SW_COND_CAL_12 0.7642
#define SW_COND_CAL_13 0.8694
#define SW_COND_CAL_14 0.8754
#define SW_COND_CAL_15 0.9076
#define SW_COND_CAL_16 0.9931


float conductivityClass::resistanceConversion(float input)
{
float value;

input = input / 2.64;

// These values have been obtained experimentaly
if(input<=SW_COND_CAL_01)
value = 0;

else if(input<SW_COND_CAL_02)
value = 100 * (input-SW_COND_CAL_01)/(SW_COND_CAL_02-SW_COND_CAL_01);

else if(input<SW_COND_CAL_03)
value = 100 + 120 * (input-SW_COND_CAL_02)/(SW_COND_CAL_03-SW_COND_CAL_02);

else if(input<SW_COND_CAL_04)
value = 220 + 220 * (input-SW_COND_CAL_03)/(SW_COND_CAL_04-SW_COND_CAL_03);

else if(input<SW_COND_CAL_05)
value = 440 + 560 * (input-SW_COND_CAL_04)/(SW_COND_CAL_05-SW_COND_CAL_04);

else if(input<SW_COND_CAL_06)
value = 1000 + 1200 * (input-SW_COND_CAL_05)/(SW_COND_CAL_06-SW_COND_CAL_05);

else if(input<SW_COND_CAL_07)
value = 2200 + 2200 * (input-SW_COND_CAL_06)/(SW_COND_CAL_07-SW_COND_CAL_06);

else if(input<SW_COND_CAL_08)
value = 4400 + 1200 * (input-SW_COND_CAL_07)/(SW_COND_CAL_08-SW_COND_CAL_07);

else if(input<SW_COND_CAL_09)
value = 5600 + 4400 * (input-SW_COND_CAL_08)/(SW_COND_CAL_09-SW_COND_CAL_08);

else if(input<SW_COND_CAL_10)
value = 10000 + 5000 * (input-SW_COND_CAL_09)/(SW_COND_CAL_10-SW_COND_CAL_09);

else if(input<SW_COND_CAL_11)
value = 15000 + 7000 *(input-SW_COND_CAL_10)/(SW_COND_CAL_11-SW_COND_CAL_10);

else if(input<SW_COND_CAL_12)
value = 22000 + 11000 * (input-SW_COND_CAL_11)/(SW_COND_CAL_12-SW_COND_CAL_11);

else if(input<SW_COND_CAL_13)
value = 33000 + 14000 * (input-SW_COND_CAL_12)/(SW_COND_CAL_13-SW_COND_CAL_12);

else if(input<SW_COND_CAL_14)
value = 47000 + 21000 *(input-SW_COND_CAL_13)/(SW_COND_CAL_14-SW_COND_CAL_13);

else if(input<SW_COND_CAL_15)
value = 68000 + 32000 * (input-SW_COND_CAL_14)/(SW_COND_CAL_15-SW_COND_CAL_14);

else
value = 100000+900000*(input-SW_COND_CAL_15)/(SW_COND_CAL_16-SW_COND_CAL_15);

return value;
}
```


Top
 Profile  
 
 Post subject: Re: Hydroponics board EC resistance
PostPosted: Fri Oct 27, 2017 8:13 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 10795
Hello y-sherbini,

you only have to calibrate the probe, and not the hardware. We recommend not changing tha values in the library.

In order to calibrate the probe you will need Conductivity Calibration Kit:
https://www.cooking-hacks.com/documentation/tutorials/open-garden-hydroponics-irrigation-system-sensors-plant-monitoring/#step6_5

And follow the steps in the tutorial:
https://www.cooking-hacks.com/documentation/tutorials/open-garden-hydroponics-irrigation-system-sensors-plant-monitoring/#step6_5
In "Calibrating the sensor" step.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use.