Vous êtes sur la page 1sur 5

Design of microcontroller based automatic school bell

Abstract

The world over the decades has made considerable advancement in automation; automation is employed in homes, industries, commercial and educational sectors. In this work, a microcontroller-based automatic school bell is designed. This circuit uses a programmed microcontroller chip to schedule the school teaching and break periods so that for every start or end of a period a bell is automatically rang. This design finds a tremendous use at primary and secondary school levels where the teaching sections can span over eight periods including breaks. The advantage here is that the bell rings at the start of each period without any human intervention to a great degree of accuracy. The time schedule results are compared with that obtained with a clock, however, some drift is noticed, which is negligible.
Keywords Timer,microcontroller.

I. MOTIVATION In todays life, everyone gives importance to time. Time does not wait for anybody. Everything should be performed in time & accurately. Now a days school/college bells are manually operated. Hence there is a big question of accuracy. Also there is necessity of manpower and money. Hence here we should use automatic control system, which saves our manpower and money & also highest accuracy. Hence we have selected the project.,Our Project takes over the task of Ringing of the Bell in Colleges. It replaces the Manual Switching of the Bell in the College.By changing the delays given in the timer one can ring the bell at the given time. II. INTRODUCTION A bell is a percussion instrument used in schools that tells the students when it is time to go to class in the morning and when it is time to change classes during the day. Typically, the first bell tells the students that it is time to report to class. The bell is an important instrument in both primary and secondary schools and even in the industries and other businesses where the bell timer plays a critical role in running the day Bells are also associated with clocks indicating the hour by ringing.

V.OPERATION: Our Project takes over the task of Ringing of the Bell in Colleges. It replaces the Manual Switching of the Bell in the College. The Bell Ringing time can be edited at any Time, so that it can be used at Normal Class Timings as well as Exam Times. In the program, we will define constants on and max(indicates the number of bell ringing in the particular day).for our project we set max value as 8.initialize i/o ports. Pin p1^0 is used as switch. we used two functions one for seconds delay generating function and another for setting timer value.Intializing sequence in a array at what delay the bell should ring. Here we used leds instead of buzzer. Red led refers to the buzzer and green led will be ON when all the sequence of delays are executed. This will execute only when the switch is ON.checking for j less than max.Sequence delay is generated.

START DEFINE CONSTANTS MAX & ON INITIASIZE I/O PORTS P0.1 & P0.3

V.SOFTWARE PROGRAMMING. #include <reg51.h> #define max 8 #defineon 1 sbit bell= P2^0; sbit stop_led= P2^3; sbit sw=P1^0; void T0Delay(); void sec_delay(); char falsemain(); void main()

ENTER THE SEQUENCE AT WHAT INTERVAL BELL SHOULD RING

{
char apple; while (1) { apple=falsemain(); } } char falsemain() { unsigned char seq[max]= {4, 4, 1, 4, 4, 5, 4, 4}; char i,j=0,k; while(1) { bell=0; stop_led=0; while (j<max) { for (i=0; i< seq[j]; i++) { for (k=0; k<56; k++) { sec_delay(); } } if (sw == on) { bell=1; for (k=0; k<5; k++) { sec_delay(); } bell=0; j++; } else { return(0);

INITIAZE VARIABLES I,J=0


WHILE (J<MAX ))

FOR(I= 0;I<SEQ (J);I++)

Delay of 1 min

Is sw=o n

Bell=1 Delay () Bell=0

Stop_led= 1

STOP

} } stop_led=1; while(1); } } void sec_delay() { unsigned char dummy; for (dummy=0; dummy<20; dummy++) { T0Delay(); } } void T0Delay(){ TMOD=0x01; TL0=0x4B; TH0=0xFC; TR0=1; while (TF0==0); TR0=0; TF0=0; } VI.COMPONENTS REQUIREMENT

PINCONFIGURATION:-

SL.NO

COMPONENTS

TYPE

QUANTITY

1. 2. 3.

IC89C51 Switch LED

microcontroller general general

1 1 1

VII. AT89S8252 (MICROCONTROLLER):(MICROCONTROLLER):-

Pin Configuration

Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Programmable Watchdog Timer Dual Data Pointer Power-off Flag VIII.RESULTS

The Atmel AT89S8252 provides the following standard features: 8K bytes of downloadable Flash, 2K bytes of EEPROM, 256 bytes of RAM, 32 I/O lines, programmable 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 AT89S8252 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 Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset. Features of Atmel AT89C2051 are as follows: Compatible with MCS-51 Products 8K Bytes of In-System Reprogrammable Downloadable Flash Memory 2K Bytes EEPROM 4V to 6V Operating Range Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Nine Interrupt Sources Programmable UART Serial Channel SPI Serial Interface

IX.APPLICATIONS AND ADVANTAGES. 1.It can be used in the college, school for belling purpose. 2. It can be used in the any type of examination for belling because we can set the ringing time. 3. Automatic scheduling of college bell is possible. 4. Compact in size so takes less space. 5. Time editable facility is available.

X.LIMITATIONS 1.The all ringing time should be given at a time. 2.Since delay is included by loops,it is not highly accurate. XI.FUTURE SCOPE 1.It can be built with RTC to provide accuracy in timing XII.REFERANCES swww.google.com www.8051projects.info www.en.wikipedia.org www.yahoo.com/search www.alldatasheet.com www.datasheetcatalog.com/datasheets_pdf/7/8/0/5/7

805.shtml 8051 Microcontroller and Embedded Systems by

Mazidi and Mazidi Applied Electronics by R. S. Sedha

Vous aimerez peut-être aussi