DIY ClockBlock (a Multipurpose Rechargeable Timepiece)

by abhishekkumar1902 in Circuits > Electronics

6527 Views, 41 Favorites, 0 Comments

DIY ClockBlock (a Multipurpose Rechargeable Timepiece)

DSC02656 (Large).JPG
DSC02474 (Large).JPG
background-wallpaper-hd-white.bmp.jpg
DSC02593 (Large).JPG
DSC02594 (Large).JPG
DSC02595 (Large).JPG
DSC02596 (Large).JPG
DSC02601 (Large).JPG
DSC02604 (Large).JPG
DSC02605 (Large).JPG
DSC02615 (Large).JPG
DSC02663 (Large).JPG
DSC02476 (Large).JPG
DSC02477 (Large).JPG
DSC02478 (Large).JPG
DSC02474 (Large).JPG
From quite a long time,I always wanted to build a clock for myself.

Here in this DIY,i present a multipurpose clock that can be recharged again.
The clock serves the basic features like date, time and alarm features along with the basic thermometer features.
The clock also has other features like a USB charging port and two bars or 3 x 1Watt LEDs that will serve you in case of shortage of electricity in your home (very useful in INDIA,where electricity supply is a big problem).
The clock houses a 6V,4.5AH battery which can be charged through a solar panel or mains 220v AC supply.The circuit automatically cutoffs solar panel while charging through mains supply.
The charging circuit is fully safe and also manages the discharge of the battery and automatically shuts it off.

I hope you guyz will enjoy making this DIY or atleast making just the clock module only.

The Clock Power Circuit

sch.png
brd.png
The power circuit manages the charging of the 6v, 4.5AH battery and also takes care of its discharge cutoff.
A 220v to 9v AC step down transformer is used to derive a charging supply from mains 220 v AC.This secondary 9V AC goes to the input of the bridge rectifier section as shown in the circuit diagram which turns it into around 12v DC and smooths it with a coupling capacitor.This 12v DC input operates the relay,and this 12v also goes to the Normally open pin of the relay.The normally closed contact of the relay is fed with 12 v input from the 12v,7W solar panel with a bypass diode in series to prevent back current flow in case.Thus in case of mains supply failure or if u do not wish to charge it from mains,the solar panel feeds the charging circuit and when you apply the mains 220v AC power ,it will switch to mains operated 12v DC to the charging circuit through the relay.

Next we have designed the charging circuit from TI's ref design for the BQ24450 Lead acid charging IC which all takes care of charging the battery and preventing it from over charging.We have set the charging current to about 300-400mA which is enough and good for the application.

Next we have a simple comparator from TI-the LMP7300 which checks the battery not to go below 5.35 v and thus if so,it cutoffs the load ahead and thus prevents further discharging of the battery.

We have used an adjustable LDO from TI the UC383 which is set here to produce +5v using the programming resistors at feedback.The CT pin is the active low disable pin for the LDO which is fed with the comparator output of LMP7300.Thus if the battery voltage gets below 5.35 v,the comparator turns ts output low and disables the LDO.

Further TPS2051C from TI is the 500mA load switch used here to limit USB charging currents to 500mA,rather it is optional here.

LED and USB Circuit

sch_b.png
Two pairs of 3 x 1 watt LEDs are used here with a 2 ohm current limiting resistor with a switch in series of each pair. Each pair consumes about 0.700 to 0.750 A current. The +5 for the LEDs are derived from the non current limited 5v output from the previous power section.

A femal USD jack is provided for USB charging applications driven from the 5v,500mA current limited output from previous circuit section.

The Clock Microcontroller Circuit

sch.png
The Atmega8 from atmel is used here for the clock circuit.
The circuit is powered by 3.3 v which is derived form TPS73733 - a 3.3 LDO from TI which receives +5 input from power section.
BQ32000 from TI is used here as the RTC chip driven by a 32768 HZ crystal and a 3v backup cell.A buzzer is provided for alarm purpose.A RGB LED is connected to show AM / PM / Date displays. TMP35 from analog devices is used for temperature detection. Three switches SET,PLUS and MINUS are provided for setting various parameters of the clock.The rest of the circuitry drives the seven segment display.And a ICSP port is provided for programing and debugging purpose.

The Seven Segment Circuit

sch_b.png
brd.png
This is a 7 segment multiplexed board.
I hope it is easy to understand and no description is needed.
The vcc for the center yellow LEDs goes to the IRQ pin of the BQ32000 IC (to JP1 in mcu section).

It is good to match the segment pins to corresponding pins on the mcu as shown below (a snippet from mcu code):

Config Portb.1 = Output                                     ' 1st digit control line <==7segment display_LSB
Config Portb.2 = Output                                     ' 2nd digit control line <==7segment display
Config Portb.7 = Output                                     ' 3rd digit control line <==7segment display
Config Portb.6 = Output                                     ' 4th digit control line <==7segment display_MSB

