Clock - PCF8583

Clock 1 - I2C - PCF8583

Print
Category: I2C boards
Published Date Written by Francois

I2C Clock1

Fig. 1 I2C Clock 1

Description:

This is a real time clock/calendar, with an I2C interface. It is based around an NXP PCF8583 chip.
It is organised as a 256 bytes memory, with the first 8 bytes used by the clock/calendar, the next 8 as alarm registers, and the 240 left as generic RAM.
It can operate with a 32.768 KHz crystal, or with a 50 Hz signal.

The clock will operate from 1V up to 6V, and a rechargeable battery will keep the oscillator running when the board is not powered on.

The board can be powered from 4 to 5V processor board. The clock itself operates between 1 and 6 V.

Specifications:

Input voltage 4 to 5V

InterfaceI2C

FunctionClock with 4

 years calendar


Schematic:

The power supply is filtered by C1. The 3.6V/15mAh rechargeable battery is recharged via R4. For a 5V power supply, we get 5-3.6 = 1.4V across R4. With a value between 680 to 1K, it gives a current of between 2 and 1.4 mA (I = U/R), which shouldn't damaged the battery when constantly in charge (Check with the datasheet of your battery).
D1, a low voltage drop schottky diode, prevents the battery supply to go to the other boards. The backup supply goes through R4 when power is off, but the voltage drop is minimal because of the low supply current requirement in clock mode (Typically 10uA, which would give a drop of between  6.8 to 10 mV across R4)

A crystal oscillator is connected between pin 1 and 2 of the chip, and C2 can be used to adjust the oscillator frequency.

The SDA and SCK I2C lines are pulled high by R1 and R2, while R6 and R7 protects the lines. R5 pulls address line A0 low. The line can be pulled high by SW1-1, and can be used to set the I2C slave address of the board.

The Int signal is open drain, and is pulled high by R3. SW1-2 allows to pass the signal to the interrupt signal of the I2C bus connector.

The I2C connectors JP1 and JP2 allow the board to be connected to an I2C bus in a chain, and are optional. It depends how you want to connect to the board.


I2C Clock 1 schematics

Fig. 2 I2C Clock 1 schematic


Construction:

The PCB fits on a small single sided board. All components are on the top side.


I2C Clock 1 layout

Fig. 3 I2C Clock 1 layout

Start with the lowest components, and continue with the higher ones.
For Q1, a piece of resistor lead can be used to secure it to the board on its side. It also connects it case to Gnd.
Leave for now IC1 out of its socket, and keep Bat1 for last.

I2C Clock 1 Component list
C1: 100 nF
C2: trimmer 20 pF
R1, R2: 22 K
R3, R5: 100 K
R4: between 680 and 1K (see schematic)
R6, R7: 220 
D1: Schottky BAT42
Q1: 32.768 crystal oscillator
Bat1: Rechargeable battery 3.6V/15mAh
IC1: NXP or Philips PCF8583 + socket
SW1: microswitch DIL4
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 also the voltage on the battery and across R4 to make sure it is recharging.

To check the clock itslef, power off, fit IC1 on its socket and power back up. Check you have a 1 Hz signal on pin 7 of IC1. This will indicate that the clock is counting.

You need to run the I2C Clock tutorial to check its functionnality. Just make sure you set the right I2C slave address with SW1.


Files and links:

Eagle PCB and schematics files for I2C Clock 1.
PDFs of PCB, layout and schematics of I2C Clock 1.
PIC Tutorials for I2C Clocks.
NXP PCF8583 RTC.

Post your comments...

    Copyright 2011. Poker Games. Copyright © 2012 riaDesign