I have the ZigBee mesh kit and I bought the Grove (analog) temperature sensor. The sensor is plugged into the AD2 port of the Grove developer board which is configured for analog input (ADC) but the reading I’m getting always seems to be 1023 (which I assume is the maximum value).
I’ve tried two different temperature sensors and both have the same result. If I unplug the sensor I get a lower value.
I don’t think these details are important but:
The XBee is configured to sample every two seconds
I’m listening on an XStick connected to the same ZigBee network
I’m watching the output in the terminal of XCTU but I get the same output when using the Java library
I tried changing PR from 1FBF (0001 1111 1011 1111) to 1FBB (0001 1111 1011 1011) so that bit 2 is set to zero (which is the bit the tooltip in XCTU says corresponds to AD2) but I still get the same readings, 1023.
I know the ADC is working because if I short VCC to SIG I get 1023 and if I short GND to SIG I get close to 0 (about 18).
I know the sensor is working because if I attach VCC and GND I get about 1v on SIG which I think is about right for room temperature.
Digi have advised me that PR only effects digital inputs, not analog inputs, which would explain it. But they’re not sure what the problem is, perhaps in the XBee firmware or the Grove development board.
I find this surprising as I thought the whole point of the Grove board was to work with Grove sensors. Surely someone must have come across this problem before?
That is unless I’m doing something else wrong.
Also note that I’m successfully able to transmit the value of the built-in potentiometer on AD3 and that plugging the temperature sensor into AD0 gives the same results as plugging it into AD2.
I think I found the issue. The V1.2 for the Sensor refers to the Version number of the sensor and not the voltage. The voltage level of the sensor is as follows:
Voltage: 3.3 ~ 5V
Zero power resistance: 100 KΩ
Resistance Tolerance: ±1%
Operating temperature range: -40 ~ +125 ℃
Nominal B-Constant: 4250 ~ 4299K
The Analog input on the XBee and associated Grove board is from 0 - 1.2V Max. Hence why you keep getting values Maxed out on the radio as the temp in your room causes the sensor to output more than 1.2V.
@mvut Thank you for the explanations, I’ve got exactly the same problem.
Can you just please help me on how to solve the issue?
Should I just add a resistance between the sensor and the analog input? If so, which one?
There are 100’s of grove sensors all using different interfaces. Have you looked through the Grove board documentation to see what line are connected to what pins and how to make the connections?