Anda di halaman 1dari 27


The project is designed to automatically operate an electric bell several times as required in
an educational institution like school or college. It overcomes the difficulties of switching the
bell on/off manually.
When this time equals to the programmed ON time, then the corresponding Relay for the
device is switched ON and then OFF as per the OFF time that finally switches the load ON
or OFF. Matrix keypad helps entering the time while relays used with relay drivers for the
Furthermore, this project can be enhanced by interfacing a GSM modem to the existing
project so that the bell ringing system can be controlled by sending an SMS to the control


This Project takes over the task of Ringing of the Bell in Colleges.
It replaces the Manual Switching of the Bell in the College. When this time equals to the Bell
Ringing time, then the Relay for the Bell is switched on. Count down time is displayed on
LCD display. The Microcontroller AT89c51 is used to control all the Functions. When the set
time is equal to zero then the Bell is switched on and this process is going until we switch off
microcontroller unit.
This project can be used in the exam mode where user can set the exam
start time and exam end time. The display will show the exam started and when exam time
over it will show the exam end and buzzer will ring for indication.
The implementation of this automatic college bell would be advantageous since it keeps
manual work away i.e. there is no requirement of any labour, it runs automatically.


The AT89S52 is a low-power, high-performance CMOS 8-bit microcomputer with 64 Kbytes
of Flash Programmable and Erasable Read Only Memory (PEROM). The device is

manufactured using Atmels high density non-volatile memory technology and is compatible
with the industry standard MCS-51 instruction set and pin out.
The on-chip Flash allows the program memory to be reprogrammed in-system or by a
conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with
Flash on a monolithic chip, the Atmel AT89s52 is a powerful microcomputer which provides
a highly flexible and cost effective solution to many applications.
LCD Display:
It will display the time, date as well as current room temperature. Output of microcontroller
is applied to the LCD display.
Buzzer & Buzzer driver:
Output of microcontroller is applied to buzzer driver which drives buzzer after lecture.
Power Supply

There are many types of power supply. Most are designed to convert high voltage AC mains
electricity to a suitable DC voltage supply for electronic circuits and other devices. A power
supply can by broken down into a series of blocks, each of which performs a particular
A 5V regulated supply

Each of the blocks is described in more detail below:

Transformer - steps down high voltage AC mains to low voltage AC.

Rectifier - converts AC to DC, but the DC output is varying.

Smoothing - smoothes the DC from varying greatly to a small ripple.

Regulator - eliminates ripple by setting DC output to a fixed voltage.

