Implementation of Line Follower Robot based Microcontroller ATMega32A

The development of technology in the field of robotics is very fast, but in the eastern regions of Indonesia, namely, the development of the development has not yet felt the impact. Especially in the Universitas Islam Sultan Agung learning media devices for microcontrollers are also not yet available. Therefore the author wants to pioneer by implementing the simplest robot design, the line follower robot, where the robot only goes along the lines. This study uses an experimental method, by conducting a research process based on sequences, namely: needs analysis, mechanical chart design, electronic part design, and control program design, manufacturing, and testing. The line follower robot based on the ATmega32A microcontroller has been tested, and the results show that the line follower robot can walk following the black line on the white floor and can display the situation on the LCD. But this line follower robot still has shortcomings in the line sensor sensitivity process depending on a certain speed. At speeds of 90-150RPM, the line follower robot can follow the path, while more than 150 rpm, the robot is not able to follow


I. INTRODUCTION
Since the industrial revolution in several countries in Europe, technological development is developing very fast. So humans are required to be active / follow developments that occur. From the era of the industrial revolution to the era of globalization, this change in the human mindset is very different. This is driven by human curiosity in the field of technology. No exception in the development of technology in the field of robotics.
Robotics has become a very fast-developing field of technology because many of the scientists have developed robot technology. So that changes in the shape and pattern of robot motion from time to time experienced many developments. The world of robotics today is widely used in industrial machinery that creates goods and human needs in large quantities. So that it can be seen the function of robots that can help human work. Not a few funds were spent by scientists to find a new breakthrough in the world of robotics, and more importantly, to prosper the community. Of all the technological developments that are developing, they can be seen and felt by humanity today. It is so easy with the help of robots the job becomes faster and neater.
Some previous researchers have researched robotic with a microcontroller. Vision-Based Robot Systems for Military Applications -Real-Time Design and Validation was investigated by Bhat and Meenakshi [1]. The design and implementation of the obstacle detection algorithm in robotics were investigated by Sharma et al [2]. Armed antiinfiltration robot based on peripheral interface controller using infrared range technique with a single disc system was investigated by Singh [3]. The development of robot arms for the disposal of dangerous objects was investigated by [4]. The design and implementation of unmanned, long-distance unmanned ground vehicles (UGVs) at low cost were examined by [5].
A practical approach to microcontroller-based smartphones operating a robot system in an emergency rescue scheme was investigated by Shifat et al [6]. Humanoid robots playing soccer: Design, algorithm, and prototype were studied by Mohammadi et al [7]. The embedded robot controller based on ARM and FPGA was investigated by He et al [8]. Autonomous tour guide robots using ultrasonic range sensors and QR code recognition in indoor environments were examined by Lee et al [9]. Autonomous cooperative control based on intelligent cellular robot system behavior with embedded Petri nets was investigated by Yasuda [10].
A small intelligent inspection robot control system for the use of nuclear power plants was investigated by Pan et al [11]. A study on improving the sound quality of robots playing violin was investigated by Jo et al [12]. Agricultural Robot for automatic hijacking and nursery researched by Amrita Sneha.A et al [13]. Voice-controlled personal assistant robots were examined by Mishra et al [14]. The design and implementation of four-legged robot insects was examined by Liao, Huang and Tseng [15].
A biomimetic jump drive from a functional multilevel frog robot is investigated by Su, Gul, and Choi [16]. The design of the fire extinguisher and supervising independent Journal of Robotics and Control (JRC) ISSN: 2715-5072 71 Abdul Latif, Implementation of Line Follower Robot based Microcontroller ATMega32A robots was examined by Prabha and Shivaanivarsha [17]. Control of four-wheeled Mecanum robots with soft-robot gloves was investigated by Sadeghian et al [18]. The capture of humanoid robot objects and the manipulation of learning by demonstration were examined by Ahmad et al [19]. Hydraulic Robot Arm Controlled by Human Arm was investigated by Amitkumar et al [20].
A-Line Follower, Education Mobile Robot Performance, Improves Improvement Using Competition as a Benchmark studied by Goncalves, Pinto and Costa [21]. Line Followers with Obstacle Information Systems Using ZigBee were investigated by Kokare, Shastri, and Kolhar [22]. The design and implementation of the RGB color line robot were investigated by Sonal, Raninga, and Patel [23]. The design of all color line follower sensors with automatic calibration capabilities was investigated by Khade, Naik, and Patil [24], Line follower robots: Fabrication and measurement accuracy with data acquisition researched by Kaiser et al [25].
However, the impact of the development in eastern Indonesia is not yet felt too well. Especially in the university's electrical engineering laboratory UNISULA, which should be able to follow the development of robotics technology. Many things are the cause, which is not yet available supporting facilities and infrastructure to build the technology. Therefore, the author wants to pioneer by implementing the simplest robot design, the line follower robot, where the robot only goes along the lines. In making this robot has 8-line detection sensors and has used an ATmega32A microcontroller, which has been conceptualized, which will control the rotation of the DC motor. So the robot can walk along the path with a black line on the white floor. Based on this, it is necessary to raise these issues in a study entitled "Implementation of ATmega32A Microcontroller-Based Robot Line Follower Design.

