Microcontroller Implementation for Automatic Smart Bell

This study aims to design automatic school bell hardware based on the ATmega32 microcontroller, design automatic school bell software based on the ATmega32 microcontroller using Basic programming language, and test the performance of the automatic school bell based on the ATmega32 microcontroller. This automatic school bell uses a minimum system of ATmega32 microcontrollers which equipped with data input from the push button, LCD to display character output, ISD2560 to output sound, and a timer taken from DS1307 RTC. This research is a Research or Development (R & D) research. This research is carried out through two stages of design. The first stage is the stage of hardware design. The second stage is the stage of software design. Programs are made using the Basic programming language using the Bascom-AVR application. The results of the product were tested using the black box method with two stages. In the first stage, software testing uses a series of simulations on the Proteus 7 Professional application. The second stage, testing hardware.


Introduction
The education process will not succeed if there is no application of discipline for students. Discipline deals with order and order [1]. The order can be interpreted as someone's adherence to following the rules because they are driven by something that comes from outside themselves. Discipline is obedience that arises because of the awareness and encouragement of that person whereas orderly means the regulatory device that applies to create orderly and orderly conditions [2]. To instill discipline in schools, adequate facilities and infrastructure are needed. One means to instill discipline in school is the bell. Every school generally has a bell. The bell is used as a marker for the time of entering school hours, the time of changing hours of study, rest periods and the end of class hours. By setting these times, it expected that students could be disciplined with time [3].
There are various types of school bells, but generally, still, use human power to ring them. But often picket teachers or officers on duty to ring the bell are negligent.
As a result, time management is disrupted and can interfere with the teaching and learning process. For this reason, now many are offered software-based school bells. However, software-based school bell operational costs are expensive. Also, the loudspeakers used must be turned on manually before the teaching and learning process begins.
The development of computer technology is currently very rapid, almost every aspect of our lives has experienced computerization so that everything can be completely automated [4]. With a combination of computers and microcontrollers, we can create a tool that is used to control electronic equipment. The microcontroller is an electronic component that can work by a program that loaded into memory like a very simple computer. It makes it very possible to use a microcontroller as a control center. Progress in technology will facilitate human work.The development carried out is to integrate hardware and software. With a microcontroller, school bell and loudspeakers used can control. So, the school bell can turn on and turn off automatically according to the time specified. Operational costs for using microcontrollerbased school bells are cheaper [5].
Research conducted by [6]- [9], shows that the use of a microcontroller as a component that can work well by the program entered. The use of ATmega Microcontrollers is very suitable to be applied in terms of automation, apart from the quite economical price, the ability is considered enough to store orders that are not too much and complicated, besides the ATmega Microcontroller is very easy to obtain on the market.
The bell is a device that can emit sound and has a function as a code, a reminder and a communication tool examples of simple bells such as bells and bells.
Following its function, the bell is one of the essential facilities in the school. The bell is used as a marker for the time of entering school hours, the time of changing hours of study, rest periods and the end of class hours. By setting these times, it expected that students could be disciplined with time [10].
Along with the development of technology, many electronic bells now developed. This automatic bell serves to give a change of time for each lesson, and there is no longer a picket who forgets not to ring the bell. This automatic bell will ring at the right time, so that the change of lesson no longer becomes chaotic, even though the duration between one lesson and another lesson varies. The purpose of the research is to make bell control automatically with several other additional hardware.

AVR Microcontroller
The microcontroller is a particular purpose computer in an IC that contains the CPU, memory, timer, serial and parallel communication channels, input/output ports, ADC (Analog Digital Converter). The microcontroller is used for a task and runs a program [11].

