Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

NAN Value appears in SKP215 sensor


demenderashika Mar 7, 2012 11:09 AM

I write a program, adapted from my friend in Europe.
Here we measure surface temperature with IR120 infrared sensor, humidity with HMP60 and a pyranometer SKP215.
I use all this sensors for my CR3000 data logger.
All data was recorded as I want but I don't have any idea, why this NAN value appears anywhere in pryranometer data.


Here is my program :
'Declaration des constantes
'Coefficients de calibration des 4 capteurs IR120
'capteur E1242 10m de cable
Const Coef_A_E1242 = 9.298958E-04
Const Coef_B_E1242 = 2.208489E-04
Const Coef_C_E1242 = 1.364030E-07
Const Coef_X_E1242 = 1.858961E-05
Const Coef_Y_E1242 = 3.886185E-01
Const Coef_Z_E1242 = -4.227004E-01
'capteur E1258 30m de cable
Const Coef_A_E1258 = 9.460563E-04
Const Coef_B_E1258 = 2.186350E-04
Const Coef_C_E1258 = 1.404913E-07
Const Coef_X_E1258 = 1.847750E-05
Const Coef_Y_E1258 = 4.068798E-01
Const Coef_Z_E1258 = -5.372140E-01
'capteur E1259 30m de cable
Const Coef_A_E1259 = 9.334583E-04
Const Coef_B_E1259 = 2.189924E-04
Const Coef_C_E1259 = 1.410573E-07
Const Coef_X_E1259 = 1.930582E-05
Const Coef_Y_E1259 = 3.992166E-01
Const Coef_Z_E1259 = -5.205968E-01
'capteur E1260 30m de cable
Const Coef_A_E1260 = 9.483621E-04
Const Coef_B_E1260 = 2.177596E-04
Const Coef_C_E1260 = 1.464052E-07
Const Coef_X_E1260 = 1.742884E-05
Const Coef_Y_E1260 = 3.757331E-01
Const Coef_Z_E1260 = -3.997537E-01

'Emissivite = 1.00
Const Emissivite = 1.00

'Declaration Variables publiques et internes
Public PTemp, batt_volt
Dim CPT
Dim Mes_Pont(4) 'The Measured Bridge Resistance
Dim R_Thermist(4) 'Thermistor Resistance
Public T_Thermist(4) 'Thermistor Temperature in Celsius
Dim U_Thermo(4) 'The Measured Thermopile Voltage
Dim U_Thermo_Comp(4) 'The Measured Thermopile Voltage – Temp Compensated
Dim Dif_Energie(4) 'Energy Difference
Dim T_Surf_noir_puis_4(4) 'Black body surface temperature to the power 4
Dim T_Surf_noir(4) 'Black body surface temperature in Kelvin - Uncorrected
Public T_Surface(4) 'Corrected Surface Temperature in Celsius
Public AirTC 'Air Temperature HMP60
Public RH 'Relative Humidity HMP60
Public Pyrano 'Rayonnement global Pyranometre SKP215

'Declaration table de sortie
DataTable (CR3000,1,-1)
DataInterval (0,5,Min,10)
CardOut(0,500000)
Average (1,PTemp,FP2,False)
Average (1,batt_volt,FP2,False)
Average (4,T_Surface(),FP2,False)
StdDev (4,T_Surface(),FP2,False)
Average (1,AirTC,FP2,False)
Average (1,RH,FP2,False)
Average (1,Pyrano,FP2,False)
StdDev (1,Pyrano,FP2,False)
EndTable

'Main Program
BeginProg
Scan (10,Sec,0,0) 'Une lecture toutes les 10 secondes
PanelTemp (PTemp,250) 'Date,heure and Co
Battery (batt_volt) 'Niveau de la batterie

'Mesure de la temperature du corps de l'IR120
'--------------------------------------------
'Mesure thermistance en V (demi-pont avec alim. -2.5V)
BrHalf (Mes_Pont(1),1,mv5000,1,Vx1,1,-2500,False,20000,_50Hz,1.0,0)
BrHalf (Mes_Pont(2),1,mv5000,2,Vx1,1,-2500,False,20000,_50Hz,1.0,0)
BrHalf (Mes_Pont(3),1,mv5000,7,Vx2,1,-2500,False,20000,_50Hz,1.0,0)
BrHalf (Mes_Pont(4),1,mv5000,8,Vx2,1,-2500,False,20000,_50Hz,1.0,0)

'Multiplication du ratio mesure en V par la constante appropriee pour chacun des capteurs
For CPT = 1 To 4
R_Thermist(CPT)=77020*(Mes_Pont(CPT)/(1-Mes_Pont(CPT)))
Next CPT

'Utilisation de la relation de Steinhart-hart avec les coef de calibr pour obtenir la temperature du corps de capteur en deg C
T_Thermist(1)=1/(Coef_A_E1242+Coef_B_E1242*LN(R_Thermist(1))+Coef_C_E1242*(LN(R_Thermist(1)))^3)-273.15
T_Thermist(2)=1/(Coef_A_E1258+Coef_B_E1258*LN(R_Thermist(2))+Coef_C_E1258*(LN(R_Thermist(2)))^3)-273.15
T_Thermist(3)=1/(Coef_A_E1259+Coef_B_E1259*LN(R_Thermist(3))+Coef_C_E1259*(LN(R_Thermist(3)))^3)-273.15
T_Thermist(4)=1/(Coef_A_E1260+Coef_B_E1260*LN(R_Thermist(4))+Coef_C_E1260*(LN(R_Thermist(4)))^3)-273.15

