# How to include the Battery Level in a sample frame?

**URL:** <https://forums.digi.com/t/how-to-include-the-battery-level-in-a-sample-frame/18497>\
**Category:** XBee & XBee Gateway\
**Tags:** battery, xbee-900hp, sampling, frame\
**Created:** [June 30, 2017, 3:41pm UTC](https://forums.digi.com/t/how-to-include-the-battery-level-in-a-sample-frame/18497 "2017-06-30T15:41:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manart](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@manart](https://forums.digi.com/u/manart)\
**Post date:** [June 30, 2017, 3:41pm UTC](https://forums.digi.com/t/how-to-include-the-battery-level-in-a-sample-frame/18497/1 "2017-06-30T15:41:20Z")

</div>

Hello,

I would like to know how can I send the battery level of the device in a sample frame (this would be the power source connected to 3.3v of the XBee). I read in the product manual that there is a bit in the Analog Channel Mask that would indicate if this value should be sent or not. More specifically, for frames of type 0x92 (Data Sample Rx Indicator) they say:

“If the sample set includes any analog input lines (Analog  
Channel Mask \> 0), each enabled analog input returns a  
2-byte value indicating the A/D measurement of that  
input. Analog samples are ordered sequentially from  
AD0/DIO0 to AD3/DIO3, to the supply voltage.”

An example of the frames I am receiving is this:

7E 00 1A 92 00 13 A2 00 40 AD 36 37 FF FE C1 01 00 10 0F 00 10 03 FC 03 FF 03 FF 03 FF 6B

As you see, I have 1 digital input activated as well as 3 analog inputs. The readings of this last 3 pins are 03FF, 03FF and 03FF. However I cannot see the battery level anywhere in this data. I assume 6B is the checksum.

I am also able to read the battery level of the XBee, if it is connected to the computer using an XBee Explorer and using X-CTU. The parameter “%V Supply Voltage” would give me that.

It would be great if I could include the battery level in the same frame of the samples. Do you know if there is a way to include it?. The model of my device is XBee PRO S3B and the function set is XBee PRO 900HP 200K.

Thanks!

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [June 30, 2017, 3:53pm UTC](https://forums.digi.com/t/how-to-include-the-battery-level-in-a-sample-frame/18497/2 "2017-06-30T15:53:10Z")

</div>

I think you read the wrong manual for the nodule you have. [https://www.digi.com/resources/documentation/digidocs/90002173/Default.htm#reference/r\_frame\_0x92.htm%3FTocPath%3DOperate%2520in%2520API%2520mode|Frame%2520descriptions|\_\_\_\_\_13](https://www.digi.com/resources/documentation/digidocs/90002173/Default.htm#reference/r_frame_0x92.htm%3FTocPath%3DOperate%2520in%2520API%2520mode%7CFrame%2520descriptions%7C _____ 13) shows that you need to query the %V command for that data.