Bridge rectifier
A bridge rectifier can be made using four individual diodes, but it is also available in special
packages containing the four diodes required. It is called a full-wave rectifier because it uses
all the AC wave (both positive and negative sections). 1.4V is used up in the bridge rectifier
because each diode uses 0.7V when conducting and there are always two diodes conducting,
as shown in the diagram below. Bridge rectifiers are rated by the maximum current they can
pass and the maximum reverse voltage they can withstand (this must be at least three times
the supply RMS voltage so the rectifier can withstand the peak voltages

Smoothing is performed by a large value electrolytic capacitor connected across the DC
supply to act as a reservoir, supplying current to the output when the varying DC voltage
from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and
the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC,
and then discharges as it supplies current to the output.

Voltage regulator
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output
voltages. They are also rated by the maximum current they can pass. Negative voltage
regulators are available, mainly for use in dual supplies. Most regulators include some
automatic protection from excessive current ('overload protection') and overheating ('thermal
Many of the fixed voltage regulator ICs have 3 leads and look like power transistors, such as
the 7805 +5V 1A regulator shown on the right. They include a hole for attaching a heatsink if

Circuit Diagram & Description

Circuit Diagram:
Microcontroller Section

Power supply Section

Keypad Section


When we have to learn about a new computer we have to familiarize about the
machine capability we are using, and we can do it by studying the internal hardware design
(devices architecture), and also to know about the size, number and the size of the registers.
A microcontroller is a single chip that contains the processor (the CPU), non-volatile
memory for the program (ROM or flash), volatile memory for input and output (RAM), a
clock and an I/O control unit. Also called a "computer on a chip," billions of microcontroller
units (MCUs) are embedded each year in a myriad of products from toys to appliances to
automobiles. For example, a single vehicle can use 70 or more microcontrollers. The
following picture describes a general block diagram of microcontroller.


The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller

with 8K bytes of in-system programmable Flash memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to
be reprogrammed in-system or by a conventional nonvolatile memory programmer. By
combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip,
the Atmel AT89S52 is a powerful microcontroller, which provides a highly flexible and costeffective solution to many, embedded control applications. The AT89S52 provides the
following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog
timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the
AT89S52 is designed with static logic for operation down to zero frequency and supports two
software selectable power saving modes. The Idle Mode stops the CPU while allowing the
RAM, timer/counters, serial port, and interrupt system to continue functioning. The Powerdown mode saves the RAM con-tents but freezes the oscillator, disabling all other chip
functions until the next interrupt.

The hardware is driven by a set of program instructions, or software. Once familiar with
hardware and software, the user can then apply the microcontroller to the problems easily.

The pin diagram of the 8051 shows all of the input/output pins unique to microcontrollers:

The following are some of the capabilities of 8051 microcontroller.

1. Internal ROM and RAM
2. I/O ports with programmable pins
3. Timers and counters
4. Serial data communication
The 8051 architecture consists of these specific features:

16 bit PC &data pointer (DPTR)

8 bit program status word (PSW)

8 bit stack pointer (SP)

Internal ROM 8k

Internal RAM of 256 bytes.

4 register banks, each containing 8 registers

80 bits of general purpose data memory

32 input/output pins arranged as four 8 bit ports: P0-P3

Two 16 bit timer/counters: T0-T1

Two external and three internal interrupt sources Oscillator and

clock circuits.

Liquid Crystal display (LCD):

The three control lines are EN, RS, and RW.
The EN line is called "Enable." This control line is used to tell the LCD that you are sending
it data. To send data to the LCD, your program should make sure this line is low (0) and then
set the other two control lines and/or put data on the data bus. When the other lines are
completely ready, bring EN high (1) and wait for the minimum amount of time required by
the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.
The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is high
(1), the data being sent is text data which should be displayed on the screen. For example, to
display the letter "T" on the screen you would set RS high.
The RW line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command.
All others are write commands--so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by
the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,
DB4, DB5, DB6, and DB7.
Liquid Crystal Display also called as LCD is very helpful in providing user interface as well
as for debugging purpose. The most common type of LCD controller is HITACHI 44780
which provides a simple interface between the controller & an LCD. These LCD's are very
simple to interface with the controller as well as are cost effective.

2x16 Line Alphanumeric LCD Display

The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16
characters), 2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty
characters per line).
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on data
lines depends on the mode of operation. If operated in 8-bit mode then 8 data lines + 3
control lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4 data lines +
3 control lines i.e. 7 lines are required. How do we decide which mode to use? Its simple if
you have sufficient data lines you can go for 8 bit mode & if there is a time constrain i.e.
display should be faster then we have to use 8-bit mode because basically 4-bit mode takes
twice as more time as compared to 8-bit mode.






Supply Voltage


Contrast Setting


Register Select


Read/Write Select


Chip Enable Signal








Data Lines

Gnd for the

Vcc for backlight

When RS is low (0), the data is to be treated as a command. When RS is high (1), the data
being sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD. When RW
is high (1), the program is effectively reading from the LCD. Most of the times there is no
need to read from the LCD so this line can directly be connected to Gnd thus saving one
controller line.
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal is
required to latch the data. The LCD interprets and executes our command at the instant the
EN line is brought low. If you never bring EN low, your instruction will never be executed.

8051 Interfacing to LCD

Electrical ringing bell:-

An electric bell is a mechanical bell that functions by means of an electromagnet. When an

electric current is applied, it produces a repetitive buzzing or clanging sound. Electric bells
have been widely used at railroad crossings, in telephones, fire and burglar alarms, as school
bells, doorbells, and alarms in industrial plants, but they are now being widely replaced with
electronic sounders.
How it works
The most widely used form is the interrupter bell, which produces a continuous sound when
current is applied. See animation, above. The bell or gong (B), which is often in the shape of
a cup or half-sphere, is struck by a spring-loaded arm (A) with a metal ball on the end called a
clapper, actuated by an electromagnet (E). In its rest position the clapper is held away from
the bell a short distance by its springy arm. When an electric current is enabled to pass
through the winding of the electromagnet (via a closing of the switch (K) i.e. pressing the
door bell) it creates a magnetic field that attracts the iron arm of the clapper, pulling it over to
give the bell a tap. This opens a pair of electrical contacts (T) attached to the clapper arm,
interrupting the current to the electromagnet. The magnetic field of the electromagnet
collapses, and the clapper springs away from the bell. This closes the contacts again, allowing
the current to flow to the electromagnet again, so the magnet pulls the clapper over to strike
the bell again. This cycle repeats rapidly, many times per second, resulting in a continuous
The tone of the sound generated depends on the shape and size of the bell or gong resonator.
Where several bells are installed together, they may be given distinctive rings by using
different size or shapes of gong, even though the strike mechanisms are identical.
Another type, the single-stroke bell, has no interrupting contacts. The hammer strikes the
gong once each time the circuit is closed. These are used to signal brief notifications, such as
a shop door opening for a customer, rather than continuous warnings.