II. METHODS
The Diagram Block of Robot Line follower is shown in Figure 1. The Robot Line Follower [26]- [30] is basically a robot that is designed to operate automatically moving along the lines that have been made on the floor. In this case, the line used is a black line placed on a brightly colored surface or vice versa. The basic concept in operating line follower robots depends on the reading of the sensor system and the motion regulation of the DC motor. The working principle of detecting lines from this robot is that each surface has the ability to reflect different light. White has the ability to reflect more light. Conversely, dark colors have the ability to reflect less light. This is used to detect lines.
The sensor serves as a reader on how the level of reflection of the floor surface is given a line as a track and not. Because the principle of the sensor used is the reflection from the transmitter to the receiver, if the receiver using the photodiode gets a large beam, then the resistance of the photodiode becomes small, and vice versa. After what the surface conditions are read by the sensor, the difference is sent to the microcontroller for processing. Button functions as a regulator so that Line Follower is assigned according to our will to be processed by a microcontroller with other data.
The microcontroller is a combination of a CPU, memory, and I / O integrated with the form of an IC or can be called a single chip. In the implementation of this design, the microcontroller used is the type of ATmega32A AVR. This microcontroller has an 8-bit architecture, where all instructions are packaged. Microcontroller, which has type AVR ATMega32A series as the brain of Line Follower which is responsible for processing input data and outputs data that has been processed to LCD and Motor Drivers.
The motor driver functions as an amplifier of the microcontroller output and control the motor so that it can move forward and backward. The motor used in this line follower robot is a DC motor. There are several types of DC motor drivers that we usually use, such as using a relay that is activated by a transistor as a switch, but such are considered inefficient in working on the hardware. With the development of the IC world, now there is an H Bridge that is packaged in one IC, which makes it easier for us to implement hardware and control using a microcontroller [5].
The module uses the L298 driver IC which has the ability to drive DC motors up to 4A current and a maximum voltage of 46 Volts. To make a DC motor driver with IC L298 is quite simple and just add a dumper diode for each H-bridge IC L298 driver, as shown in Figure 2. device that is often used to display data. LCD functions as a microcontroller.

III. METHODOLOGY
There are 2 designs carried out in this line follower robot research, namely electrical design and control program.

A. Electrical design
In making this electronic circuit design, Eagle software is used. The results of the electronic circuit design can be seen in Figure 3.

B. Firmware program design
In designing the software controller program used is CodeVisionAVR. AVR code vision is basically a programming language for C language AVR family microcontroller based on C. In this CodeVisionAVR tool, you can determine the ports of the AVR microcontroller that function as input or output, and can be determined about the use of internal functions of the AVR. In this program, there is a processor that will command every movement of robot action with C programming language.

IV. RESULT AND DISCUSSION
After doing the design and manufacture of tools, the next step to do is to test the equipment that has been made. Tests and observations are made on the hardware and the entire system contained in this line follower robot.
Testing the ATmega32A microcontroller-based robot line follower, the steps that need to be taken are as follows: Prepare components. Check all parts of the electronic circuit. In this stage, the inspection starts from checking the current source, placement of components, and checking the soldering lines on the PCB. Line follower robot assembly, i.e., assembly between mechanical parts and electronic parts. Connect the circuit to a 12-volt DC voltage source. Press the switch on / off button. Check the electronic input and output ports of the microcontroller. Make sure the LED is on and the LCD can display data

