Questions about the Waspmote v15 and its modules
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Wed Nov 27, 2019 10:12 am
Hi,
My last 2 sensors SU-100 return values allways > 47 umol/m^2/s-1 during the night..... where is the error ?
Code: Select all
CODE: SELECT ALL
apogee.ON();
apogee.read();
radUV = apogee.radiation;
apogee.OFF();
https://i.ibb.co/02ySkwh/2019-11-26-14- ... Mosaic.png
Answer of APOGEE:
" ... Thanks for the email. The SU-100-SS sensors should read “0” at night. .."
-
libelium-dev
- Posts: 27967
- Joined: Mon Sep 28, 2009 1:06 pm
Post
by libelium-dev » Wed Nov 27, 2019 12:01 pm
Hi,
We think that it is caused by ADC precision. Could you please copy here the output of the example code to read the SU-100 sensor? Please enable
debug mode 2 in WaspSensorXtr.h file before uploading the code to the node.
Regards
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Wed Nov 27, 2019 12:08 pm
Hi,
https://i.ibb.co/rcdM78f/18h-apogee.png
During the night in Portugal yesterday.
The value is 0.0096 V... I have the same values in 2 diffrente sensors and P&S...
But I have a third old sensor that is correct.. (Agriculture_v20).
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Wed Nov 27, 2019 1:22 pm
In your code for Apogee_SP510 you have:
Code: Select all
`
::read(void)
if (socket == XTR_SOCKET_F)
{
ltc.readADC(ADC_CH2);
radiationVoltage = ltc.readADC(ADC_CH2);
}
radiationVoltage-=0.046; <<<<<<<<<<<<<<<<<<<THIS HERE...
If I do the same (subtract 0.046) for my sensor (SU-100) I have more "plausible" values... what is this value ?
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Wed Nov 27, 2019 4:52 pm
I can "hack" the code like this:
Code: Select all
float Apogee_SU100::read(void)
{
// object to manage ADC
LTC ltc;
//Enable SPI isolator for using the ADC
digitalWrite(SPI_ISO_EN, HIGH);
// ADC setup
ltc.begin();
if (socket == XTR_SOCKET_B)
{
ltc.readADC(ADC_CH3);
radiationVoltage = ltc.readADC(ADC_CH3);
}
if (socket == XTR_SOCKET_C)
{
ltc.readADC(ADC_CH5);
radiationVoltage = ltc.readADC(ADC_CH5);
}
if (socket == XTR_SOCKET_E)
{
ltc.readADC(ADC_CH4);
radiationVoltage = ltc.readADC(ADC_CH4);
}
if (socket == XTR_SOCKET_F)
{
ltc.readADC(ADC_CH2);
radiationVoltage = ltc.readADC(ADC_CH2);
}
//Disable SPI isolator for using the ADC
digitalWrite(SPI_ISO_EN, LOW);
// check value of the sensor in volts
#if DEBUG_XTR == 2
PRINT_XTR(F("radiation (V): "));
USB.printFloat(radiationVoltage, 5);
USB.println();
#endif
radiationVoltage-=0.096; //<------------------ change this value here...
if (radiationVoltage<0){
radiationVoltage = 0;
}
// Conversion from voltage into umol·m-2·s-1
radiation = radiationVoltage / 0.0002;
// check value of the sensor in mm
#if DEBUG_XTR == 1
PRINT_XTR(F("radiation (umol*m-2*s-1): "));
USB.printFloat(radiation, 5);
USB.println();
#endif
// No way to check if sensor missing.
if (radiation <= 0)
{
// measure out of range
return 0;
}
else
{
return radiation;
}
}
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Wed Nov 27, 2019 4:52 pm
I can "hack" the code like this:
Code: Select all
float Apogee_SU100::read(void)
{
// object to manage ADC
LTC ltc;
//Enable SPI isolator for using the ADC
digitalWrite(SPI_ISO_EN, HIGH);
// ADC setup
ltc.begin();
if (socket == XTR_SOCKET_B)
{
ltc.readADC(ADC_CH3);
radiationVoltage = ltc.readADC(ADC_CH3);
}
if (socket == XTR_SOCKET_C)
{
ltc.readADC(ADC_CH5);
radiationVoltage = ltc.readADC(ADC_CH5);
}
if (socket == XTR_SOCKET_E)
{
ltc.readADC(ADC_CH4);
radiationVoltage = ltc.readADC(ADC_CH4);
}
if (socket == XTR_SOCKET_F)
{
ltc.readADC(ADC_CH2);
radiationVoltage = ltc.readADC(ADC_CH2);
}
//Disable SPI isolator for using the ADC
digitalWrite(SPI_ISO_EN, LOW);
// check value of the sensor in volts
#if DEBUG_XTR == 2
PRINT_XTR(F("radiation (V): "));
USB.printFloat(radiationVoltage, 5);
USB.println();
#endif
radiationVoltage-=0.096; //<------------------ change this value here...
if (radiationVoltage<0){
radiationVoltage = 0;
}
// Conversion from voltage into umol·m-2·s-1
radiation = radiationVoltage / 0.0002;
// check value of the sensor in mm
#if DEBUG_XTR == 1
PRINT_XTR(F("radiation (umol*m-2*s-1): "));
USB.printFloat(radiation, 5);
USB.println();
#endif
// No way to check if sensor missing.
if (radiation <= 0)
{
// measure out of range
return 0;
}
else
{
return radiation;
}
}
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Wed Nov 27, 2019 5:03 pm

Sorry for 3 posts... I need options to remove or edit
ERROR: the value of my 0 is 0.0096 not 0.096...
Do you fix this on the next API ? Today I will send this to the correct place with this "HACK" ...
-
libelium-dev
- Posts: 27967
- Joined: Mon Sep 28, 2009 1:06 pm
Post
by libelium-dev » Mon Dec 02, 2019 8:57 am
Hi,
That for your collaboration on this issue. We are going to perform some tests to know the offset and we will include it in the next API release.
Regards
-
jot4p
- Posts: 192
- Joined: Thu Apr 21, 2016 5:19 pm
Post
by jot4p » Mon Jan 06, 2020 6:41 pm
OK... the current version is 43
-
libelium-dev
- Posts: 27967
- Joined: Mon Sep 28, 2009 1:06 pm
Post
by libelium-dev » Wed Jan 08, 2020 10:01 am
Hi,
The API v043 was released in November, just before that problem. It will be included in the next API v044.
Regards
Who is online
Users browsing this forum: No registered users and 1 guest