1. Introduction
The FOSA DS1307 Real Time Clock (RTC) Module is specifically designed for use with Raspberry Pi. It provides accurate timekeeping capabilities, allowing your Raspberry Pi to maintain the correct date and time even when power is disconnected. The module communicates with the Raspberry Pi through the I2C bus, ensuring easy integration.

Image 1.1: FOSA DS1307 RTC Module, highlighting its compatibility with Raspberry Pi and I2C communication.
2. Features
- Utilizes the Maxim DS1307 chip for reliable timekeeping.
- Features automatic power-fail detection and switch circuitry to maintain time during power outages.
- Can be operated within a protective enclosure (shell not included).
- Includes a serial port connector for flexible integration.
- Offers programmable square-wave output.
3. Specifications
| Accuracy | ±2ppm from 0°C to +40°C |
| Working Voltage | 5V |
| Battery Backup | Input for continuous timekeeping (CR1220 battery required, not included) |
| Timekeeping Features | Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Year Compensation Valid Up to 2100 |
| Work Temperature | 0°C to +70°C |
| Connectivity | I2C |
| Dimensions (Approx.) | 2.65 cm x 2.27 cm (1.04 in x 0.89 in) |
| Weight (Approx.) | 0.352 ounces (5g) |

Image 3.1: Approximate dimensions of the FOSA DS1307 RTC Module.
4. Package Contents
The package includes:
- 1x FOSA DS1307 RTC Module for Raspberry Pi
Note: A CR1220 coin cell battery is required for battery backup functionality and is not included in the package.
5. Setup
5.1 Battery Installation
- Obtain a CR1220 coin cell battery.
- Locate the battery holder on the underside of the RTC module.
- Carefully insert the CR1220 battery into the holder, ensuring correct polarity (positive side facing up).

Image 5.1: Underside view of the RTC module showing the CR1220 battery holder.
5.2 Connecting to Raspberry Pi
The RTC module connects to your Raspberry Pi via the GPIO pins, utilizing the I2C interface. The module features a 2x5 pin 2.54mm connector and is compatible with Raspberry Pi B, A+/B+/2, and 3 models.
- Ensure your Raspberry Pi is powered off before connecting the module.
- Align the module's connector pins with the corresponding GPIO pins on your Raspberry Pi. The module typically connects to the 5V, 3V3, GND, SDA, and SCL pins for power and I2C communication.
- Gently press the module onto the GPIO header until it is securely seated.

Image 5.2: The RTC module connected to a Raspberry Pi's GPIO header, showing the serial port connector.
6. Operating Instructions
Once the FOSA DS1307 RTC Module is physically connected to your Raspberry Pi and a CR1220 battery is installed, you will need to configure your Raspberry Pi's operating system to utilize the RTC.
6.1 Software Configuration
The DS1307 RTC requires specific software configuration on your Raspberry Pi to read and write time data. This typically involves:
- Enabling the I2C interface in your Raspberry Pi's configuration (e.g., via
raspi-config). - Installing necessary I2C tools and RTC drivers.
- Configuring the system to use the DS1307 as the hardware clock.
Numerous online guides and tutorials are available for setting up the DS1307 RTC with Raspberry Pi. Search for resources specific to your Raspberry Pi model and operating system version (e.g., "Raspberry Pi DS1307 RTC setup").
6.2 Time Synchronization
After initial setup, you will typically write the current system time to the RTC module. Subsequently, the Raspberry Pi can read the time from the RTC upon boot, ensuring accurate timekeeping without an internet connection.
7. Maintenance
7.1 Battery Replacement
The CR1220 coin cell battery provides backup power for the RTC module to maintain time when the Raspberry Pi is powered off. The battery life can vary, but typically lasts for several years. If your RTC module consistently loses time when the Raspberry Pi is off, the battery may need replacement.
- Power down your Raspberry Pi and disconnect the power supply.
- Carefully remove the RTC module from the Raspberry Pi's GPIO header.
- Remove the old CR1220 battery from its holder.
- Insert a new CR1220 battery, ensuring correct polarity.
- Reconnect the RTC module to your Raspberry Pi and power it on.
- You may need to re-synchronize the time from your Raspberry Pi's system clock to the RTC after battery replacement.
8. Troubleshooting
8.1 RTC Not Detected or Communication Errors
- Check Connections: Ensure the module is securely seated on the Raspberry Pi's GPIO pins and that all connections are correct.
- I2C Enabled: Verify that the I2C interface is enabled in your Raspberry Pi's configuration.
- Software Setup: Double-check that all necessary drivers and software configurations for the DS1307 are correctly installed and applied.
- Battery Presence: Confirm that a CR1220 battery is installed and has sufficient charge.
- Module Defect: In rare cases, the module itself might be defective. Inspect the PCB for any visible damage or manufacturing errors, such as shorted traces. If a defect is suspected, contact support.
8.2 Incorrect Timekeeping
- Battery Charge: The CR1220 battery might be depleted. Replace it with a new one.
- Initial Synchronization: Ensure you have correctly written the current time from your Raspberry Pi's system clock to the RTC module after setup or battery replacement.
- Software Configuration: Verify that the Raspberry Pi is configured to read the time from the RTC upon boot.
9. Warranty and Support
For technical assistance or inquiries regarding the FOSA DS1307 RTC Module, please refer to the FOSA brand store or contact your retailer. While specific warranty details are not provided in this manual, standard consumer protection laws apply.
Visit the official FOSA Store for more information and support resources.





