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.
Step 1: The Clock Power Circuit
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.
Step 2: LED and USB Circuit
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.
Step 3: The Clock Microcontroller Circuit
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.
Step 4: The Seven Segment Circuit
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
Step 5: Making Case for the Clock Module
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.
Step 6: Making PCBs
The PCBs are simply made at home by the TONER TRANSFER METHOD.
Step 7: PCB Component Mounting
PCB screwed tightly to fit inside the case and ready for programming and test coding.
Step 8: Mounting TMP35 Temperature Sensor
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.
Step 9: Buzzer Mount
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.
Step 10: Making Side Walls for 7 Segments
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!!
Step 11: Assembling Clock Case (module Only)
Finally the wires on the PCB are hot glued so that they didn't break.
Step 12: Making Case for the Clock Module
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.
Step 13: Joining Four Side of the Mesh Case Plates
I used self tapers to screw the four sides.
Step 14: Mount Bars on Top
Two bars are mounted on the top of the case to mount it on the wall.
Step 15: Making LED Bars
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.
Step 16: Mounting LED Bars on Case
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.
Step 17: Mounting LED Bars on Case
Now we mount these finished LED plates onto the case using medium sized nut-bolts.
Step 18: Mounting USB Jack
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.
Step 19: Mounting Transformer and Switches
Here we mount step down transformer and switches on the case.
Step 20: Terminals for Solar Panel Input
We simply mount the terminal post outside the case for the solar panel input.
Step 21: Making Base for the Battery
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.
Step 22: Mounting Circuits
Next we mount the POWER circuit to the case.
Step 23: Mounting Clock Module on Case
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.
Step 24: Finally All Assembled !!
Now for the remaining two sides of the case i used a acrylic sheet.
Step 25: Microcontroller Code
The microcontroller is written in BASCOM,and is available for download below.