Home/Support/Support Forum/Grove analog temperature sensor always reads 1023

Grove analog temperature sensor always reads 1023

0 votes
Hi there,

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

Do you have any idea what I'm doing wrong? :)

The sensor I have is the 1.2 version http://wiki.seeedstudio.com/wiki/Grove_-_Temperature_Sensor_V1.2

Maybe I need to change the pull-up/pull-down settings?

Thanks

Ben
asked Sep 12, 2016 in Interface/Development Boards by bfrancis New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Which XBee modules are you working with?
answered Sep 12, 2016 by mvut Veteran of the Digi Community (12,001 points)
As I said I have the ZigBee mesh kit (http://www.digi.com/resources/documentation/Digidocs/90001942-13/#concepts/c_kit_contents.htm%3FTocPath%3D_____2), the version I have has three THT modules. That page says they're XBee ZigBee THT modules (S2C).

My co-ordinator is an XStick adn the XBee module in question is configured as a router.
You may want to change the PR command to make sure you are not pulling that ADC line high.
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.

Any other ideas?
Try setting PR so that only DI is enabled. Then set the PD again so that only DI has it pulled up.
Thank you for the suggestion. Again, that doesn't seem to have helped although I'm not sure what you meant by DI?

I set PR and PD to "80" which I think should disable pullup/pulldown on everything except the DIN pin (as advised here http://knowledge.digi.com/articles/Knowledge_Base_Article/Digital-and-analog-sampling-using-XBee-radios). I still get 1023 as the reading, floating at ~530 if I detach the sensor. It seems the settings don't have any effect.

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?
I'm afraid I never resolved this issue.

I verified with a multimeter that the sensor was behaving as expected but the board always reports the same value.

Digi support suggested it might be a firmware bug but they never offered a resolution.

It's really false advertising to suggest that the Digi board supports Grove sensors, it certainly doesn't work with this 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?
...