Clock - DS1307
Clock 2 - I2C - DS1307
Fig. 1 I2C Clock 2
Description:
This is another real time clock/calendar, with an I2C interface. This time based around a Maxim DS1307 chip.
It is organised as a 64 bytes memory, with the first 8 bytes used by the clock/calendar, and the next 56 as generic RAM.
It operates with a 32.768 KHz crystal. Unlike clock 1 with PCF8583, it does not have an alarm circuit. The Int signal can output a 1Hz, 4, 8 or 32 KHz signal to generate interrupts.
The board has a battery backup that will keep the chip running for 10 years if not powered..
The board can be powered from 4.5 to 5V processor board.
Specifications:
Input voltage 4.5 to 5V
InterfaceI2C
FunctionClock with calendar
Schematic:
The power supply is filtered by C1. The 3V CR2032 battery provides backup to the chip.
A crystal oscillator is connected between pin 1 and 2 of the chip, no capacitor is required.
The SDA and SCK I2C lines are pulled high by R1 and R2, while R4 and R5 protects the lines.
The Int signal is open drain, and is pulled high by R3. SW1 allows to pass the signal to the interrupt signal of the I2C bus.
The I2C connectors K1 and K2 allow the board to be connected to an I2C bus in a chain, and are optionals.
Fig. 2 I2C Clock 2 schematic
Construction:
The PCB fits on a small single sided board. All components are on the top side.
Fig. 3 I2C Clock 2 layout
Start with the lowest components, and continue with the higher ones.
Keep Bat1 for last in its socket.
Leave for now IC1 out of its socket.
| I2C Clock 2 Component list |
|---|
| C1: 100 nF C2: trimmer 20 pF or 22pF ceramic R1, R2: 22 K R3: 100 K R4, R5: 220 Q1: 32.768 KHz crystal oscillator Bat1: Battery CR2032 with socket IC1: Maxim DS1307 + DIL socket SW1: microswitch DIL2 K1, K2: Connector AMP MT 5pins male (optional) |
How to use / Testing:
To check the board, connect the board to an I2C interface, while IC1 is out of its socket. Power on the boards and check you have Vcc between pin 4 and 8 of IC1's socket. Check the voltage between pin 3 and 4. You should have 3V, the battery voltage.
To check the clock itself, power off, fit IC1 on its socket. You need to run the I2C Clock tutorial to check its functionnality.
Files and links:
Eagle PCB and schematics files for I2C Clock 2.PDFs of PCB, layout and schematics of I2C Clock 2.
PIC Tutorials for I2C Clock.
Maxim DS1307 RTC.

