Wednesday, October 22, 2008

PIC CLOCK - WITH ALARM

You may think that I’m obsessed with clocks. When I build my first clock, everybody at home needed clocks (except my kid of course but he really enjoys looking at blinking LEDs). Mother-in-law needed one in the kitchen and an alarm clock in her bedroom; wife needed a clock in our bedroom and one in the living room and so on. The main reason is, these clocks show time even in dark which they find very useful at night.

The demand for the alarm clock is satisfied finally. It is the same circuit and the same program as before. Only difference is that it stores alarm settings in EEPROM and having a buzzer. Unfortunately, the buzzer was not loud enough. So I’m thinking of having something louder. I’ll be able to find something from my kid’s toys collection since he’s got all types of music cars, broken and lying around.


In operation...


Wiring side... (like hell)





Needs a final touch...



PIC CLOCK - MATRIX DISPLAY

Ever since we moved to our home (in late 2003) we couldn't have a permanent wall clock in the living room. We tried putting several clocks but they stopped after running several weeks even though the clock and the battery is good. Some of them are still working in other places. So we didn’t try to put any more. After I build two small scale clocks, I wanted to build a bigger one for the living room. Here are some pictures of the clock. Still it is too early to say that the same thing will happen to this as well.







The display is created using a LED matrix. This is because I couldn’t find a suitable size seven segments in the market. Display comprises of four 4x7 matrices with a colon and a decimal point which is driven by two MAX7221. RTC is DS1307 with DS32KHz crystal. Temperature sensor is DS18S20. The brain of the clock is gigantic 40 pin PIC16F877A with 8k code space. Everything is assembled inside a plastic box file. Working with the two display drivers (MAX7221) was not that difficult but they didn’t work without the two 0.1uF capacitors close by. Program was slightly modified to accommodate two display drivers with the new numeric font. I designed several fonts and finally settled with the one shown.