PCB Design Basics:

PCB Design Layout

In the PCB design of electronics circuit, it is important that one plan and has a checklist of
the do's and don'ts before proceeding to do the printed circuit board layout. The
understanding of the circuit is critical to the design, for example one needs to understand the
maximum current and voltage that are carried by each conductor in order to determine the
track width of the conductor and the type of PCB that will be used.
The voltage difference between each track will determine the clearance between each
conductor. If the clearance is not enough, chances are that the electrical potential between
each track will cause spark over and short circuit the PCB. This will cause functional failure
to the product and the safety of the users that are using the product will be compromised. It is
therefore critical for one to understand some of these basics requirements before one proceed
to design the PCB.
Conductor Thickness and Width
The PCB conductor thickness and width will determine the current carrying capacity of the
track. The IPC standard for the conductor thickness and width of the common 1 oz/squarefeet PCB is as shown below. However, it is always advisable to use a bigger value due to the
tolerance and variation of the PCB processes. If higher current carrying capacity is required, a
2 oz/square-feet or 3 oz/square-feet type of PCB is preferred. Many electronics hobbyist
prefer to solder a thick cooper conductor on the PCB track to increase the current carrying
capacity of the track.

*.BOT - bottom copper
*.SMB - Solder mask bottom
*.SST - Silk screen top
*.ASY - Assembly top, contains the board outline
*.DS - drill sizes
Tracks Restricted Area
Tracks should not be located on the areas that can cause them to be peeled off easily. One of
the restricted areas is holes on the PCB which are used to mount screws or PCB spacers.
These holes are usually used to secure the PCB to a casing or to secure it in a fixed place.
The edges of the PCB should not have any tracks as these areas are usually used to transport
the PCB from one process to another process by using a conveyor belt. These edges are
places where the possibility of scratches and cracking of the PCB happens. The

recommended areas that should not have any track is as shown in the diagram below
assuming a hole diameter of 4 mm which is used to mount a PCB spacer.
First a few safety precautions:

Never touch the element or tip of the soldering iron.

They are very hot (about 400C) and will give you a nasty burn.

Take great care to avoid touching the mains flex with the tip of the iron.
The iron should have a heatproof flex for extra protection. An ordinary plastic flex
will melt immediately if touched by a hot iron and there is a serious risk of burns and
electric shock.

Always return the soldering iron to its stand when not in use.
Never put it down on your workbench, even for a moment!

Work in a well-ventilated area.

The smoke formed as you melt solder is mostly from the flux and quite irritating.
Avoid breathing it by keeping you head to the side of, not above, your work.

Wash your hands after using solder.

Solder contains lead which is a poisonous metal.

Preparing the soldering iron:

Place the soldering iron in its stand and plug in.

The iron will take a few minutes to reach its operating temperature of about 400C.

Dampen the sponge in the stand.

The best way to do this is to lift it out the stand and hold it under a cold tap for a
moment, then squeeze to remove excess water. It should be damp, not dripping wet.

Wait a few minutes for the soldering iron to warm up.

You can check if it is ready by trying to melt a little solder on the tip.

Wipe the tip of the iron on the damp sponge.

This will clean the tip.

Melt a little solder on the tip of the iron.

This is called 'tinning' and it will help the heat to flow from the iron's tip to the joint.
It only needs to be done when you plug in the iron, and occasionally while soldering
if you need to wipe the tip clean on the sponge.

Program Burning Into Microcontroller:

Microcontroller with LCD

Power Supply:



This system can be used in colleges for regular lecture bell.

It can be also used in institutes, coaching classes etc

This project can be used in companies after some modifications

There is no requirement of any labour, it runs automatically & decreases dependability on
The chances of errors are less compared to manual system.

Future Scope:

Wireless technology can be used for further advancements

Time table can be displayed after some modifications


The 8051 microcontroller :- Kenneth Ayala

The 8051 microcontroller and Embedded systems :- Muhammad Ali Mazidi