Config Portd.0 = Output                                     ' g segment <==7segment display
Config Portd.1 = Output                                     ' e segment <==7segment display
Config Portd.4 = Output                                     ' d segment <==7segment display
Config Portd.5 = Output                                     ' c segment <==7segment display
Config Portd.6 = Output                                     ' b segment <==7segment display
Config Portd.7 = Output                                     ' a segment <==7segment display
Config Portb.0 = Output                                     ' f segment <==7segment display

Making Case for the Clock Module

DSC02153 (Large).JPG
DSC02154 (Large).JPG
DSC02150 (Large).JPG
DSC02149 (Large).JPG
DSC02158 (Large).JPG
DSC02159 (Large).JPG
DSC02165 (Large).JPG
DSC02160 (Large).JPG
DSC02162 (Large).JPG
DSC02163 (Large).JPG
DSC02167 (Large).JPG
DSC02168 (Large).JPG
DSC02164 (Large).JPG
DSC02169 (Large).JPG
DSC02156 (Large).JPG
DSC02155 (Large).JPG
DSC02157 (Large).JPG
For clock case,i used the 250mL plastic ware container from PLOKA  (brand in INDIA),but you guys can use any tupperware sort of case for the same if u wish to go with such a case design.This cases are easy to cut and shape for electronics projects.

With a simple sanding tool accessory i cut the window for the seven segment display and drilled holes for switches and wires.

Making PCBs

DSC02056 (Large).JPG
DSC02063 (Large).JPG
DSC02065 (Large).JPG
DSC02073 (Large).JPG
DSC02074 (Large).JPG
The PCBs are simply made at home by the TONER TRANSFER METHOD.

PCB Component Mounting

DSC02454 (Large).JPG
DSC02457 (Large).JPG
DSC02455 (Large).JPG
DSC02456 (Large).JPG
DSC02450 (Large).JPG
DSC02119 (Large).JPG
DSC02110 (Large).JPG
DSC02112 (Large).JPG
DSC02453 (Large).JPG
DSC02461 (Large).JPG
DSC02118 (Large).JPG
DSC02460 (Large).JPG
DSC02091 (Large).JPG
DSC02459 (Large).JPG
DSC02452 (Large).JPG
DSC02147 (Large).JPG
DSC02451 (Large).JPG
DSC02464 (Large).JPG
PCB screwed tightly to fit inside the case and ready for programming and test coding.

Mounting TMP35 Temperature Sensor

DSC02429 (Large).JPG
DSC02431 (Large).JPG
DSC02430 (Large).JPG
DSC02432 (Large).JPG
DSC02437 (Large).JPG
DSC02436 (Large).JPG
DSC02435 (Large).JPG
DSC02434 (Large).JPG
DSC02433 (Large).JPG
A chip holder is used to make a casing for the TMP35 sensor mounting outside the case.I screwed them then into the case and made hole for the wires to peek through in the case.

Buzzer Mount

DSC02444 (Large).JPG
DSC02445 (Large).JPG
DSC02447 (Large).JPG
DSC02448 (Large).JPG
DSC02449 (Large).JPG
DSC02443 (Large).JPG
DSC02446 (Large).JPG
DSC02441 (Large).JPG
DSC02442 (Large).JPG
Here we can see how to chip glue the buzzer on the wall of the case with a hole drilled for sound to come out.

Making Side Walls for 7 Segments

DSC02182 (Large).JPG
DSC02171 (Large).JPG
DSC02172 (Large).JPG
DSC02173 (Large).JPG
DSC02174 (Large).JPG
DSC02176 (Large).JPG
DSC02177 (Large).JPG
DSC02178 (Large).JPG
DSC02179 (Large).JPG
DSC02180 (Large).JPG
DSC02181 (Large).JPG
Because the seven segments alone were looking atrocious, so i used some smd plastic chip containers to create the wall around the seven segment displays.
And yeah, it looks better!!

Assembling Clock Case (module Only)

DSC02440 (Large).JPG
DSC02184 (Large).JPG
DSC02185 (Large).JPG
DSC02186 (Large).JPG
DSC02187 (Large).JPG
DSC02188 (Large).JPG
DSC02189 (Large).JPG
DSC02190 (Large).JPG
DSC02191 (Large).JPG
DSC02439 (Large).JPG
DSC02478 (Large).JPG
DSC02476 (Large).JPG
DSC02475 (Large).JPG
DSC02474 (Large).JPG
DSC02477 (Large).JPG
Finally the wires on the PCB are hot glued so that they didn't break.

Making Case for the Clock Module

DSC02486 (Large).JPG
DSC02484 (Large).JPG
DSC02485 (Large).JPG
DSC02488 (Large).JPG
DSC02487 (Large).JPG
DSC02491 (Large).JPG
DSC02489 (Large).JPG
Now for the outer case,i used four big QFP chip trays those were lying around in my room.These trays are the ones that are used to stock big number of SMD chips.
I inclined them to make a rectangular box and screwed them together.

