XBee ADC value has a 10mV difference

Hello,

I have a XBee S2B router which send its ADC values to the coordinator (once every minute)

When there is a low Voltage value on the pin, below 10mV it is seen always as 0. (did this test with a few different Xbee’s).
When the input on the ADC is above 10mV the ADC gives numbers above 0.

A few examples of ADC measurements:
used (ADC/1023)*1.2 to calculate the voltage from the ADC.

68.4mV Multi meter; ADC 49 => 57.5 mV
300.7mV Multi meter; ADC 248 => 290.9 mV
928.0mV Multi meter; ADC 783 => 917 mV

Firmware version Router: 22A7

Using the https://pypi.python.org/pypi/XBee XBee-2.1.0 library to readout the frames/values.

My question is why does the ADC does not detect values below 10mV and why are the ADC readings 10mV lower?

Thanks!
Jasper

Jasper, what is the actual API frame provided from the radio?

Hi mvut, thanks for your question.

7E 00 14 92 00 13 A2 00 40 B4 E3 54 55 FB 01 01 00 00 81 03 0F 0A CC D2

- Start delimiter: 7E
- Length: 00 14 (20)
- Frame type: 92 (Zigbee IO Data Sample RX Indicator)
- 64-bit source address: 00 13 A2 00 40 B4 E3 54
- 16-bit source address: 55 FB
- Receive options: 01
- Number of samples: 01
- Digital channel mask: 00 00
- Analog channel mask: 81
- Analog sample: 03 0F 0A CC

So two samples first one ADC-0 (030F) second one ADC-7 (power level, 0ACC).
030F = 783

783/1023*1.2= 918.4 mV
multiemeter gives 927mV

Still around 10mV difference.

Thanks,
Jasper

and an other sample with low Voltage, below 10mV:

Zigbee IO Data Sample RX Indicator

7E 00 14 92 00 13 A2 00 40 B4 E3 54 55 FB 01 01 00 00 81 00 00 0A CC E4

- Start delimiter: 7E
- Length: 00 14 (20)
- Frame type: 92 (Zigbee IO Data Sample RX Indicator)
- 64-bit source address: 00 13 A2 00 40 B4 E3 54
- 16-bit source address: 55 FB
- Receive options: 01
- Number of samples: 01
- Digital channel mask: 00 00
- Analog channel mask: 81
- Analog sample: 00 00 0A CC
- Checksum: E4

So this gives 00 00.

The multimeter give: 5.4mV

Thanks,
Jasper

Jasper, you can see with the actual API frame that you are not getting a 0 value. If you calculating a 0 value from the 00 0A CC value, then there is an issue with your Code and not the radio.

mvut thanks for the quick reply.

This frame has two ADC value, I believe it should be read like this:

  • Analog channel mask: 81
  • Analog sample: 00 00 0A CC

00 00 = ADC-0 (should be 5.4mV)
0A CC = ADC-7 (Supply voltage High Threshold V+)


Below I took a new sample frame without ADC-7 (Supply voltage High Threshold V+):
Zigbee IO Data Sample RX Indicator

7E 00 12 92 00 13 A2 00 40 B4 E3 54 55 FB 01 01 00 00 01 00 00 3A

- Start delimiter: 7E
- Length: 00 12 (18)
- Frame type: 92 (Zigbee IO Data Sample RX Indicator)
- 64-bit source address: 00 13 A2 00 40 B4 E3 54
- 16-bit source address: 55 FB
- Receive options: 01
- Number of samples: 01
- Digital channel mask: 00 00
- Analog channel mask: 01
- Analog sample: 00 00
- Checksum: 3A

So this give ADC-0=00 00
and my multi meter gives 9.3mV

Thanks,
Jasper

Jasper,. the only thing I can think of that would cause this is if you had the lines switched and are actually providing a negative voltage. In that situation, the value would be 0.