Documente Academic
Documente Profesional
Documente Cultură
1. Abstract
Alarm clocks are designed to make a sound, or some other signal, at a specific
time. The primary utility of these clocks is to awaken people from their night's sleep or
short naps; they are sometimes used for other reminders as well. This can be done by
using a buzzer, a bell, or an electronic speaker to generate the sound signal at the
desired instant of time. It is dicult to read the time from an analog clock at night.
Setting the current time and the alarm time is also quite complicated. To solve these
problems, digital clocks are available in the market. However, they are way too costly.
This project aims to develop a programmable alarm clock which has a bright 7
segment display, a loud buzzer and is cost eective.
a. Block Diagram
The device runs on a 12V regulated power supply. The micro controller is the
heart of the device. It provides the data for the display, alarm and time adjustment
circuit. The time adjustment circuit is used to input data into the micro controller.
c. Assumptions Made
It is assumed that the user is acquainted with the 24-hour clock format.
3. Hardware Design
a. Overview
The device makes use of a 12VDC wall adapter. The micro controller used is
PIC18F452 which sits on one circuit board while the display, alarm and time
adjustment circuit is built on a totally dierent circuit board.
b. Schematic
1.
Micro controller - PIC18F452 40 Pin DIP package.
2.
12VDC Power Adapter and a DC jack.
3.
5V Voltage Regulator IC - 7805 provides a constant 5 volts for the
two circuits.
4.
10F and 100F electrolytic capacitors for the voltage regulator.
5.
16Mhz crystal oscillator with 33pF mica capacitors.
6.
For the reset circuit, a tactile switch, and a 4.7K pull-up resistor.
7.
6 seven segment displays for the display of time.
8.
For the 6 displays, 6 BC548 NPN transistors each with 10K
resistors connected to their base terminals.
9.
8 current limiting 220 resistors for the data terminals of the
displays.
10. 5 tactile switches: Two for setting the hours and minutes, one for
alarm dismissal, one for alarm snooze, and one for mode
selection.
11. One piezoelectric buzzer for providing the sound signal on alarm
condition connected through a BC548 NPN transistor and a 10K
resistor connected to its base terminal.
4. Software Design
a. Overview
The micro controller keeps track of the current time in an ecient manner so as
to reduce the time lost over a long period of time. It makes use of the Timer 0
for maintaining time. The timer is programmed to generate an interrupt every
one second which is used to increment the clock.
There are separate flags defined in the program for recording the critical
events happening during the course of execution of the program.
For example, the mode switch is continuously monitored by the micro controller
to check if the user wants the device to display the time or to jump into the
mode which allows them to set the current time or the alarm time.
Buttons are provided to set the current time & alarm time, dismiss an alarm, or
snooze it for 15 minutes.
Yes
Sound buzzer
5. Conclusions
The alarm clock works as expected and is incredibly useful to get information
about the current time especially at night. The total cost of the device was only a
fraction of the clocks available in the market. The code is bug-free and usage of the
device does not require any programming knowledge or any other advanced
capabilities.
6. References
PIC Microcontroller and Embedded Systems by Muhammad Ali Mazidi, Rolin D.
Mckinlay, Danny Causey - Programming the PIC18F452 to be able to generate
interrupts on timer overflow.
maxEmbedded.com [http://maxembedded.com/2013/01/seven-segmentmultiplexing/] - An introduction to 7 segment displays and how to multiplex them.