ATmega32
ATmega32 AVR Microcontroller is an 8-bit microcontroller from Atmel from the AVR family. This microcontroller is designed based on the AVR RISC architecture (Reduced Instruction Set Computer) which executes one instruction in one clock cycle so that it can achieve instruction execution of 1 MIPS (Million Instruction Per Second) every 1 MHZ clock frequency used by the microcontroller. The clock frequency used can be set via the fuse bits and crystals used. If the crystal used at 16 MHZ, so the clock frequency is 16 MHZ, the execution of the instructions reaches 16 MIPS [12].
ATmega32 has the main features including 16K x 16byte In-System Programmable Flash Program memory from addresses 0000H to 3FFFH. This flash memory divided into two parts, namely the application flash section and boot flash section. Memory data is 2144 bytes divided into 32 general purpose registers, 64 I/O registers, and 2KB internal SRAM (Static Random Access Memory), 1 KB EEPROM (Electrically Erasable Read Only Memory), 32 I/O pins, three timer units/counter, internal and external interrupt, USART (Universal Synchronous and Asynchronous Receiver Transceiver), TWI (Two-wire Serial Interface), eight-bit ADC (Analog to Digital Converter), SPI (Serial Programmable Interface), watchdog timer, and the internal clock generator. As mentioned above ATmega32 has 32 general purpose registers, and this register is directly connected with the ALU (Arithmetic Logic Unit) so that two registers can simultaneously be accessed in one instruction that executed each clock. So this kind of architecture is more efficient in program code execution and can achieve execution ten times faster than the CISC microcontroller (Complete Instruction Set Computer) [12].

Block Diagram ATmega32
ATmega32 AVR microcontroller uses RISC technology where instruction sets are reduced in width so that all instructions have 16-bit lengths and most directions executed in a single clock, as well as a reduction in the complexity of addressing [13]. The AVR microcontroller uses the Harvard architecture by separating memory and bus lines for programs and data to improve capabilities because it can access memory programs and memory data simultaneously.
The AVR microcontroller has fast access register files with 32 register x 8 bits. With 32 registers the AVR can execute several single cycles. 6 of the 32 registers available can use as indirect address registers for 16 bits for addressing data space that allows efficient address calculation.

Product Design
The design of electronic bell products based on ATmega32 microcontrollers includes designing and testing tools. The implementation of the design was carried out at the Laboratory of Informatics and Computer Education Study Program at Makassar State University (Universitas Negeri Makassar).
The design of this automatic bell program uses a minimum ATmega32 microcontroller system that equipped with input data from the push button, LCD to display character output, IC ISD2560 to output sound, and a timer taken from DS1307 RTC IC. The bell product design can be seen in Figure 2 as follows: Microcontroller.

Design Procedure
This research is carried out through two stages of design. The first stage is the design phase of hardware equipped with ATmega32, push button, LCD, RTC 1307, and ISD2560 sound IC. The stages of designing hardware from the school bell can be seen in Figure 3 as follows: The second stage is the stage of software design. The author designed the automatic school bell circuit based on the ATmega32 microcontroller using the Proteus 7 Professional application [14]. This circuit is used to simulate the ATmega32-based automatic school bell program. Programs are made using the Basic programming language using the Bascom-AVR application. The results of the program created will be saved in a file with the extension .bas. The .bas file will be compiled into a hex extension file using the Bascom-AVR application [15].
The hex extension file is used to run the program in the Proteus application by uploading the file in the simulation circuit. With the file. Also, the hex file also used when testing the automatic school bell based on the ATmega32 microcontroller using a series of previously designed hardware. The stages of designing software from the school bell can be seen in Figure 4 as follows:

Product Trial
The product results of this study will test in two stages of testing. The first stage is the testing phase using a simulator. The simulator will be created using the Proteus application. At this stage, the software will be tested. The product will be tested at the hardware level. In this test, software that has tested previously will be recorded/downloaded to the ATmega32 microcontroller using the ProgISP application.

Hardware Design
The design phase of the design planned for this product series using the Altium Designer Winter 09 application. Figure 5 is a schematic circuit, and Figure 6 is a PCB design using the Altium Designer Winter 09 application [16]- [18]. The results of this design are printed using Kingstrik paper. The printout transferred to the PCB board by ironing the printout on the PCB board. After the circuit design moves to the PCB board, the board soaked with water. After that, dissolve the PCB solution with hot water then insert the PCB board while shaking the container. This process is to remove the copper layer on an unused PCB board. After that, rinse the PCB board with water until clean.  The next step is to puncture the PCB board using the drill according to the design; then the PCB board is rubbed using fine sandpaper until the copper layer is visible. It is so that the tin is easily attached when soldering. Next, installing the circuit components according to the design then connects the input/output pins on the ATmega32 to the DS1307 IC, the ISD2560 IC, the LCD circuit, and the push button circuit.

