Battery Backup on Ultimate GPS Module V3 & DS3231 RTC

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
RoboticSith
 
Posts: 4
Joined: Fri Jul 10, 2020 12:12 pm

Battery Backup on Ultimate GPS Module V3 & DS3231 RTC

Post by RoboticSith »

Hello,

I am using both the Ultimate GPS module V3 (https://www.adafruit.com/product/746) and the DS3231 RTC (https://www.adafruit.com/product/3013) as a master clock for some DIY home automation stuff. They are soldered to a custom PCB with a Teensy 4.0 and a Teensy LC. Everything is working correctly except for the battery backups.

I have two CR2032 coin-cell holders on the back of the PCB. One for the GPS and the other for the RTC. When installed, the battery backup works and both devices retain their respective settings and data, but both batteries died after only 3-4 weeks (measured at 0V). In the final version/installation, the main power supply will itself have some sort of large scale battery backup so these are really just extra failsafes. Are there configurations that need to be sent to the GPS/RTC to enable the ultra low power battery backup modes?

For the GPS I originally calculated ~1300 days for the GPS and ~11000 days for the RTC. On my assembled PCB, I see ~860kohm and ~1.12Mohm on the GPS and RTC battery lines respectively (no batteries installed). This resistance shifts the duration to ~875 days and ~2600 days respectively. When I power on the circuit, I see Open Circuit and ~132kohm respectively. This shifts the RTC duration to 390 days.

I'm at a bit of a loss as to why they both died after only 3-4 weeks. Any thoughts or suggestions are welcome.


Thanks in advance.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Battery Backup on Ultimate GPS Module V3 & DS3231 RTC

Post by adafruit_support_mike »

It sounds like the batteries are leaking into the regular power system. Double check you connections and make sure the positive battery terminal only connects to the BAT on the DS3231 or the GPS module.

Also check your board with batteries but no power, and see if you can find nonzero voltage anywhere except the two BAT pins.

User avatar
RoboticSith
 
Posts: 4
Joined: Fri Jul 10, 2020 12:12 pm

Re: Battery Backup on Ultimate GPS Module V3 & DS3231 RTC

Post by RoboticSith »

Thanks, there is some leakage onto the main power rail. I'm getting about 600mV on the 3.3V rail with the battery installed to the GPS and about 480mV with it on the RTC.

I was trying to have the microcontroller (Teensy 4.0) measure the voltage and give me a notification if the batteries were getting low, so they each connect to an analog input pin as well. I didn't see anything when I looked through the datasheet regarding ESD diodes to Vcc or internal pullup resistors when used as analog inputs, but there is evidently something there.

I measured the resistance to both Vcc and GND from the two analog pins I'm using on an unprogrammed Teensy 4.0, I get about 6-7Mohm to both rails. Interestingly, when I checked the same pins on an unprogrammed Teensy LC, they both read open circuit. I'll have to debug some more to see if its possible using the LC or if I can't do that with the microcontroller architectures.

Thanks again.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Battery Backup on Ultimate GPS Module V3 & DS3231 RTC

Post by adafruit_support_mike »

BANNED wrote:I was trying to have the microcontroller (Teensy 4.0) measure the voltage and give me a notification if the batteries were getting low, so they each connect to an analog input pin as well.
Yeah, that would do it.

Powering ICs through the input protection diodes on their GPIO pins is kind of a party trick.

You can fix that by putting a p-mosfet between the BAT pin and the ADC pin. Connect the mosfet’s gate to BAT with a 100k resistor, and to a GPIO pin on the Teensy. The mosfet will shut off when the GPIO pin is high or in its high-impedance state, but will give you a connection when the GPIO pin goes low.

You can also use an n-mosfet instead of a GPIO pin:
BAT-control.jpg
BAT-control.jpg (27.75 KiB) Viewed 187 times
When the main circuit power is connected, the n-mosfet will turn on, pulling the p-mosfet’s gate low and connecting BAT to the ADC pin.

When the main circuit doesn’t have power, the resistors will keep both mosfets shut off, isolating the backup battery from the rest of the circuit.

The same GPIO pin or n-mosfet can control p-mosfets for both the GPS and DS3231 batteries.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”