Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Help on using a non suported type of Soil Moisture Sensor
#1

Hello

I have a Problem to configure the analog sensors on SoilLeaf_Interface.
I must use:
METHOD 2 - Used for any sensor which have a linear output between voltage and VWC (0V=0VWC, maxV=100VWC) .

In the config file i read:
Quote:Max and Min output voltage of the analog sensors connected to Soil / Leaf Interface
Default value for Decagon Devices LWS Leaf Wetness Sensor (5V power): Max. Output Voltage - 1400mV (max wetness), Min Output Voltage - 530mV (dry)

//                                                                         ADC1  ADC2  ADC3  ADC4  
const unsigned int AnalogSensor_MaxVoltOut[4]   = { 5000, 5000, 5000, 5000 };    // Values in miliVolt
const unsigned int AnalogSensor_MinVoltOut[4]   = {    0,    0,    0,    0 };

But my sensors have 5000mV (dry) and 530 mV (max. wetness). Can i configure (ADC3 and ADC4 not in use):

                                                                            ADC1  ADC2  ADC3  ADC4  
const unsigned int AnalogSensor_MaxVoltOut[4]   = { 530, 530, 5000, 5000 };
const unsigned int AnalogSensor_MinVoltOut[4]   = { 5000,5000,    0,    0 };

or
                                                                             ADC1  ADC2  ADC3  ADC4  
const unsigned int AnalogSensor_MaxVoltOut[4]   = { 5000, 5000, 5000, 5000 };
const unsigned int AnalogSensor_MinVoltOut[4]   = {   530,   530,    0,    0 };

But if its dry, the Station say 100% wetness ? Where i can negate the Logic?

Regards
Reply
#2

Hi,

Firstly I had to say that I changed the topic title from "Pro 2 analog Sensor Problem" to "Help on using a non supported type of Soil Moisture Sensor", because doesn't seem fair titling the exposed question as problem of the Pro2 system.

I do my best to try to support the wider range of sensor possible, but obviously, supporting all types and variants are not possible.

Now, let's try to solve your specific situation. As you correctly noticed, the Pro2 is expecting a sensor which increases the output voltage in proportion to vmc

Code:
METHOD 2 - Used for any sensor which have a linear output between voltage and VWC (0V=0VWC, maxV=100VWC) .


Code:
const unsigned int AnalogSensor_MaxVoltOut[4]   = { 5000, 5000, 5000, 5000 };
const unsigned int AnalogSensor_MinVoltOut[4]   = {   530,   530,    0,    0 };

But if its dry, the Station say 100% wetness ? Where i can negate the Logic?

Can you please tell me what software version are you using? maybe it isn't too hard doing what you want.
Thank you

Reply
#3

Hello Werk AG

Yes is it not the Problem of thr Pro 2. The not supported Sensor is the Problem.

I use WeatherDuino Pro2 TX v2.0_B015 and RX v2.0 b019.

I use this sensor: http://www.ebay.de/itm/380862391374?_trk...EBIDX%3AIT

http://www.ebay.de/itm/321294378481?_trk...EBIDX%3AIT with the same Board like the first.

Regards
Reply
#4

Hi,

Its ok.

In your RX software, go to the RX_TX tab and find line 294
Replace the content of that line with this code:

Code:
       Soil_Data[i][1] = map(RX_Data[SoilMoist_Source[i][1] + 2], AnalogSensor_MinVoltOut[SoilMoist_Source[i][1]], AnalogSensor_MaxVoltOut[SoilMoist_Source[i][1]], 100, 0);

I can't guarantee, but I think this will do the trick. You will let me know  Smile

In the config use:

Code:
const unsigned int AnalogSensor_MaxVoltOut[4]   = { 5000, 5000, 5000, 5000 };
const unsigned int AnalogSensor_MinVoltOut[4]   = {   530,   530,    0,    0 };

Regards

Reply
#5

Hello Werk AG

Thanks for fast answer. I will test it and report.

Regards
Reply
#6

Hello

Now my Report.

That works:


Quote:Soil_Data[i][1] = map(RX_Data[SoilMoist_Source[i][1] + 2], AnalogSensor_MaxVoltOut[SoilMoist_Source[i][1]], AnalogSensor_MinVoltOut[SoilMoist_Source[i][1]], 0, 100);

Quote: Leaf_Data[i][1] = (int)(map(RX_Data[LeafWet_Source[i][1] + 2], AnalogSensor_MaxVoltOut[LeafWet_Source[i][1]], AnalogSensor_MinVoltOut[LeafWet_Source[i][1]], 0, 15));
 
Thanks for your support.

Regards
Reply
#7

It will be interesting to see how accurate the results will be. I have been looking at the Arduino components Speedy68 listed in his post above myself; mostly because of the price point.

I guess the down side will be the length on the soil sensor, depending on how it is mounted and how long the leaf wetness sensor lasts in the weather too.

Keep us informed on how you get on and what your results are like.

Regards,
PalmyWeather
Reply
#8

(23-03-2017, 22:30)Speedy68 Wrote:  Now my Report.

That works:

Code:
Soil_Data[i][1] = map(RX_Data[SoilMoist_Source[i][1] + 2], AnalogSensor_MaxVoltOut[SoilMoist_Source[i][1]], AnalogSensor_MinVoltOut[SoilMoist_Source[i][1]], 0, 100);

Code:
Soil_Data[i][1] = map(RX_Data[SoilMoist_Source[i][1] + 2], AnalogSensor_MinVoltOut[SoilMoist_Source[i][1]], AnalogSensor_MaxVoltOut[SoilMoist_Source[i][1]], 100, 0);

I think both produce the same result. In one we are reversing the input values, on the other we are reversing the condition for the output values.
The important is that is working as needed.

Thank you too for the feedback.
Regards

Reply
#9

Hello PalmyWeather 

At the moment my Weatherduino is in building process. If i have installed we will see for the other points.

I will report here.

Regards
Reply
#10

(24-03-2017, 00:34)Palmyweather Wrote:  It will be interesting to see how accurate the results will be. I have been looking at the Arduino components Speedy68 listed in his post above myself; mostly because of the price point.

With those type of devices, the better you could expect is to have a representation of the amount of water in the soil, not properly the volumetric water content. Condutivity of the soil is not linear with water content, and also depends of the type of soil, salinity etc... I'm not the guy to talk about this, but believe me, this matter is complex.

When I was developing the Soil / Leaf interface, I learned something about it with our tester / developer JT118.

Reply




Users browsing this thread: 1 Guest(s)