The Raspberry Pi 5 includes a built-in real-time clock (RTC), but it needs a backup power source to maintain the correct time when the board is disconnected from its main power supply. The Raspberry Pi 5 RTC battery connects to the dedicated J5 (BAT) connector and provides that backup power.
Unlike many desktop motherboards that use a standard non-rechargeable coin cell, Raspberry Pi recommends a rechargeable lithium-manganese RTC battery with a pre-fitted two-pin JST-SH connector. Choosing the correct battery matters because the Raspberry Pi 5 has a charging circuit designed for a compatible rechargeable cell.
This guide explains what the RTC battery does, where it connects, how to install it, and how to check its charging configuration without confusing it with the board’s main power supply.
Does the Raspberry Pi 5 Have a Built-In RTC?
Yes. The Raspberry Pi 5 includes a hardware real-time clock. This allows the board to maintain time through its RTC circuitry rather than depending entirely on software time synchronization.
However, having an RTC does not automatically mean that the board can preserve the correct time indefinitely while disconnected from power. A backup source is needed for timekeeping during that period.
Raspberry Pi’s official documentation also clarifies that the RTC remains usable when no backup battery is connected, as long as the board has normal power. The battery is specifically useful when the main supply is disconnected.
For general background on the role of an RTC backup source, see our guide to the purpose and operation of an RTC battery.
Which RTC Battery Does Raspberry Pi 5 Use?
Raspberry Pi specifies a rechargeable lithium-manganese coin cell for the Raspberry Pi 5 RTC.
The official battery assembly includes:
- A rechargeable lithium-manganese coin cell.
- A pre-fitted two-pin JST-SH connector.
- An adhesive mounting pad.
The pre-fitted connector is important because the battery is intended to connect directly to the board’s dedicated RTC battery socket.
Do not select a replacement simply because it looks like a familiar computer coin cell. Battery chemistry and charging compatibility matter just as much as physical size.
Can You Use a CR2032 Battery?
You should not assume that a standard non-rechargeable CR2032 is suitable.
Raspberry Pi specifically advises against using a primary, non-rechargeable lithium cell for the Raspberry Pi 5 RTC. The board’s backup circuit draws more current than many dedicated RTC modules, which can result in a short service life for an unsuitable primary cell.
The official documentation also warns against using a lithium-ion cell for the RTC.
Use the rechargeable battery type recommended by Raspberry Pi or a replacement that is explicitly confirmed as compatible with the Raspberry Pi 5 charging and connector requirements.
Where Is the RTC Battery Connector on Raspberry Pi 5?
The RTC battery connects to the J5 (BAT) connector on the Raspberry Pi 5 board.
With the board components facing upward and the Raspberry Pi logo correctly oriented, the J5 connector is near the left-hand corner of the board and to the right of the USB-C power connector.
The connector is small, so take care when positioning the battery plug. Do not force it into place or assume that a visually similar connector has the same pin arrangement.
Before installation, consult the official Raspberry Pi 5 hardware documentation for the connector location and current battery guidance.
How to Install a Raspberry Pi 5 RTC Battery
Installing the battery is straightforward when you have the correct compatible assembly. Handle the board and connector carefully because the battery plug and socket are small.
Step 1: Shut Down the Raspberry Pi
Shut down the Raspberry Pi operating system properly before working on the board.
Once shutdown is complete, disconnect the USB-C power supply. Do not connect or remove the RTC battery while the board is powered.
If the board is installed inside a case, remove it or open the case according to its design so you can access the J5 connector without putting pressure on other components.
Step 2: Locate the J5 (BAT) Connector
Find the small connector marked J5 or identified as the RTC battery connector in the board documentation.
Check its position against the official Raspberry Pi hardware guide rather than relying on an unrelated board photograph. Board orientation can make connector locations confusing.
Step 3: Check the Battery Plug
Confirm that the battery has the specified two-pin JST-SH plug and is designed for the Raspberry Pi 5.
Inspect the plug and cable for visible damage. Do not use an assembly with exposed conductors, damaged insulation, or a connector that does not match the board socket.
Step 4: Connect the Battery
Align the plug with the J5 socket and insert it gently. Avoid pulling the cable or pressing down on the connector with excessive force.
If the plug does not fit naturally, stop and verify that you have the correct battery assembly. Never modify the connector or force a different plug into the socket.
Step 5: Secure the Battery
The official battery assembly includes an adhesive mounting pad. Position the battery where it will not interfere with the case, cooling components, or other board connections.
Make sure the cable is not trapped beneath the board or stretched tightly.
Step 6: Reconnect Power and Check the RTC
Reconnect the Raspberry Pi’s normal power supply and allow the system to boot.
Check the system date and time. If necessary, configure the clock using the operating system’s normal time settings.
The RTC backup battery is intended to preserve time while the board is disconnected from its main supply. It does not replace the Raspberry Pi’s USB-C power supply.
How to Enable RTC Battery Charging on Raspberry Pi 5
The Raspberry Pi 5 includes a constant-current, constant-voltage charging circuit for its compatible rechargeable RTC battery.
However, battery charging is disabled by default. If you intend to enable charging, follow the official configuration procedure and use the specified setting.
Step 1: Open the Raspberry Pi Configuration File
Open a terminal on the Raspberry Pi and edit the firmware configuration file:
sudo nano /boot/firmware/config.txtThis is the configuration file used by current Raspberry Pi OS installations. If your system uses a different setup, verify its configuration path before making changes.
Step 2: Add the Charging Parameter
Add the following line to the configuration file:
dtparam=rtc_bbat_vchg=3000000This sets the RTC battery charging voltage parameter to 3,000,000 microvolts, or 3 volts.
Do not copy charging settings from a different battery or device. The parameter should be used only with a compatible rechargeable battery and in accordance with Raspberry Pi’s documentation.
Step 3: Save the File and Reboot
In Nano, save the file and exit. Then restart the Raspberry Pi:
sudo rebootThe board will use the configured charging voltage after rebooting.
Step 4: Verify the Charging Configuration
After the system starts again, run:
grep . /sys/class/rtc/rtc0/charging_voltage*The output shows the current charging voltage and the minimum and maximum values reported by the RTC driver.
When the configuration has been applied correctly, the current charging voltage should reflect the setting you selected. If it remains at zero, check the configuration file, the battery connection, and the system’s reported RTC values.
Raspberry Pi documents the charging controls and verification files in its official computer hardware guide.
How to Disable RTC Battery Charging
If you need to stop charging, remove the line containing rtc_bbat_vchg from /boot/firmware/config.txt and reboot the board.
Do not leave a charging parameter enabled for a battery that is not designed to be recharged by the Raspberry Pi 5 circuit.
How Long Does the Raspberry Pi 5 RTC Battery Last?
The backup period depends on the battery’s condition, the board’s power behavior, and the way the system is configured.
Raspberry Pi states that the RTC’s current consumption while the board is powered down is in the single-digit microamp range. With the recommended backup battery, retention can be measured in months.
That is a general description from the manufacturer, not a guaranteed runtime for every battery or operating condition. Battery age, storage, temperature, and the actual power state can affect the result.
If your board repeatedly loses its time after being disconnected, check the battery type, connector, and charging configuration before assuming that the RTC itself is defective.
How to Check Whether the RTC Battery Is Working
A simple observation can help establish whether the backup battery is maintaining the clock.
- Confirm that the Raspberry Pi displays the correct date and time while powered.
- Shut down the board properly.
- Disconnect the main USB-C power supply.
- Leave the board disconnected for a reasonable test period.
- Reconnect power and check the date and time.
If the clock is retained, the RTC backup arrangement may be working as expected.
If the time is lost, check that the battery is compatible and properly connected. Also verify that the board is using the correct configuration and that the battery has had an appropriate opportunity to charge if charging is enabled.
A clock reset alone does not prove that the battery is defective. Software time synchronization, battery condition, connection problems, and RTC hardware faults should also be considered.
Common Raspberry Pi 5 RTC Battery Problems
The Raspberry Pi 5 Loses Time After Power Is Removed
This can happen if the RTC backup battery is missing, depleted, incompatible, or not connected correctly.
Check the J5 connection and battery specification first. If the board works correctly while powered but loses time when disconnected, the backup arrangement deserves attention.
The Battery Does Not Appear to Charge
Charging is disabled by default. If you expected the battery to charge, check whether the rtc_bbat_vchg parameter has been added correctly.
Then inspect the reported charging voltage using the system files documented by Raspberry Pi. Do not attempt to charge an incompatible or non-rechargeable battery.
The Battery Connector Does Not Fit
The Raspberry Pi 5 uses a specific two-pin JST-SH connector for its official RTC battery assembly.
A connector that looks similar may have a different size or arrangement. Do not force it into the socket or modify the wiring without verified technical information.
The RTC Works Without a Battery but Loses Time Later
This behavior is not necessarily a fault. The RTC can operate when the board has normal power even if no backup battery is attached.
The battery is needed to maintain time when the main supply is disconnected. If the clock is lost only during that period, investigate the backup battery and its connection.
Raspberry Pi 5 RTC Battery vs. Main Power Supply
These two power sources have different purposes.
| Feature | RTC backup battery | Main USB-C power supply |
|---|---|---|
| Main purpose | Maintains RTC time when main power is absent | Powers the Raspberry Pi during normal operation |
| Connected to | J5 (BAT) connector | USB-C power input |
| Powers the CPU and display | No | Yes |
| Required for normal powered operation | No, the RTC can operate with normal board power | Yes, a suitable main supply is required |
| Battery type | Compatible rechargeable lithium-manganese cell | Not applicable |
A weak RTC battery should not be confused with a problem involving the Raspberry Pi’s USB-C power supply. If the board cannot boot or shuts down unexpectedly while connected to a suitable supply, investigate the main power system separately.
Frequently Asked Questions
Does Raspberry Pi 5 need an RTC battery to work?
No. The Raspberry Pi 5 includes an RTC that can operate while the board has normal power. A backup battery is used to maintain time when the main power supply is disconnected.
Where does the Raspberry Pi 5 RTC battery connect?
It connects to the J5 (BAT) connector on the board, located near the USB-C power connector. Check the official board documentation to identify the correct orientation.
Can I use a normal CR2032 in Raspberry Pi 5?
Do not assume a standard non-rechargeable CR2032 is compatible. Raspberry Pi recommends a rechargeable lithium-manganese RTC battery and warns against using a primary non-rechargeable lithium cell or a lithium-ion cell.
Is RTC battery charging enabled by default?
No. Raspberry Pi documents that charging is disabled by default. The charging voltage can be configured through the rtc_bbat_vchg parameter in /boot/firmware/config.txt.
How can I check the RTC charging voltage?
Run the following command:
grep . /sys/class/rtc/rtc0/charging_voltage*It displays the charging voltage and its reported limits.
Does the RTC battery power the Raspberry Pi when it is switched off?
No. It supplies backup power to the RTC, not to the entire board. The Raspberry Pi still requires its normal power supply for regular operation.
Final Thoughts
The Raspberry Pi 5 RTC battery helps preserve the board’s date and time when its main USB-C power supply is disconnected. The board includes a dedicated J5 connector and supports a rechargeable lithium-manganese backup battery.
Use the correct battery assembly, connect it carefully, and follow the official configuration instructions if you need to enable charging. If the clock still resets, investigate the battery connection and RTC configuration before assuming that the board’s hardware is faulty.
For battery compatibility and charging details, use the official Raspberry Pi computer hardware documentation as the final reference.