A. Sensor Testing
The working principle of the sensor is simple, which utilizes the nature of light that will be reflected when it comes to light-colored objects and will be absorbed when it comes to dark-colored objects. The line used is a dark-colored line (black), and the floor is white, thus when the sensor hits the black line, the LED light is absorbed more. So the reflection becomes weak and not about the photodiode. Whereas if the sensor hits the white floor, then the reflected light from the LED will hit the photodiode. This difference in light intensity is used to detect lines.
Seen from the picture above that the input of the left end sensor with portA0 address regarding the black line, so the current cannot flow or has low logic (0). While the other sensors on the floor are white then high logic (1), then the microcontroller will process this input, then the output can be seen on the LCD display that is 11111110.

B. Driver Motor Test
Motor driver testing is done in two ways, firstly, testing the driver by using a speed regulation program and the direction of rotation of a DC motor. Then the second way is by testing the driver by using the input voltage that comes from the sensor as a regulator of the direction and rotation speed of the DC motor. Basically, there are two parameters that will be obtained, namely the speed and direction of rotation of the DC motor. DC motor speed settings can be done by determining the SP, Up, and Lw values.
In this setting, the values entered are multiples of 5 with provisions of 0-225 rpm. The picture above shows that the value entered for motor speed is 125 rpm.

C. Line Follower Robot Testing
Robot follower line testing is carried out by using a black line on the white floor with a line thickness of ± 1.5 cm. Looking at some of the results of the line follower robot testing, it can be seen that the robot can follow the line at 90-150 rpm motor speed, while more than 150 rpm, the robot is not able to follow the path.
Based on the results that have been made where this line follower robot consists of the ATmega32A microcontroller as the main controller that will process the data. This microcontroller has input in the form of sensors and pushes buttons and output in the form of motor drivers and LCD. The sensor used is the photodiode to function as a line detector, and push buttons are used to provide input data to the microcontroller. LCD output is used as a display that displays data and the motor driver as a regulator of the motor rotation, which will be a robot drive. Here can be seen the importance of the role of the microcontroller, in which the microcontroller will process the input data and regulate the output. Seeing from all the results of testing on the line follower robot that the performance of this robot is in accordance with the program embedded in the ATmega32A Microcontroller. This shows that the ATmega32A Journal of Robotics and Control (JRC) ISSN: 2715-5072 73 Abdul Latif, Implementation of Line Follower Robot based Microcontroller ATMega32A microcontroller can be used as a processing system for all systems in the line follower robot.
The line follower robot based on the ATmega32A microcontroller includes three things, namely mechanical parts, electronic parts, and software parts. The mechanical part of the follower line includes the robot frame, the laying of the sensor, the isolation of the sensor, the placement of the electronic parts, the position of the DC motor, the gearbox, and the robot wheel. The electronic part includes a line sensor circuit, signal conditioner, microcontroller, DC motor driver, LCD output, and power supply.
While the software part includes making a program in C language that shows the workflow of the robot in accordance with the line follower robot planning. So that the line follower robot can follow the line with the accuracy of the sensor in detecting black lines and the accuracy of sensors in detecting the white floor.

V. CONCLUSIONS
Based on the contents and discussion described, it can be concluded that the ATmega32A microcontroller can be used as a processing system for all systems in the line follower robot with a performance that is in accordance with the program created. The design of the mechanical part of the line follower includes the robot frame, the placement of sensors, and also the robot drive in the form of a robot wheel. The design of the mechanical part consists of 2 parts, namely the robot frame and gearbox so that making this robot lighter makes the movement of the robot easier. The design of electronic parts includes a line sensor circuit, microcontroller, DC motor, DC motor driver, signal conditioner, LCD output, and power supply (battery). The design of this electronic part as well as a robot frame with one-layer material that makes this robot more efficient. Program in C language, which shows the workflow of the robot in accordance with the line follower robot planning. So that the line follower robot can follow the line with the accuracy of the sensor in detecting the black line and the accuracy of the sensor in detecting the white floor.