Joining Four Side of the Mesh Case Plates

DSC02493 (Large).JPG
DSC02494 (Large).JPG
DSC02498 (Large).JPG
I used self tapers to screw the four sides.

Mount Bars on Top

DSC02621 (Large).JPG
DSC02552 (Large).JPG
DSC02553 (Large).JPG
DSC02555 (Large).JPG
Two bars are mounted on the top of the case to mount it on the wall.

Making LED Bars

DSC02508 (Large).JPG
DSC02509 (Large).JPG
DSC02510 (Large).JPG
DSC02511 (Large).JPG
DSC02512 (Large).JPG
DSC02513 (Large).JPG
DSC02514 (Large).JPG
DSC02515 (Large).JPG
Here i used these cylindrical roller plates from a laser printer to mount the 1 watt LEDs on!!
I cut it into two halves using a hacksaw.

Mounting LED Bars on Case

DSC02517 (Large).JPG
DSC02518 (Large).JPG
DSC02520 (Large).JPG
DSC02521 (Large).JPG
DSC02522 (Large).JPG
DSC02523 (Large).JPG
DSC02524 (Large).JPG
DSC02528 (Large).JPG
DSC02534 (Large).JPG
DSC02535 (Large).JPG
DSC02536 (Large).JPG
DSC02537 (Large).JPG
Now i mount and solder the 1 watt LEDs on the heatsinks and finally on this cylindrical plates.
I use a conducting glue to glue it to the cylindrical plate.
Next we solder them in parallel for 3 LEDs and nicely tie the wires.

Mounting LED Bars on Case

DSC02548 (Large).JPG
DSC02544 (Large).JPG
DSC02539 (Large).JPG
DSC02543 (Large).JPG
DSC02547 (Large).JPG
Now we mount these finished LED plates onto the case using medium sized nut-bolts.

Mounting USB Jack

DSC02557 (Large).JPG
DSC02562 (Large).JPG
DSC02559 (Large).JPG
DSC02560 (Large).JPG
Here i have used a panel mountable female USB type A jack and made a window on the case for that using the sanding tool.
Finally i screwed it onto the panel and soldered wires to make it reach the POWER PCB.

Mounting Transformer and Switches

DSC02499 (Large).JPG
DSC02505 (Large).JPG
DSC02532 (Large).JPG
DSC02503 (Large).JPG
DSC02500 (Large).JPG
DSC02529 (Large).JPG
DSC02501 (Large).JPG
DSC02507 (Large).JPG
DSC02502 (Large).JPG
DSC02525 (Large).JPG
DSC02530 (Large).JPG
DSC02531 (Large).JPG
Here we mount step down transformer and switches on the case.

Terminals for Solar Panel Input

DSC02573 (Large).JPG
DSC02574 (Large).JPG
DSC02575 (Large).JPG
We simply mount the terminal post outside the case for the solar panel input.

Making Base for the Battery

DSC02546 (Large).JPG
DSC02578 (Large).JPG
DSC02549 (Large).JPG
DSC02545 (Large).JPG
DSC02577 (Large).JPG
DSC02551 (Large).JPG
DSC02579 (Large).JPG
DSC02550 (Large).JPG
DSC02580 (Large).JPG
Here i bend a metallic plate into L shape to make a base for the battery.I used some elastic strip then to hold the width of the battery.

Mounting Circuits

DSC02592 (Large).JPG
DSC02588 (Large).JPG
DSC02576 (Large).JPG
DSC02581 (Large).JPG
DSC02582 (Large).JPG
DSC02583 (Large).JPG
DSC02584 (Large).JPG
DSC02585 (Large).JPG
DSC02586 (Large).JPG
DSC02587 (Large).JPG
DSC02589 (Large).JPG
DSC02590 (Large).JPG
DSC02591 (Large).JPG
Next we mount the POWER circuit to the case.

Mounting Clock Module on Case

DSC02563 (Large).JPG
DSC02564 (Large).JPG
DSC02565 (Large).JPG
DSC02566 (Large).JPG
DSC02567 (Large).JPG
DSC02568 (Large).JPG
DSC02569 (Large).JPG
DSC02570 (Large).JPG
DSC02571 (Large).JPG
DSC02572 (Large).JPG
Next we mount the clock on the case and screw it tightly.Again i used a small L shaped clip to mount it to the case.

Finally All Assembled !!

DSC02593 (Large).JPG
DSC02594 (Large).JPG
DSC02595 (Large).JPG
DSC02596 (Large).JPG
DSC02601 (Large).JPG
DSC02604 (Large).JPG
DSC02605 (Large).JPG
DSC02609 (Large).JPG
DSC02615 (Large).JPG
DSC02620 (Large).JPG
DSC02656 (Large).JPG
DSC02663 (Large).JPG
Now for the remaining two sides of the case i used a acrylic sheet.

Microcontroller Code

The microcontroller is written in BASCOM,and is available for download below.