Product Testing
The previously made circuit will be tested for the connection of each pin at the product trial stage. At this stage, the author discovers design errors, namely the VCC pin and ground pin on the LCD circuit exchanged. The writer then removes the path of each pin and connects the pins using a cable. Also, several lines are cut off and then connect these lines using tin.

Hardware Product
The results of the design of automatic school bell hardware based on the Atmega32 microcontroller are a series of these products. Figure 7 is a display of a circuit on a PCB board.

Software Design
The stages of software design produce programs from electronic bell products based on the ATmega32 microcontroller. The author designed the program using Basic with the Bascom-AVR application.
Microcontroller based automatic bell program. The results of the program created will be saved in a file with the extension .bas. The .bas file will be compiled into a hex extension file using the Bascom-AVR application. Figure 9 is the display of the automatic school bell program based on the ATmega32 microcontroller in the Bascom-AVR application. The automatic bell program based on the ATmega32 microcontroller is then compiled into hex extension files using the Bascom-AVR application. Next, the author designed a series using the Proteus 7 Professional application to simulate an automatic school bell program based on the ATmega32 microcontroller that had made previously. Figure 10 is an automatic school bell circuit based on the ATmega32 microcontroller on the Proteus 7 Professional application.

Figure 10. Automatic bell circuit based on the ATmega32
Microcontroller on the Proteus 7 Professional application.

Product Testing Results
Product testing in the first stage is testing the automatic school bell software based on the Atmega32 microcontroller using the Black Box testing method. In this test, the program will be tested using a series designed in the Proteus 7 Professional program. Based on this stage, test results will be produced according to the schedule that has set at the automatic school bell based on the Atmega32 microcontroller with a bell ring schedule in the simulation circuit. Table 1 is a schedule conformity test.
Product testing in the second stage is testing the automatic school bell hardware based on the Atmega32 microcontroller. In this test, the microcontroller based automatic school bell circuit will be tested using the Black Box testing method. Based on this stage, the schedule of conformity testing data will be generated on the automatic school bell based on the Atmega32 microcontroller with an automatic school bell sound schedule based on the Atmega32 microcontroller on the automatic school bell found on the Atmega32 microcontroller. Table 2 is a schedule conformity test. ✓ It is rare for schools to use school bells automatically which can work alone ring the bell according to the schedule of lessons available. The work process of this tool is to set the current time clock, then enter the bell list according to the schedule. After that, the microcontroller will read the bell data list today that has been stored repeatedly and compares it with the current time. If there is a match of the data hour and minute of the current time with the bell list today, the microcontroller will send a command to the relay to connect the relay switch so that the round bell rings. The same study was conducted by Ohize [19], that with this design, it obtained excellent use applied at the level of elementary and secondary schools where the teaching section could be on time during the desired period including rest. The extraordinary advantage is that the bell is lined up at the beginning of each period without human intervention, so it is very appropriate.

Conclusions
The design of automatic school bell hardware based on the ATmega32 microcontroller through the preparation phase of tools and materials, PCB design using the Altium Designer Winter 09 application which then printed on the PCB board. The results of the automatic school bell hardware design based on the ATmega32 microcontroller are a series of these products.
The design of automatic school bell software based on the ATmega32 microcontroller through the program design stage using the Basic programming language in the Bascom-AVR application and designing simulators using the Proteus 7 Professional application. The results of the automatic school bell software design based on the ATmega32 microcontroller are programs of the product.
The ATmega32 microcontroller automatic school bell product was tested to determine the suitability of the schedule on the program with the schedule on the product. The test method uses the black box method with two stages. The first stage is the testing phase using a simulator. The test results in the first stage are the sound of the bell, the bell lights automatically, and the automatic bell dead according to schedule. In the second stage, the product will be tested at the hardware level. The test results in the second stage are the bell; the bell lights automatically, and the dead bell automatically on a schedule.