Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

40%
+0 −1
Q&A RTC battery and VCC switching circuit

The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable. Circuit Operation Under ...

1 answer  ·  posted 12mo ago by Embedded_geek‭  ·  edited 11mo ago by Embedded_geek‭

Question battery switching rtc vbat
#4: Post edited by user avatar Embedded_geek‭ · 2025-10-11T00:30:22Z (11 months ago)
Added new details and circuit
  • The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.
  • **Circuit Operation**
  • * Under normal conditions, when VCC is available, VBAT is powered through D1.
  • * When VCC is removed, VBAT is instead supplied by the coin cell through P1 and Q1. This behavior matches the intended design.
  • ![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)
  • **Issue Observed**
  • * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.
  • **Measurements**
  • With VCC present:
  • 1. VBAT = 3.117 V
  • 2. Current = –2.25 mA (appears to flow into the coin cell).
  • With VCC absent:
  • 1. VBAT = 2.893 V
  • 2. Current = ~16 µA
  • I’m not fully certain if Q1’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.
  • The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.
  • **Circuit Operation**
  • * Under normal conditions, when VCC is available, VBAT is powered through D1.
  • * When VCC is removed, VBAT is instead supplied by the coin cell through P1 and Q1. This behavior matches the intended design.
  • ![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)
  • **Issue Observed**
  • * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.
  • **Measurements**
  • With VCC present:
  • 1. VBAT = 3.117 V
  • 2. Current = –2.25 mA (appears to flow into the coin cell).
  • With VCC absent:
  • 1. VBAT = 2.893 V
  • 2. Current = ~16 µA
  • I’m not fully certain if Q1’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.
  • **Edit: I checked the STM32 datasheet and the MCU has inbuilt switching mechanism. I don't think the external switching will be required.**
  • ![STM32L451](https://electrical.codidact.com/uploads/cg52jbbre9i1aips4ecin7rnimbg)
  • I came across another point in the application note which says -
  • ![BATTERY RTC](https://electrical.codidact.com/uploads/s9o5cr35soeu40ewzf2xjx55qp8l)
  • Can I use BAS716 diode? It’s a low-leakage small-signal silicon diode in SOD-523. Nexperia specifies very low reverse current (typ ~0.2 nA) and 75–85 V reverse rating; it’s designed for low-leak applications.
  • At the tiny RTC currents (µA range), the forward drop of a silicon switching diode is modest (well below the 1.25 V quoted at high test currents).
  • link - https://www.digikey.com/en/products/detail/nexperia-usa-inc/BAS716-115/1232107
  • ![Circuit](https://electrical.codidact.com/uploads/1redyrd5s8p8qkxadd7i7itp9hjh)
  • There is another option of using P-MOSFET with drain connected to BATTERY+ and Source connected to VBAT pin and Gate is shorted to Source.
  • The body diode (D→S) blocks reverse current from VBAT back into the cell, but allows forward current from the cell into VBAT with only milliohms of drop once the FET turns on.
  • ![Circuit2](https://electrical.codidact.com/uploads/7dopnx2y154izrk9x447wq29bcq3)
  • Which is better suited for long coin-cell life ?
#3: Post edited by user avatar Embedded_geek‭ · 2025-09-27T21:40:48Z (12 months ago)
  • The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.
  • **Circuit Operation**
  • * Under normal conditions, when VCC is available, VBAT is powered through D1.
  • * When VCC is removed, VBAT is instead supplied by the coin cell through P1 and Q1. This behavior matches the intended design.
  • ![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)
  • **Issue Observed**
  • * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.
  • **Measurements**
  • With VCC present:
  • 1. VBAT = 3.117 V
  • 2. Current = –2.25 mA (appears to flow into the coin cell).
  • With VCC absent:
  • 1. VBAT = 2.893 V
  • 2. Current = ~16 µA
  • I’m not fully certain if Q6’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.
  • The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.
  • **Circuit Operation**
  • * Under normal conditions, when VCC is available, VBAT is powered through D1.
  • * When VCC is removed, VBAT is instead supplied by the coin cell through P1 and Q1. This behavior matches the intended design.
  • ![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)
  • **Issue Observed**
  • * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.
  • **Measurements**
  • With VCC present:
  • 1. VBAT = 3.117 V
  • 2. Current = –2.25 mA (appears to flow into the coin cell).
  • With VCC absent:
  • 1. VBAT = 2.893 V
  • 2. Current = ~16 µA
  • I’m not fully certain if Q1’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.
#2: Post edited by user avatar Embedded_geek‭ · 2025-09-27T10:33:07Z (12 months ago)
  • The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.
  • **Circuit Operation**
  • * Under normal conditions, when VCC is available, VBAT is powered through D3.
  • * When VCC is removed, VBAT is instead supplied by the coin cell through J2 and Q6. This behavior matches the intended design.
  • ![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)
  • **Issue Observed**
  • * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.
  • **Measurements**
  • With VCC present:
  • 1. VBAT = 3.117 V
  • 2. Current = –2.25 mA (appears to flow into the coin cell).
  • With VCC absent:
  • 1. VBAT = 2.893 V
  • 2. Current = ~16 µA
  • I’m not fully certain if Q6’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.
  • The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.
  • **Circuit Operation**
  • * Under normal conditions, when VCC is available, VBAT is powered through D1.
  • * When VCC is removed, VBAT is instead supplied by the coin cell through P1 and Q1. This behavior matches the intended design.
  • ![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)
  • **Issue Observed**
  • * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.
  • **Measurements**
  • With VCC present:
  • 1. VBAT = 3.117 V
  • 2. Current = –2.25 mA (appears to flow into the coin cell).
  • With VCC absent:
  • 1. VBAT = 2.893 V
  • 2. Current = ~16 µA
  • I’m not fully certain if Q6’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.
#1: Initial revision by user avatar Embedded_geek‭ · 2025-09-27T10:32:23Z (12 months ago)
RTC battery and VCC switching circuit
The circuit shown below is used on one of my PCBs to switch the VBAT supply for the RTC, ensuring timekeeping continues whenever the main supply (VCC) is unavailable.

**Circuit Operation**
 * Under normal conditions, when VCC is available, VBAT is powered through D3.

 * When VCC is removed, VBAT is instead supplied by the coin cell through J2 and Q6. This behavior matches the intended design.

![circuit](https://electrical.codidact.com/uploads/kwwtmyg20d0ktx2npphb801o798t)

**Issue Observed**


 * After about a month in use, the RTC coin cell (nominally 3 V) was found discharged to 1.6 V. This is unexpected, since such batteries are typically expected to last several years in standby applications.

**Measurements**

With VCC present:

 1. VBAT = 3.117 V

 2. Current = –2.25 mA (appears to flow into the coin cell).

With VCC absent:

 1. VBAT = 2.893 V

 2. Current = ~16 µA

I’m not fully certain if Q6’s biasing is the root cause, but it seems probable given the reverse current flow when VCC is present.