Mini Project Report
Mini Project Report
Project Report
On
CLOCK GENERATOR WITH ALARM
Submitted to
in partial fulfilment of the requirement for the award of Degree of
BACHELOR OF TECHNOLOGY
In
G Sharon {R190834}
N Gayathri {R190047}
N Mounika {R190881}
D.DEVIKA (M.Tech)
Assistant Professor.
Department of E.C.E
(2021 – 2025)
(2021 – 2025)
CERTIFICATE
This is to certify that the project report entitled “CLOCK GENERATOR WITH ALARM”
bonafide record of the project work done and submitted by
B Sai Deepthi {N190115}
G Sharon {R190834}
N Gayathri {R190512}
N Mounika {R190368}
for the partial fulfilment of the requirements for the award of B.Tech Degree in ELECTRONICS
AND COMMUNICATION ENGINEERING, RGUKT RK Valley.
fulfilment of requirements to complete Mini Project in 3 rd year in B.Tech. This project is the result of our
own effort.
Project Associates
B Sai Deepthi {N190115}
G Sharon {R190834}
N Gayathri {R190047}
N Mounika {R190881}
Project Associates
B Sai Deepthi {N190115}
G Sharon {R190834}
N Gayathri {R190047}
N Mounika {R190881}
Nowadays everybody is using clocks and Alarms.Without a Clock it’s too difficult to get pass a day .It plays a
vital role in daily life. Clocks are being used to know the exact time.Alarms are used to wakeup ,set reminder
at particular time .Without alarms we cannot wakeup on time due laziness or tired.Alarms are used for Time
management.
We are implementing “CLOCK GENERATOR WITH ALARM”.So design of clock along with alarm is
needed.At first we are generating a clock.
The clock generated is in 24-hour format.After generating the clock ,we are initializing the clock time to a
particular value in order to set the Alarm.Then after we Enable and disable the alarm. After sometime we need
to stop the alarm and the clock should be operated normally.
INTRODUCTION
An alarm clock is a clock that is design to alert an individual or group of individual at a specified time. The
primary function of this clock is to awaken people from there night’s sleep or short naps.We are generating a
clock with 7 output signals including alarm signal, hour,minute,and second. The clock generated is in a 24
hour format .Alarm have been in use for centuries because they slove a real problems-ensuring wake up on time.
The First alarm clock was invented in 1787 by Levi Hulchins in the USA.But it rings at 4 o’clock in the
morning.The first alarm with mechanical and adjustable time was palented in 1847 by French Antoine Redier.
The first radio alarm clock was invented by James F.Reynolds,in the 1940’s and another design was also
invented by Paul L.Schroth.
Alarm are used in mobile phone,watches and computers.Many alarm clocks have radio
receivers that can be set to start playing at specified time and are known has clock radios.Some alarm clock
can set multiple alarm.
There are two types of alarm clocks
Traditional mechanical alarm clocks have one are two bells that ring by means of a
mainspring that power a gear to quickly move a hammer back and forth between two bells or
between the interior sides of a single bell.the bell is rung by an electromagnetic circuit and
armature to turn the circuit on and off repeatedly.
Digital alarm clocks can make other noises.Simple battery-powered alarm clocks make a lound buzzing are
beeping sound to wake a sleeper,while novelty alarm clock can speak,laugh,sing,or play sound from nature.
The earliest patent for a digital Alarm clock was registered by D.E Protzmann and others on October 23,1956,
in the United States.Protzmann and his associates also patented another digital clock in 1970,which was said to
use a minimal amount of moving parts.
3.Existing Technologies:
1. Computer Alarms:Alarm clock software programs have been developed for personal computers.They are
Web based alarm clocks,some of which may allow a virtually unlimited number of alarm times and
personalized tones.However,unlike mobile phone alarms ,they have some limitations.They do not work when the
computer shut off or in sleep mode.
2.Mobile phone Alarms:Many modern mobile phones features built-in alarm clock that do not need the phone
to be switched on for the alarm to ring off.Some of these mobile phones features the ability for the user to set
the alarms ringtone and in some cases music can be downloaded to the phone and then choosen to play for
walking.
3.Watch Alarms:The vibrations of a mechanical alarm also offer a real connection between the wearer and the
watch.The alarm itself was set within a 12-hour period and attached to a cam under a dial.When triggered ,the
cam activates a lever which then releases the energy from the alarms mainspring to power a hammer.
Verilog is known for its concise and powerful syntax, allowing developers to describe complex
hardware behavior in a clear and efficient manner.
Verilog uses an event driven simulation model, making it an ideal choice for digital design and
verification, especially for systems with asynchronous components.
It is a hardware description language, enabling designers to model and simulate digital systems and
circuits, making it an integral language in the field of electronic design automation.
Fig. 1
3.1 Importance:
PDigital clocks are inexpensive and easy to use. Depending on the product designs, these devices can
be small hence easy to incorporate into all kinds of devices such as radios, cars, computers, cell
phones, standard ovens, televisions etc. These clocks give more accurate time readings than regular
analog clocks.Moreover these devices are easier to understand and have an easier time these devices
are easier to understand and have an easier time concept. The alarm and stopwatch functionalities
are also straight forward.
3.3 : Objective
we have implemented both 12-hour and 24-hour digital clocks in Verilog and Proteus. Digital clocks
are preferred nowadays for precise time keeping. These are also very easy to use. In our clock we have
also implemented alarm and stopwatch functionality. So, users can set time according to their
requirements. The outputs are shown on seven-segment displays, hence seven-segment controllers are
also implemented.
The xilinx ISE is primarily used for circuit synthesis and design,while ISIM or the
ModelSim logic simulator is used for system-level testing.
Verilog is one fo the two most common Hardware Description languages(HDL) used by integrated
circuits(IC)designers. The other one is VHDL. Verilog can be used to describe designs at four
levels of abstraction. They are the algorithmic level,the register transfer level, the gate level and
the switch level. After a design passes basic the functional validations, it must be synthesized into
a netlist of components of a target library.The target library is the specification of the hardware
that the design is being synthesized to.Verilog constructs used in the Verilog description of
A clock is design for its verification or those for timing checks and timing specificationsare not
synthesizable. A verilog design that is to be synthesized must use language constructs that have a
clear hardware correspondence.
The basic structure of Verilog in which all hardware components and testbenches are described is
called a module. Language constructs, in accordance to Verilog syntax and semantics form the
inside of a module. These constructs are designed to facilitate the description of hardware
components for simulation, synthesis, and specification of testbenches to specify test data and
monitor circuit responses
5.1 Features/Objectives:
1. Clock generation
2. Initializing clock time to a particular value
3. Setting time for Alarm
4. Enabling and disabling alarm
5. Stopping the Alarm
Output Signals:Alarm,H_out1,H_out0,M_out1,M_out0,S_out1,S_out0
InternalSignals:tmp_1s,clk_1s,tmp_hour,tmp_minute,tmp_second,c_hour1,a_hour1,c_hour0,a_h
our0,c_min1,a_min1,c_min0,a_min0,c_sec1,a_sec1,c_sec0,a_sec0.
6.1 Specifications :
We can give an initial time value to the system when reset signal=1 or by turning the signal LD_time=1. You
can further set the alarm time by turning LD_alarm=1.
The alarm is enabled or disabled using the input AL_ON. The alarm rings only if AL_ON is 1. STOP_al
signal is used to stop the alarm. The input clock given as input is 10Hz. We have generated a clk with time
period 1 second from this input clock and used it to increment seconds and further minutes and hours.
• reset : Active high reset pulse, to set the time to the input hour and minute (as
defined by the H_in1, H_in0, M_in1, and M_in0 inputs) and the second to 00. It
should also set the alarm value to 0.00.00, and to set the Alarm (output) low.For
normal operation, this input pin should be 0
• clk : A 10Hz input clock. This should be used to generate each real-timesecond.
H_in1 : A 2-bit input used to set the most significant hour digit of the clock (if LD_time=1),or the most
significant hour digit of the alarm (if LD_alarm=1). Valid values are 0 to 2.
• H_in0 : A 4-bit input used to set the least significant hour digit of the clock (iF LD_time=1) or the least
significant hour digit of the alarm (if LD_alarm=1). Valid values are 0 to 9.
• M_in1 : A 4-bit input used to set the most significant minute digit of the clock (if LD_time=1),or the most
significant minute digit of the alarm (if LD_alarm=1). Valid values are 0 to 5.
• M_in0 : A 4-bit input used to set the least significant minute digit of the clock (if LD_time=1),or the least
significant minute digit of the alarm (if LD_alarm=1). Valid values are 0 to 9.
• LD_alarm : If LD_alarm=1, the alarm time should be set to the values on the inputs H_in1, H_in0, M_in1,
and M_in0.If LD_alarm=0, the clock should act normally.
• STOP_al : If the Alarm (output) is high, then STOP_al=1 will bring the output back low.
• AL_ON : If high, the alarm is ON (and Alarm will go high if the alarm time equals the real time). I f low
the the alarm function is OFF.
• Alarm : This will go high if the alarm time equals the current time, and AL_ON is high. This will remain
high, until STOP_al goes high, which will bring Alarm back low.
• tmp_1s : count for creating 1-s clock tmp_hour, tmp_minute, tmp_second : counter for clock hour, minute
And second.
• c_hour1,a_hour1 : The most significant hour digit of the temp clock and alarm.
• c_hour0,a_hour0 : The least significant hour digit of the temp clock and alarm.
• c_min1,a_min1 : The most significant minute digit of the temp clock and alarm.
• c_min0,a_min0 : The least significant minute digit of the temp clock and alarm.
7.1 Code:
module Aclock(
input reset,
input clk,
input [1:0] H_in1,
input [3:0] H_in0,
input [3:0] M_in1,
input [3:0] M_in0,
input LD_time,
input LD_alarm,
input STOP_al,
input AL_ON,
output reg Alarm,
output [1:0] H_out1,
output [3:0] H_out0,
output [3:0] M_out1,
output [3:0] M_out0,
output [3:0] S_out1,
output [3:0] S_out0);
reg clk_1s;
reg [3:0] tmp_1s;
reg [5:0] tmp_hour, tmp_minute, tmp_second;
reg [1:0] c_hour1,a_hour1;
reg [3:0] c_hour0,a_hour0;
reg [3:0] c_min1,a_min1;
reg [3:0] c_min0,a_min0;
reg [3:0] c_sec1,a_sec1;
reg [3:0] c_sec0,a_sec0;
function [3:0] mod_10;
input [5:0] number;
begin
mod_10 = (number >=50) ? 5 : ((number >= 40)? 4 :((number >= 30)? 3 :((number >= 20)? 2 :
((number >= 10)? 1 :0))));
end
8.1 Testbench:
module Testbench;
reg reset;
reg clk;
reg [1:0] H_in1;
reg [3:0] H_in0;
reg [3:0] M_in1;
reg [3:0] M_in0;
reg LD_time;
reg LD_alarm;
reg STOP_al;
reg AL_ON;
// Outputs
wire Alarm;
wire [1:0] H_out1;
wire [3:0] H_out0;
wire [3:0] M_out1;
wire [3:0] M_out0;
wire [3:0] S_out1;
wire [3:0] S_out0;
Aclock uut (
.reset(reset),
.clk(clk),
.H_in1(H_in1),
.H_in0(H_in0),
.M_in1(M_in1),
.M_in0(M_in0),
.LD_time(LD_time),
.LD_alarm(LD_alarm),
.STOP_al(STOP_al),
.AL_ON(AL_ON),
.Alarm(Alarm),
● Proposed method could include advanced features like customizable alarm tones.
● smart home integration.
● even bio-sensors to walk you up at the optimalsleep stage.
● Innovtion in technology could lead to more personalized and efficient alarm clock
solutions.
1Hz pulse from 555 timer drives the first counter from the right, so it counts up each second, acts as a divide
by 10 counter. After counting 9, this counter resets itself to 0 and sends a carry over to the next counters clock
input, so the next counter increases one count. Then, after the second counter reaches 5 and is about to count
to 6, it resets itself to 0 and sends a clock pulse to the third counter. Thus, it acts as a divide by 6 counter.
Third counter again works as a divide by 10 counter and the fourth counter acts as a divide by 6 counter in the
previous way. So we get counts for seconds and minutes. The fifth counter sends a carry over clock pulse to
the sixth counter after counting 9, then resets itself to 0.
• Alarm clocks can also be helpful for keeping sleep schedules regular.
• Waking Up around the same time each day is beneficial for our internal biological clocks.
• Using an alarm clock can help keep our schedule consistent and normalize our sleep patterns.
• Some alarm clocks have brightly-lit faces and while good for seeing the time .
● Alarm clocks can help normalize sleep schedules, ensure punctuality, and provide peace of mind about
waking up on time.
● However, there are potential downsides to alarm clocks, including sleep anxiety, stress from sudden
wake-ups, and disruption of natural circadian rhythms.
● Unlike digital devices such as smartphones and computers, which are distracting with their notifications
and alerts, a wall clock provides a constant visual reminder of the time, helping you stay on track and
manage your schedule more effectively.
●
It can help improve your sleep quality, eliminate distractions, save your phone's battery life, provide a less
stressful wake-up experience, and be more reliable.
●
alarm clock may help you remember to get up in time for breakfast and supper, as well as to remind you of
key activities that day.
●
clocks can keep time accurately for long periods, barring power cuts; over months they are more accurate
than a typical quartz clock.
• Waking up abruptly can cause higher blood pressure and heart rate.
• Alarm clocks provoke stress to the heart.
• Alarm can certainly cause hearing loss.
•Multiple alarms repeatedly cause the brain to start waking up and then settle again,only to be disturbed five
minutes later.
•The repetitive awekenings disrupt sleep quality.
•Sleepers can become accustomed to the sound of their alarm clock if it has been used for a
period of time,making it less effective.
10.4 Conclusion:
We implemented Clock Generator with Alarm using verilog.When the alarm time matches with the real clock
time ,then the alarm will be raised.Otherwise the alarm does not ring and the clock will be operated normally.
The clock is incremented by each one second(1second=10 input clock cycles).The Alarm is raised then it needs
to be turned off after some time.This way we set alarms because they are very essential in our daily life.
• Scientific studies on sleep having shown that sleep stage at awakening is an important factor in amplifying
sleep inertia.The alarm clocks use sensing technologies such as EEG electrodes and accelerometers to wake
people from sleep.Dawn simulators are another technology meant to mediate these effects.
• Sleepers can become accustomed to the sound of their alarm clock if it has been used for a period of time,
making it less effective.Due to progressive alarm clocks complex waking procedure,they can deter this adapt
to more stimuli than just a simple sound alert.
●
The Verilog code can be used to design an IC for digital clock. This will make the clock circuit even smaller
● Analog clock mode can be added Display can be upgraded to more marketable formats
● Current date display can be added
● The IC implementation can be added to other devices
● Device screen saver effects can be added
● Daylight saving time may be added along with the incorporation of automatic synchronization by a radio
time signal so that available clocks don’t need to be readjusted Proteus circuit can be improved by making
it smaller and more efficient for practical implementation
●
Clock font customization can be added
●
Different sound effects for the alarm can be added
●
Other visualization effects can be added
The deaf and hard of hearing are often unable to perceive auditory alarms when
alseep.They may use alarms with a light in their bedroom that slowly rises in order to mimic the
rising sun.It actually triggers hormones in your body to slowly wake you up.
Alarms Clocks in the future will wake you up with a Scent:
10.6 Contributions: