Home/Support/Support Forum/Problems using XBee S2C ADC Channels

Problems using XBee S2C ADC Channels

0 votes
I’m having problems using XBee S2C ADC Channels?

I’m trying to make sense of the results I’m getting from my ADC when measuring voltage.

The documentation suggests using the formula found on page 131 of the XBee / XBee-PRO ZigBee RF Modules User Guide PN: 90002002 T

I/O Sampling - Convert A/D reading to mV

0x0000 represents 0 V
0x3FF = 1.2 V

AD(mV) = (A/D reading * 1200mV) / 1023

I’m using XCTU v6.2 Console to view the results and I’ve tied the A0 to Gnd 0V using a 1K resistor the output shows 0x010. Strange! When I tie the A0 to VCC 3.3V VCC using a 1K resistor the output shows 0x3FF. Great!

The Formula is wrong or my ADC is wrong or XCTU is wrong. Which is it?

If it’s the formula, could I have the correct one and the documentation needs updating?
If it’s the ADC then what do I do?
If it’s the XTCU then what do I do?
My updated formula to Convert A/D reading to mV

0x010 (16 Dec) = 0mV
0x3FF (1023 Dec) = 1200mV

ADC_Offset = (1023-ADC)*(16/(1023-16))

AD(mV) = ((ADC_reading - ADC_Offset) * 1200mV) / 1023
asked Oct 23, 2015 in RF Solutions and XBee by AndyDale New to the Community (10 points)

Please log in or register to answer this question.

1 Answer

0 votes
Try disabling the internal pull up resistor command (PR) and see if that fixes it.
answered Oct 23, 2015 by mvut Veteran of the Digi Community (11,300 points)
Thanks for the response but the ADC_readings are still not the expected 0x00 when A0 it is tied down to GND 0V.

All Pull-up resistors are disabled. RP = 0
D0 is set to ADC(2). D0 = 2

A0 (Pin 20) is connected directly to 0V (GND). I’ve also connected and disconnected VRef to VCC but it doesn’t seem to change anything.
I’ve tested this on 5 separate XBee S2C units and ALL are showing me that there is a problem.

I’m also using various test rigs: 3V Battery, 3V Bench PSU, USB Adapter, Arduino UNO Shield and Arduino NANO Shield.

Test Results:
1, XBee S2C PCB, XB24CZ7PIT-004, VCC=3v3, A0=0V, ADC_Reading=0x10
2, XBee S2C RP-SMA, XB24CZ7SIT-004, VCC=3v3, A0=0V, ADC_Reading=0x12
3, XBee S2C U.FL, XB24CZ7UIT-004, VCC=3v3, A0=0V, ADC_Reading=0x15
4, XBee S2C WIRE, XB24CZ7WIT-004, VCC=3v0, A0=0V, ADC_Reading=0x11
5, XBee S2C WIRE, XB24CZ7WIT-004, VCC=3v3, A0=0V, ADC_Reading=0x12

I’m using the latest version of XCTU v6.2 on a Windows 7 (64bit) Workstation.
All XBees are currently loaded with the latest Firmware Version 4059. I initially completed the test on Firmware Version 4055 but installed the latest hoping the ADC problem would go away but it didn’t and the results stayed the same.
I’m currently having to individually calibrate each XBee unit by setting A0=0V and plugging the resulting ADC_reading into my ADC_Offset formula.
Clearly there is a problem with the ADS Readings what do I do next?
I would suggest mounting the radio on an XBIB board and seeing what you get. After all that is what Digi Tech support is going to ask you to do if you were to contact them.
I would also want to see the full API frame you are receiving on XCTU to verify that it is not an issue with your code.
...