'Mesure de la temperature infrarouge donnee par l'IR120
'------------------------------------------------------
'Mesure de la temperature infrarouge avec utilisation de l'instruction mesure "full bridge", pas d'excitation reverse et temps de stab. avant mesure = 78 ms.
ExciteV (Vx1,2500,0)
Delay (0,75,mSec)
BrFull (U_Thermo(1),2,mV1000,2,Vx1,2,2500,False,False,0,_50Hz,2.5,0)

ExciteV (Vx2,2500,0)
Delay (0,75,mSec)
BrFull (U_Thermo(3),2,mV1000,5,Vx2,2,2500,False,False,0,_50Hz,2.5,0)

'Correction U pour compensation en temperature
For CPT=1 To 4
U_Thermo_Comp(CPT)=U_Thermo(CPT)*1.0004^(T_Thermist(CPT)-25)
Next CPT

'Application des coef. pour calcul dif. energie
Dif_Energie(1)=Coef_X_E1242*U_Thermo_Comp(1)^2+Coef_Y_E1242*U_Thermo_Comp(1)+Coef_Z_E1242
Dif_Energie(2)=Coef_X_E1258*U_Thermo_Comp(2)^2+Coef_Y_E1258*U_Thermo_Comp(2)+Coef_Z_E1258
Dif_Energie(3)=Coef_X_E1259*U_Thermo_Comp(3)^2+Coef_Y_E1259*U_Thermo_Comp(3)+Coef_Z_E1259
Dif_Energie(4)=Coef_X_E1260*U_Thermo_Comp(4)^2+Coef_Y_E1260*U_Thermo_Comp(4)+Coef_Z_E1260

'Somme diff energie + energie absolue du corps de capteur
For CPT = 1 To 4
T_Surf_noir_puis_4(CPT)=(Dif_Energie(CPT)/5.67E-8)+((T_Thermist(CPT)+273.15)^4)
Next CPT

'Calcul de la temperature de surface en Kelvin
For CPT = 1 To 4
T_Surf_noir(CPT)=(T_Surf_noir_puis_4(CPT)^0.25)
Next CPT

'Correction pour l'emissivite et conversion en deg. centigrade
For CPT = 1 To 4
T_Surface(CPT)=((T_Surf_noir_puis_4(CPT)-(((T_Thermist(CPT)+273.15)^4)*(1-Emissivite)))/Emissivite)^0.25-273.15
Next CPT

'HMP60 Temperature & Relative Humidity Sensor measurements AirTC and RH:
VoltSe(AirTC,1,mV5000,13,0,0,_60Hz,0.1,-40.0)
VoltSe(RH,1,mV5000,14,0,0,_60Hz,0.1,0)
If (RH>100) AND (RH<108) Then RH=100

'Pyranometre (mesure diffrentielle)
VoltSe (Pyrano,1,mV20,15,True ,0,_60Hz,100,0)

CallTable (CR3000)
NextScan
EndProg


Is the problem occurs because of my program or something else?

Thank you


aps Mar 7, 2012 11:28 AM

I suggest you check the wiring of the SKP215 sensor. Your comment says "mesure differentielle", but the measurement used is a single ended voltage instruction.

Also what range of quantum flux are you subjecting the sensor to. The voltage range should be OK for natural sunlight by might just go over-range if subjected to just above sunlight levels.


demenderashika Mar 7, 2012 02:48 PM

I will check again the wiring of SKP215 sensor.
It just comment from my friend as in their original program.

Could you explain me more about range of quantum flux?

In my mind, here we set up this sensor to measure the solar radiation


aps Mar 7, 2012 03:18 PM

An SKP215 sensor is a quantum flux sensor that is scaled to output 20 mV at 2000 micromols/m^2/s photon flux which is the normal maximum quoted for full sunlight.

If the sensor is subject to higher light levels it will produce more than 20 mV and exceed the voltage input range specified in your VoltSE instruction which could lead to a NaN reading.


demenderashika Mar 8, 2012 09:32 AM

based on my data,
the NAN value appears between 11.00 to 14.00, do you think is possible if around this solar noon time, SKP215 sensor produce more than 20mV?

and sometimes I get a maximum value around 2155 but the maximum value is 2000 micromols/m^2/s, .

In this case, could you give me your advice?


aps Mar 8, 2012 11:23 AM

I would be surprised if you got more that 2000, although it is not impossible with reflections of clouds adding to the direct beam component from the sun.

As an interim measure try changing the range of the voltage measurement to mV50 which will stop the NaN values if the problem is the sensor is simple outputting a little too high voltage.

However, I would also double check the wiring as you can get reading that appear correct even with a disconnected ground wire (say if the sensor had been wired differentially or you had connected the current output). Also check the calibration certificate of the sensor as its output may differ significantly from the standard value of 10 uV/umol/m^2/s . (All the sensors should have this standard calibration)

* Last updated by: aps on 3/8/2012 @ 4:29 AM *

Log in or register to post/reply in the forum.