I've been struggling with this for a little bit by now.
I have a WindDirection measurer that goes higher than the seemingly predetermined 2500mV the datalogger assumes. This gives a problem in that when the reader reaches 2500mV it reads it out to me as 360Degrees. Anything above gives NAN, naturally. I've tried putting a resistor before it reaches the port (H1 in this case)
The wind vane I use is a Lambrecht (http://www.lambrecht.net/en/wind/sortiment-wind/moving-wind-sensors/9/windsensor-industry) and it goes from, aforementioned, 0-5V output. I have two supply wires, one connected to SW12V and one to G. The wires carrying the information are connected to H1 and ground. The code used is:
'Default CR300 Datalogger Battery Voltage measurement 'BattV'
'Default CR300 Datalogger Processor Temperature measurement 'PTemp_C'
'024A Wind Direction Sensor measurement 'WindDir'
If WindDir>=360 Or WindDir<0 Then WindDir=0
'Call Data Tables and Store Data
I have a feeling I need to increase the mV2500 to mV5000 but it refuses to have any of that when compiling. The VX1 is unused since it doesn't provide the minimum 6V the Wind vane requires.
Basically the problem is this; 0V = 0 Degrees. 2,5V = 360 Degrees. However, it SHOULD equal to 2,5V=180 Degrees
Can anyone show me the right way to do this or where to start looking?
2.5 Volts is the physical limit of the CR310.
To use a larger voltage, you need to use two resistors as a voltage divider. Look at the VDIV10:1 as an example.