0

Measure Ultimate GPS Logger Shield battery voltage
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Measure Ultimate GPS Logger Shield battery voltage

by szedula on Mon Jun 14, 2021 11:00 am

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

szedula
 
Posts: 31
Joined: Tue Jul 07, 2015 10:51 pm

Re: Measure Ultimate GPS Logger Shield battery voltage

by blnkjns on Mon Jun 14, 2021 11:25 am

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

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Measure Ultimate GPS Logger Shield battery voltage

by szedula on Mon Jun 14, 2021 2:44 pm

I'm using the Ultimate GPS Logger Shield on a Mega2560.

szedula
 
Posts: 31
Joined: Tue Jul 07, 2015 10:51 pm

Re: Measure Ultimate GPS Logger Shield battery voltage

by blnkjns on Tue Jun 15, 2021 2:54 am

Just adjust the formula to multiply by 5 instead of 3.3

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Measure Ultimate GPS Logger Shield battery voltage

by szedula on Tue Jun 15, 2021 6:40 pm

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.

szedula
 
Posts: 31
Joined: Tue Jul 07, 2015 10:51 pm

Re: Measure Ultimate GPS Logger Shield battery voltage

by blnkjns on Wed Jun 16, 2021 5:27 pm

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

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Measure Ultimate GPS Logger Shield battery voltage

by szedula on Wed Jun 16, 2021 8:56 pm

I am asking about about the RTC backup battery (CR1220) not a Li-Ion battery.

szedula
 
Posts: 31
Joined: Tue Jul 07, 2015 10:51 pm

Please be positive and constructive with your questions and comments.