I'd like to have my sketch measure the battery voltage and and report when the battery needs to be replaced (I don't get anywhere near the 7 years claimed in the "Adafruit Ultimate GPS Logger Shield - Includes GPS Module" description. My 1 year old battery is down to less than 1 volt. The GPS took more than 2 minutes to get a position.
Can I just solder a wire to one of the battery holder solder points to use to measure the battery voltage and connect that to A0 (or A1, A2, A3)?
What voltage should I use for the "Replace Battery" threshold?
Thanks. Joe
Measure Ultimate GPS Logger Shield battery voltage
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- szedula
- Posts: 31
- Joined: Tue Jul 07, 2015 10:51 pm
- blnkjns
- Posts: 963
- Joined: Fri Oct 02, 2020 3:33 am
Re: Measure Ultimate GPS Logger Shield battery voltage
Most of the time when you use batteries, you use a 3,3V board. Is that correct?
And since a fully charged battery is close to 4V, it would be outside the range for the A0-A3 pins. So what you need is a resistor-divider, for example 2x10kΩ resistors. Put them in series between V-bat and GND, and connect the middle to A0. Then double the measured value;
Vbat=analog value*3.3/1023*2
And since a fully charged battery is close to 4V, it would be outside the range for the A0-A3 pins. So what you need is a resistor-divider, for example 2x10kΩ resistors. Put them in series between V-bat and GND, and connect the middle to A0. Then double the measured value;
Vbat=analog value*3.3/1023*2
- szedula
- Posts: 31
- Joined: Tue Jul 07, 2015 10:51 pm
Re: Measure Ultimate GPS Logger Shield battery voltage
I'm using the Ultimate GPS Logger Shield on a Mega2560.
- blnkjns
- Posts: 963
- Joined: Fri Oct 02, 2020 3:33 am
Re: Measure Ultimate GPS Logger Shield battery voltage
Just adjust the formula to multiply by 5 instead of 3.3
- szedula
- Posts: 31
- Joined: Tue Jul 07, 2015 10:51 pm
Re: Measure Ultimate GPS Logger Shield battery voltage
I know how to convert A-to-D reading to voltages.
Wat I was looking to get answers for;
1. Where is the "best" place to wire to the battery Vbat?
Is there a nice place on the shield other than surface soldering a wire to the battery hold-down?
2. What threshold voltage should I use for the "replace the battery" message?
Is it 1V, 1.1V, 0.9V or some other value?
Thanks, Joe.
Wat I was looking to get answers for;
1. Where is the "best" place to wire to the battery Vbat?
Is there a nice place on the shield other than surface soldering a wire to the battery hold-down?
2. What threshold voltage should I use for the "replace the battery" message?
Is it 1V, 1.1V, 0.9V or some other value?
Thanks, Joe.
- blnkjns
- Posts: 963
- Joined: Fri Oct 02, 2020 3:33 am
Re: Measure Ultimate GPS Logger Shield battery voltage
A Li-Ion should not get that low. Stop using it at 3.3 volt.
Read this:
https://lygte-info.dk/info/BatteryLowVoltage%20UK.html
Read this:
https://lygte-info.dk/info/BatteryLowVoltage%20UK.html
- szedula
- Posts: 31
- Joined: Tue Jul 07, 2015 10:51 pm
Re: Measure Ultimate GPS Logger Shield battery voltage
I am asking about about the RTC backup battery (CR1220) not a Li-Ion battery.
Please be positive and constructive with your questions and comments.