Professional Documents
Culture Documents
Wa0006.
Wa0006.
Wa0006.
Chapter 1
Preamble
1.1 Introduction
In today's life, everyone gives importance to time, time does not wait for anybody. Everything
should be performed in time and accurately. Now a day's school or college bells are manually
operated. Hence there is a big question of time management. Also, there is necessity of
manpower and money. Hence automatic control system has been introducing, which saves
manpower and also possible to manage the time.
An automatic college bell system using the PIC microcontroller is a time-saving and efficient
way to ring bells for class start and end times, breaks, and other events in a college or school
setting. The system is designed to automate bell schedules and can be customized to meet the
specific needs of a particular institution.
The system uses a PIC microcontroller to control a sound generator circuit that produces the
required bell sounds. The microcontroller keeps track of the time and triggers the sound
generator circuit at predetermined intervals to indicate the start and end of classes, breaks, and
other events. The system also includes a real-time clock (RTC) module, which is used to keep
accurate time and ensure that the bell rings at the correct times. The RTC module is interfaced
with the microcontroller using the I2C protocol.
Additionally, the system can include a manual override feature, which allows staff or faculty
members to manually ring the bell in the event of an emergency or other unexpected
circumstance.
Overall, an automatic college bell system using the PIC Microcontroller helps to streamline bell
schedules and ensure that classes start and end of the time, providing a more efficient and
productive learning environment for students and teachers alike.
programming keypad module, a display module, and a relay control module. This system
detects the current time and rings the bell accordingly[1].
Another research work is presented by M. H. Shakir which uses Microcontroller, that allows
for the easy programming of bell schedules. The system uses an LCD display and keypads to
input the settings, and relays to activate the bells [3].
The M. M. ElBakary and F. A. Abd ElSalam, have designed an automatic college bell using a
Microcontroller with an up-counting timer circuit. The system utilizes a display module and
push-buttons for programming, and relays for activating the bell [4].
Lastly, a research work by A. M. Rafie, et al. proposed an automatic college bell system using
the microcontrollers with a real-time clock (RTC) to keep up the time. The system is developed
with a visual basic interface and can be programmed digital to adjust and customize the ringing
time [5].
Overall, the literature survey demonstrates that the development of automatic college bells
using Microcontrollers is a relevant and essential area of research with a considerable potential
for providing schools and colleges with a more efficient, reliable and cost-effective way of
ringing bells.
The manual bell ringing method addresses the several issues and challenges in academic
institutions and factories. Some of the major challenges include:
a. Inaccurate timekeeping: Manually ringing the bell can be prone to human error, resulting
in classes starting or ending late, which can lead to disruptions in the learning process.
b. Time-consuming: Manually ringing the bell can be time-consuming, especially for larger
institutions with multiple buildings or classrooms, which can lead to delays and
inconvenience for students and teachers.
c. Inflexibility: Manually ringing the bell can be inflexible and challenging to adjust. For
example, if there are changes to the class schedule or an emergency arises, it may be
difficult to make adjustments without disrupting the entire bell schedule.
d. Lack of customization: Manual bell ringing systems may not be customizable to meet the
specific needs of a particular institution, which can lead to inefficiencies.
e. Emergency situations: In case of an emergency, there may not be anyone available to
manually ring the bell, which could result in confusion and potential safety hazards.
An automatic college bell system using the PIC microcontroller aims to address these
challenges and provide a more reliable and efficient way to ring bells in a school or college
setting.
1.4 Objectives
The objective of an automatic college bell system using the PIC microcontroller is to provide
an efficient and reliable way to ring bells at predetermined intervals in a college or school
setting. The system aims to:
a. Automate the bell schedule to ensure that classes start and end on time, creating a more
productive learning environment for both students and teachers.
b. Provide accurate and reliable timekeeping using the RTC module, ensuring that the bell rings
at the correct times.
c. Eliminate the need for manual bell ringing, which can be time-consuming and prone to error.
d. Provide a customizable system that can be adapted to meet the specific needs of a particular
institution.
e. Include a manual override feature to ring the bell in the event of an emergency or other
unexpected circumstance.
Overall, the objective of an automatic college bell system using the PIC microcontroller is to
simplify the process of ringing bells in a school or college and create a more efficient and
productive learning environment.
1.5 Methodology
An automatic college bell system using PIC Microcontroller can be divided into several processes:
The organization of the automatic college bell system entails connecting the clock module, input
module, display module, relay module, and power supply to the microcontroller.
• The microcontroller is programmed to process input signals from the input module and
store bell schedules in its memory.
• When the system is activated, the microcontroller retrieves the bell schedules from the
memory and marks the time against the clock module.
• When the programmed time is due, the microcontroller sends signals to the relay
module, which activates the bell, and rings according to the pre-programmed schedule.
• By organizing the above components accordingly, the automatic college bell system
using pic microcontroller provides a reliable, efficient, and cost-effective way of ringing
bells in schools and colleges.
Chapter 2
Project Overview
2.1 Block Diagram
Fig 2.1 shows the block diagram of the automatic college siren system using PIC microcontroller.
An automatic college bell system using PIC Microcontroller can be divided into several parts:
i. Microcontroller: The heart of the system is the PIC Microcontroller, which receives input
signal from various sources, processes them, and activates the bell accordingly. The controller
regulates and executes the system functions using the program stored in the internal memory.
ii. Clock module: The clock module is an essential component in the automatic college bell
system. It provides an accurate reference time for the system and ensures that the bell rings at
the appropriate times. The clock module can either be a real-time clock.
iii. Input module: The input module provides the interface to the microcontroller and allows the
input of bell schedules and settings. This module can comprise a keypad, switches, or a
graphical user interface.
iv. Display module: The display module provides a visual output for the system and can be used
to display the current time, bell schedules, and other relevant information. The display module
can either be an LED display or an LCD display.
v. Relay module: The relay module is used to activate the bell and is controlled by the
microcontroller. When the bell schedule is active, the microcontroller sends signals to the relay
module to activate the bell.
vi. Power supply: The power supply module is an essential part of the system as it powers all the
components.
vii. Push Buttons: The buttons are used to set the different operations.
The Fig 2.2 shows pin diagram of a PIC microcontroller is a type of microcontroller developed
by Microchip Technology Inc. It stands for Peripheral Interface Controller and is widely used
in various electronic devices and applications. PIC microcontrollers are known for their low
power consumption, high performance, and ease of use. They are commonly used in embedded
systems, automation, control systems, and other applications that require real-time processing.
PIC microcontrollers come in different variants with varying features and capabilities. They
have a wide range of input/output pins, timers, counters, Analog-to-digital converters,
communication interfaces, and other peripherals that can be utilized for different purposes.
Overall, PIC microcontrollers are popular choices for many electronic projects due to their
versatility, affordability, and wide range of available resources and support.
FEATURES
The Fig 2.3 shows DS1307, which is a popular real-time clock (RTC) module developed by
Maxim Integrated. It is widely used in electronic projects that require accurate timekeeping.
Some of the key features of the DS1307 include:
• Accurate Timekeeping: The DS1307 uses a 32.768 kHz quartz crystal oscillator to keep
track of time. It can maintain the time even when the main power is disconnected.
• Battery Backup: The module has a built-in battery backup that allows it to continue
keeping time even when the main power supply is interrupted. This ensures that the
time is not lost during power outages or when the device is turned off.
• I2C Interface: The communication with the DS1307 module is done using the I2C
(Inter-Integrated Circuit) protocol. This makes it easy to interface the module with
microcontrollers, Arduino boards, and other digital devices.
• 56-Byte Non-Volatile RAM: The DS1307 has 56 bytes of non-volatile RAM that can
be used for storing additional data. This memory is useful for storing configuration
settings or user-defined data.
• Alarm Functionality: The module can be programmed to generate an interrupt signal
at specific times or dates. This feature is useful for implementing time-based alarms or
triggering events at specific intervals.
• Low Power Consumption: The DS1307 is designed to consume very low power,
making it suitable for devices that run on batteries or solar power.
• Easy to Use: The module comes with ready-to-use libraries and example codes that
simplify the integration with different microcontroller platforms.
Overall, the DS1307 real-time clock module is a reliable and widely used solution for accurate
time keeping in various electronic projects.
c. LCD Display
A Fig 2.4 shows the 16x2 LCD display is a type of liquid crystal display that can display 16
characters in each of its two rows, resulting in a total of 32 characters. It is commonly used in
various electronic devices such as calculators, digital clocks, and small embedded systems.
The display consists of a grid of 16 columns and 2 rows, with each character being displayed
in a 5x8 pixel matrix. The characters are typically alphanumeric, including letters, numbers,
and some special symbols.
These displays are usually controlled by a microcontroller or other digital circuitry using a
parallel or serial interface. The controller sends commands and data to the display to control
what is shown on the screen. It can be programmed to display custom characters, scroll text,
and perform other functions.16x2 LCD displays are relatively inexpensive and easy to use,
making them popular for hobbyist projects and small-scale applications.
d. Voltage Regulator
Figure 2.4 shows the picture of Voltage regulator. The function of the voltage regulator
includes:
e. Push Button
Push buttons, also known as tactile switches or momentary switches, are commonly used in
electronic devices to provide a user interface for input. They are simple mechanical switches that
are pressed down to make a connection and released to break the connection.
Figure 2.4 shows the picture of Push Button. Push buttons typically have two states: normally
open (NO) and normally closed (NC). In the NO state, the switch is open and no current flows
through it. When the button is pressed, it closes the circuit and allows current to flow, changing
the state to closed. When the button is released, it returns to its open state. Overall, push buttons
are a simple and cost-effective way to add user input functionality to electronic devices and are
widely used in various applications.
f. Relay Drivers
Fig 2.7 shows 12v relay driver, which is a device or circuit that is used to control the operation
of a relay using a 12-volt power supply. A relay is an electromagnetic switch that can be used
to control the flow of electrical current to other devices or circuits.
The 12v relay driver typically consists of a transistor or integrated circuit (IC) that acts as a
switch to control the relay. When a small control signal is applied to the input of the driver, it
activates the transistor or IC, allowing a larger current to flow through the relay coil. This
energizes the coil and causes the relay contacts to close or open, depending on its design.
The 12v relay driver is commonly used in various applications such as automotive systems,
industrial automation, and home automation.
It allows low-power control signals from microcontrollers, sensors, or other electronic circuits
to activate higher-power devices or circuits.
g. Outdoor Siren
Fig 2.8 shows the outdoor siren. It is a device used to produce loud and attention-grabbing
sounds in outdoor environments. It is commonly used in security systems, emergency alert
systems, and public warning systems.
Outdoor sirens are designed to be weatherproof and durable, as they are exposed to harsh
outdoor conditions such as rain, wind, and extreme temperatures. They are typically made of
sturdy materials such as metal or high-quality plastics. The primary purpose of an outdoor siren
is to alert people in the vicinity of a potential danger or emergency situation. It can be activated
manually by a person or automatically triggered by a connected system, such as a security
alarm or emergency response system.
Outdoor sirens usually produce a loud and piercing sound that is easily audible over long
distances. This is achieved through the use of powerful speakers or horns that are designed to
project sound effectively in outdoor environments.
Chapter 3
Hardware Implementation
3.1 Connection diagram
The circuit diagram of automatic college siren system is shown in Fig 3.1.
iii. Bell Schedule: The system stores a predefined bell schedule that specifies the timing and
duration of each bell ring throughout the day. This schedule is typically programmed into
the microcontroller's memory.
iv. Time Comparison: The microcontroller continuously compares the current time obtained
from the RTC with the bell schedule. It determines whether it is time to activate the bell
based on the predefined schedule.
v. Bell Activation: When the current time matches the scheduled bell time, the
microcontroller activates a relay or transistor switch connected to the bell system. This
triggers the bell to ring for the specified duration.
vi. Repeat: The system repeats this process periodically, checking the current time against
the bell schedule and activating the bell accordingly.
vii. Manual Override: The system may also include a manual override feature that allows
authorized personnel to manually activate or deactivate the bell system outside of the
predefined schedule. This can be done through physical switches or through a user
interface connected to the microcontroller.
viii. Fault Handling: The system may incorporate error handling mechanisms to handle any
faults or failures that may occur, such as power outages or communication errors with the
RTC module. These mechanisms can include backup power supplies, error detection
algorithms, and error notifications.
By automating the bell ringing process, the automatic college bell system using a PIC
microcontroller eliminates the need for manual intervention and ensures accurate and timely
bell ringing throughout the day.
Chapter 4
Software Implementation
4.1 Software Used
The MP LAB is a software development environment created by Microchip Technology,
specifically designed for the development of embedded systems using Microchip
microcontrollers. It provides a comprehensive set of tools and features to facilitate the
development, debugging, and programming of microcontroller-based applications. Fig 4.1
shows the symbol appearance of MPLAB.
i. Download: Visit the official Microchip website and download the MPLAB software
package suitable for your operating system.
ii. Installation: Run the downloaded file and follow the installation wizard to install
MPLAB on your computer.
iii. Setup: After installation, launch MPLAB and configure the necessary settings. This
includes selecting the target microcontroller device, setting up the programming tool,
and configuring any additional hardware connections.
iv. Project Creation: Create a new project in MPLAB by specifying the project name,
location, and selecting the appropriate microcontroller device.
v. Code Development: Write your code using the integrated development environment
(IDE) provided by MPLAB. The IDE offers features such as code editing, syntax
highlighting, code completion, and debugging tools to aid in the development process.
vi. Compilation: Compile your code using the built-in compiler within MPLAB. This step
converts your source code into machine-readable instructions specific to the target
microcontroller.
vii. Debugging: MPLAB provides various debugging tools to help identify and fix errors
in your code. It supports features like breakpoints, watch windows, and real-time
debugging to assist in code analysis and troubleshooting.
viii. Programming: Once your code is error-free and ready for deployment, you can use
MPLAB to program the microcontroller. This involves transferring the compiled code
onto the microcontroller's memory using a compatible programming tool.
ix. Testing and Deployment: After programming, test your application on the
microcontroller to ensure it functions as expected. If everything works correctly, you
can deploy your application on the desired hardware or device.
4.2 Program
The program/code of automatic college siren using PIC Microcontroller:
#define MENU_KEY 'D'
#define BELL_TIME 60
sbitLCD_RS_Direction at TRISB7_bit;
sbitLCD_EN_Direction at TRISB6_bit;
return 3; KEY_R0_Direction = 0;
} KEY_R1_Direction = 0;
{ KEY_R3_Direction = 0;
return 4; KEY_R1 = 1;
} KEY_R2 = 1;
KEY_R0 = 1; KEY_R3 = 1;
KEY_R1 = 0; }
if(KEY_C0 == 0) {
{ KEY_R0 = 0;
return 5; if(KEY_C0 == 0)
} {
{ return 1;
while(KEY_C1 == 0); }
} {
{ return 2;
while(KEY_C2 == 0); }
{ return 11;
KEY_C0_Direction = 1; }
KEY_C2_Direction = 1; {
} }
KEY_R3 = 0; address)
Delay_ms(1); {
{ I2C1_Start();
} r_data=I2C1_Rd(0);
{ return(r_data);
while(KEY_C2 == 0); }
minuteB = BCD2Binary(minute);
if(EEPROM_Read(0) == 0xAA)
time[0] = BCD2UpperCh(hr);
{
time[1] = BCD2LowerCh(hr);
rma
Dept. of E&CE,
examBC = 0; GEC, M H Halli 2022-23time[3] = BCD2UpperCh(minute); 21
time[4] = BCD2LowerCh(minute);
Automatic college siren system using PIC Microcontroller
} }
else else
{ {
normalBC = 0; normalBC = 0;
examBC = 0; examBC = 0;
} }
bt = 0; bt = 0;
while(1) while(1)
{ {
bt = 2;
else {
bt = 1; bs = 1;
} }
maxBell = examBC; }
} if(bellActive == 1)
if(bellHour<hourB) {
bc++; LATA.F0 = 1;
bc++; Delay_ms(2);
bsE&CE,
Dept. of = 1; GEC, M H Halli 2022-23 23
bc++;
Automatic college siren system using PIC Microcontroller
{ mt++;
bellActive = 0; flag = 1;
bellCnt = 0; }
} }
mt = 0;
if(kp == MENU_KEY) //Menu
Selection via * button }
{ if(menu == 0)
menu++; {
mt = 0; Lcd_out(1,1,"Time:");
menu = 0; if(mode == 0)
} Lcd_out(2, 1, "NORMAL:");
{ Lcd_out(2, 8, getDay(dday));
if(menu) }
mt++; {
Dept. of E&CE,
flag = 1;GEC, M H Halli 2022-23Lcd_Out(1, 1, "Set Time "); 24
if(mt&&kp) }
{ }
{ {
Lcd_Out(1,1,0); minute =
}
Automatic college siren system using PIC Microcontroller
if(mt&&kp) }
{ }
{ {
Lcd_Out(1,1,0); second = 0;
BCD2Binary(hr); menu = 0;
hour = 23; }
{ if(mt&&kp)
writeDS3231(6, year);
Dept. of E&CE, GEC, M H Halli 2022-23 menu = 0; 27
Automatic college siren system using PIC Microcontroller
menu = 0; }
mt = 0; }
} {
{ if(mt< 3)
{ {
if(flag) ls =
{ EEPROM_Read(temp*3 + 2);
temp = ((normalBC/10)*10) ah =
{ }
if(temp2 == 0) }
{ else if(temp2 == 2)
if(flag) {
Dept. of E&CE, GEC, M H Halli 2022-23 if(flag) 29
{
{
Automatic college siren system using PIC Microcontroller
{ {
{ am%10;
flag = 0; am);
bs = 0; bc = 0;
bc = 0; }
} }
} else if(temp2 == 5)
else if(temp2 == 3) {
{ if(flag)
if(flag) {
{ am = ((am/10)*10) + (kp -
48);
ah = ((ah/10)*10) + (kp -
48); flag = 0;
{
Dept. of E&CE, GEC, M H Halli 2022-23 30
am = ((kp - 48)*10) +
am%10;
Automatic college siren system using PIC Microcontroller
if(ls == 0xAA) {
else {
{ }
if(temp2 == 0) }
{ else if(temp2 == 2)
Dept. of E&CE, GEC, M H Halli 2022-23 31
if(flag)
Automatic college siren system using PIC Microcontroller
{ {
if(flag) if(flag)
{ {
flag = 0; flag = 0;
bs = 0; bs = 0;
bc = 0; bc = 0;
} }
} }
{ {
if(flag) if(flag)
{ {
flag = 0; flag = 0;
bs = 0; bs = 0;
bc = 0; bc = 0;
} }
} }
{ {
if(flag)
Dept. of E&CE, GEC, M H Halli 2022-23 32
{
Automatic college siren system using PIC Microcontroller
if(flag) {
examBC = temp; }
EEPROM_Write(128, examBC); }
bs = 0; {
bc = 0; if(flag)
} {
} if(kp == '1')
} ls = 0xAA;
} else
{ }
if(temp2 == 0) }
{ else if(temp2 == 2)
if(flag) {
{ if(flag)
ls = EEPROM_Read(129 + {
temp*3); ah = ((kp - 48)*10) + ah%10;
ah = EEPROM_Read(130 + flag = 0;
temp*3);
EEPROM_Write((130 + temp*3),
am = EEPROM_Read(131 + ah);
temp*3);
bs = 0;
flag = 0;
bc = 0;
}
}
Dept. of E&CE,
} GEC, M H Halli 2022-23 34
else if(temp2 == 1)
Automatic college siren system using PIC Microcontroller
} {
} if(flag)
else if(temp2 == 3) {
{ am = ((am/10)*10) + (kp -
if(flag) 48);
{ flag = 0;
}
Lcd_Chr(2, 15, (am/10) + 48);
}
Lcd_Chr(2, 16, (am%10) + 48);
else if(temp2 == 5)
}
else
Dept. of E&CE, GEC, M H Halli 2022-23 35
{
Automatic college siren system using PIC Microcontroller
{ {
mt = 0; if(flag)
menu = 0; {
} if(kp == '1')
} ls = 0xAA;
{ ls = 0x00;
{ bc = 0;
if(temp2 == 0) }
{ }
{ {
ls = EEPROM_Read(191 + if(flag)
temp*3); {
ah = EEPROM_Read(192 + ah = ((kp - 48)*10) + ah%10;
temp*3);
flag = 0;
am = EEPROM_Read(193 +
EEPROM_Write((192 + temp*3), ah);
temp*3);
bs = 0;
flag = 0;
bc = 0;
}
}
}
}
else if(temp2 == 3)
else if(temp2 == 3) {
{ if(flag)
if(flag) {
{ am = ((am/10)*10) + (kp -
flag = 0; flag = 0;
flag = 0; }
} if(ls == 0xAA)
else
mt = 0;
menu = 0;
Delay_ms(50);
Chapter 5
• To set the any changes in the program, press the program mode and click on the set
button.
• Program 1mode is used to set the real time, date, year.
• Program 2 mode is used to set the delay of siren in manual operation.
• Program 3 mode is used to selection of days.
• Program 4 mode is used to set the time periods to be needed.
• Program 5 mode is specially used to set the Saturday time periods.
• The increment and decrement switches are used to set the required data properly.
• The auto mode and manual mode selection option is also designed as per the
requirement.
• To perform any modifications, in each stage press the set button.
• Finally, the system will work automatically.
Chapter 6
Advantages Disadvantages and Applications
6.1 Advantages
➢ Automatic scheduling of siren is possible in the code itself directly.
➢ It can also be used in industries.
➢ Human errors can be avoided.
➢ It is an automatic system.
6.2 Disadvantages
➢ Complex to design.
➢ Basic knowledge is required to use this system.
➢ Electronic devices do not have long time durability.
6.3 Applications
CONCLUSION
The automatic college bell system using the PIC microcontroller has been designed and
demonstrated successfully. It is a useful device that can simplify the process of ringing bells in
a college or educational institution. By utilizing the capabilities of the PIC Microcontroller,
this system can be programmed to automatically ring bells at predetermined times, eliminating
the need for manual intervention.
The system can be designed to have multiple bell schedules, allowing for different ringing
patterns on different days or during specific events. This flexibility ensures that the bell system
can cater to the specific needs of the college. The PIC Microcontroller can be programmed to
control the timing and duration of the bell rings, ensuring accurate and consistent bell ringing.
It can also be integrated with other components such as sensors or timers to further enhance its
functionality.
Overall, the automatic college bell system using the PIC microcontroller provides an efficient
and reliable solution for managing bell ringing in educational institutions. Its automation
capabilities save time and effort for staff members, allowing them to focus on other important
tasks.
In future voice announcement system can be designed which helps user to adjust the clock
using an android app.
References
[1] R.R NAIR and P.M PATHAK, “System and control engineering”, Macmillan Education
UK(publication), 2002(year).
[2]V. D. Gaikwad and K. K. Shirs,“Microcontroller architectures for embedded systems”,
Springer international Publishing, 2010 (year).
[4]M. M. El Bakary and F. A. Abd El Salam, “Automatic collage bell system using
microcontrollers”, Elsevier science, 2000.