I bought the solar charger 390, 1200mAh lipo and xbee zb series 2 etc. I use xbee's AD1 pin to monitor the lipo voltage at the B+ on the solar charger. My voltage divider consists of 14.8k and 4.7k. Multimeter gives me 969 mV, which is about correct. However, the xbee shows 920mV which is about 50 mV lower. I tried other combinations of voltage dividers without getting any closer. Instead of 4.02 v, the xbee gives me a reading of 3.8v.
Below is the arduino code on the receiving end
if(nss.available()>=21){
if(nss.read()==0x7E){
for (int i=1;i<19; i++){
byte discardByte=nss.read();
}
int analogMSB=nss.read();
int analogLSB=nss.read();
int analogReading=analogLSB+(analogMSB*256);
float mV=analogReading*(1200/1023.0); //result*(ref mv/1023)
float V=mV/0.24; //divided by the voltage divider to scale up to 4.2V
xbee zb monitor lipo voltage problem
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: xbee zb monitor lipo voltage problem
Check the analog voltage reference on the XBee.
- O2
- Posts: 33
- Joined: Sat Aug 30, 2014 11:20 am
Re: xbee zb monitor lipo voltage problem
my xbee draws power via an adaptor from pb500 which in turn is powered by the lipo that I try to monitor. The vref is not connected. Do I need to connect the vref to a +1.2v source derived from the pb500?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: xbee zb monitor lipo voltage problem
Check the data sheet for the XBee model you are using. I believe some models require that it be connected to a reference voltage.
- O2
- Posts: 33
- Joined: Sat Aug 30, 2014 11:20 am
Re: xbee zb monitor lipo voltage problem
Yes, I checked that xbee zb does need a reference voltage up to 1.2v. Please help me out since I barely know ohm's law. Where do I get this 1.2v? From the pb500?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: xbee zb monitor lipo voltage problem
According to this manual, the voltage reference for the VB can be from 1.8v to VCC, and VCC can be 3v-3.4v.
http://ftp1.digi.com/support/documentat ... 0976_V.pdf
If you are powering it via an adapter, your VCC is 3.3v and you could use the 3.3v pin on the adapter for VREF. Alternately, we do have a precision voltage reference which provides a stable 2.048v.
https://www.adafruit.com/products/2200
http://ftp1.digi.com/support/documentat ... 0976_V.pdf
If you are powering it via an adapter, your VCC is 3.3v and you could use the 3.3v pin on the adapter for VREF. Alternately, we do have a precision voltage reference which provides a stable 2.048v.
https://www.adafruit.com/products/2200
- O2
- Posts: 33
- Joined: Sat Aug 30, 2014 11:20 am
Re: xbee zb monitor lipo voltage problem
page 18 of the doc says the max on vref is 1.2v. How can it be connected to vcc directly?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: xbee zb monitor lipo voltage problem
Hmmm. Page 11 says that the VREF Range is 1.8VDC to VCC . That sounds like a question for the Digi folks.
http://www.digi.com/support/forum/
http://www.digi.com/support/forum/
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: xbee zb monitor lipo voltage problem
Page 18 is the value of the internal Aref voltage source.
Please be positive and constructive with your questions and comments.