Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
Arduino-Based Automatic Sliding Door Design
Reza Alamsyah, Allwine
1,2
Teknik Informatika, STMIK Methodist Binjai, Jend. Sudirman No. 136 Binjai, Binjai, 20712, Indonesia
E-mail: 89rezaalamsyah@gmail.com, allwineamikmg@gmail.com
ARTICLE INFO ABSTRACT
Conventional doors usually consist of a home key and a saddle key to open it.
Generally, office doors can be made more practical. The door will
Article history: automatically open if there is a stimulus (physical energy) that moves it. For
Received: 01-04-2020 example, when someone wants to enter the room the door will automatically
Revised: 16-04-2020 open. Doors like this can be designed using automatic control using
Accepted:01-05-2020 embedded system equipment such as a microcontroller. This automatic door
system can be designed using automatic controls combined with sensors and
DC motors. In terms of input equipment used PIR (Passive Infra-Red) sensors
that can detect the presence of humans approaching the door. The PIR sensor
Keywords: will send a signal to the Arduino process unit in which there is a
PIR Sensor, microcontroller chip. The microcontroller will send the processing data to the
DC motor so that it can open and close the door automatically.
Microcontroller,
Arduino
Copyright © 2020 Jurnal Mantik.
All rights reserved.
1. Introduction
Along with the rapid development of the times, the need for the effectiveness and efficiency of the
sting is prioritized in sharing fields. This has encouraged humans to create and innovate in the field of
technology to create a more effective and efficient tool such as the development of the use of Passive
Infra-Red (PIR) sensors as detection of human motion, for example, automatic sliding doors.
The automatic sliding door is a device that functions to open the door as a substitute for
conventional doors. This application can open and close doors automatically. Automatic doors with
Passive Infra-Red (PIR) sensors have the advantage that the circuit is more concise and has a fairly wide
range when compared to automatic doors that use heavy sensors in operation. Because in reality, the
weight sensor requires a fairly large place and a fairly complex electronic circuit.
Conventional doors usually consist of a home key and a saddle key to open it. Generally, office
doors can be made more practical. The door will automatically open if there is a stimulus (infrared) that
moves it. For example, when someone wants to enter the room the door will automatically open. Doors
like this can be designed using automatic control using embedded system equipment such as a
microcontroller. This automatic door system can be designed using automatic control combined with
sensors and DC motors (Direct Current). In terms of input equipment, a PIR (Passive Infra-Red Receiver)
sensor is used that can detect humans approaching the door. This PIR sensor will send a signal to the
Arduino process unit in which there is a microcontroller chip. The microcontroller will send the
processing data to the DC motor so that it can open and close the door automatically.
A microcontroller is now growing rapidly and is increasingly in demand in control system
applications. Even today many microcontrollers have become modules. One of the most widely used
microcontroller modules is Arduino. Arduino is a type of board that contains a microcontroller. Arduino
has become very popular in recent years because of its use which is simple and easy to design according
to existing needs, for example, it is used to control the motor, control temperature, soil moisture, and so
forth. In this research, the writer makes a system in the form of an Arduino-based automatic sliding door
prototype (case study: GMI Gethsemane Binjai), the design of this tool can be applied to open the door
automatically, so it is expected to be able to complete the human need for comfort facilities at the
230
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
entrance and exit. With this automatic door, it can be easier to open and close without bothering to push
or shift the conventional office door
GMI Gethsemane is the oldest church in the city of Binjai, where most of its members are ethnic
Chinese who have been mingling with the surrounding community. During street vendors, the authors
observe the process of entering and leaving the church office using conventional doors. In the process of
observation, the writer found that the GMI Gethsemane Binjai office still uses conventional doors that are
shifted to the left or right. This, according to the author, is certainly not effective because today many
conventional sliding doors are made automatically like in the Mall, sometimes conventional sliding doors
can also consume a person's time. Another thing that might happen is that conventional doors that are
sliding using sliding doors can also get stuck
2. Theory
2.1 Passive Infrared Receiver Sensor
PIR (Passive Infrared Receiver) is an infrared-based sensor. However, unlike most infrared sensors
which consist of IR LEDs and phototransistors. PIR does not emit anything like IR LED. As the name
implies Passive ’, this sensor only responds to energy from the passive infrared rays that are owned by
every object that is detected by it. The object that can be detected by these sensors is usually the human
body.
Fig. 1 PIR Sensor
Inside the PIR sensor, some parts have their respective roles, namely Fresnel Lens, IR Filter,
Pyroelectric sensor, amplifier, and comparator. This PIR sensor works by capturing the thermal energy
generated from passive infrared rays that are owned by each object with an object temperature above
absolute zero. Like the human body that has a body temperature of about 32 degrees Celsius, which is the
typical heat temperature found in the environment. This infrared ray beam is then captured by the
Pyroelectric sensor which is the core of this PIR sensor, causing Pyroelectric sensors which consist of
gallium nitride, cesium nitrate, and lithium tantalate to produce an electric current. PIR sensors only react
to the human body due to the presence of an IR filter which filters the wavelengths of passive infrared
rays. The IR Filter modulated by the PIR sensor can filter the wavelengths of passive infrared light
between 8 to 14 micrometers so that the wavelengths produced from the human body ranging from 9 to
10 micrometers are detected by the sensor. So, when someone walks past the sensor, the sensor will
capture passive infrared rays emitted by the human body that have different temperatures from the
environment, causing pyroelectric material to react to produce electric current due to the heat energy
carried by the passive infrared light. Then an existing amplifier circuit amplifies the current which is then
compared by the comparator to produce an output. When humans are in front of the PIR sensor with a
stationary condition, the PIR sensor will calculate the wavelength produced by the human body. This
constant wavelength causes the heat energy generated can be described as almost the same in the
surrounding environmental conditions. When humans make a move, then the human body will produce
passive infrared rays with varying wavelengths so that it produces different heat that causes the sensor to
respond by producing currents in its Pyroelectric material with different magnitudes. Because of these
different quantities, the comparator produces output. So the PIR sensor will not produce output if the
sensor is confronted with a hot object that does not have an infrared wavelength between 8 to 14
micrometers and a stationary object such as a very bright light beam that can generate heat, reflections of
objects from the mirror and heat temperature during the season hot. The distance from the PIR sensor
itself can be set as needed, but the maximum distance is only +/- 10 meters and a minimum of +/- 30 cm.
2.2 Arduino
Arduino is an electronic kit or open-source electronic circuit board in which there are main
231
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
components, namely a microcontroller chip with AVR type from the company Atmel. [2] Some of the
advantages possessed by Arduino include: 1. No need for a programmer chip device because it already
has a bootloader that will handle uploading programs from a computer. 2. Already have a USB
communication facility, so laptop users who do not have a serial port / RS323 can use it. 3. The
programming language is relatively easy because Arduino software is equipped with a fairly complete
collection of libraries. 4. It has a ready-to-use module (shield) that can be plugged into an Arduino board.
For example shield GPS, Ethernet, SD Card, and others. The Arduino programming language is C
language. But this language has made it easier to use simple functions so that beginners can learn it quite
easily. The Arduino UNO board uses an ATmega328P microcontroller. This board has 14 digital
input/output pins (six of which can be used for PWM output), six analog inputs, 16 MHz crystal
oscillator, USB connection, ICSP header, and reset button. Almost everything needed to support a
microcontroller is available, its use is enough to connect to a computer using a USB cable or by providing
power using an AC adapter to DC or with a battery. This Arduino UNO has differences with other
Arduino boards, wherein previous Arduino versions the FTDI USB-to-serial chip was used, but the
Arduino UNO used ATmega8U2 which was programmed as a USB-to serial converter. The word "UNO"
is an Italian word meaning one and is named as a marker of the launch of Arduino 1.0. Arduino UNO is
the most recent version to date from the Arduino USB board group. Arduino UNO along with Arduino 1.0
subsequently became a reference for the development of the next version of Arduino.
Fig. 2. ATMega 328P Mapping
Arduino UNO has several facilities to be able to communicate with computers, other Arduino, or other
microcontrollers. The ATmega328P microcontroller on Arduino UNO provides UART TTL (5V) serial
communication, which is available at pins 0 (RX) and 1 (TX). The ATmega8U2 on the Arduino UNO
board channels this serial communication via USB and is seen present as a virtual com port
in software on a computer. Firmware from Atmega8U2 uses a standard USB COM driver, and no external
drivers are needed. Arduino software has a serial monitor that allows simple textual data to be sent to and
from Arduino. RX and TX LEDs will flash when data is being transmitted via a USB-to-serial chip.
ATmega328P also supports I2C (TWI) and SPI communication. Arduino software has a Wire and SPI
library to simplify the use of I2C buses and SPI communication.
2.3 Arduino IDE
Arduino IDE is an editor used to write programs, compile, and upload to Arduino boards. The
Arduino Development Environment consists of a text editor for writing code, a message area, a text
console, a toolbar with buttons for general functions, and a series of menus. Software written using
Arduino are called sketches. These sketches are written in a text editor and saved with files with the
extension .ino. This text editor has facilities to cut/paste and search/replace. The message area contains
feedback when saving and uploading files, and also indicates if an error occurs.
2.4 Servo Motors
Servo motor is a motor with a closed feedback system where the position of the motor will be
informed back to the control circuit that is in the servo motor. This motor consists of a DC motor, a series
of gears, potentiometers and a control circuit. Potentiometer serves to determine the angle limit of the
servo rotation. While the angle of the axis of the servo motor is set based on the width of the pulse sent
through the signal foot of the motor cable. Because DC servo motors are devices for converting electrical
energy into mechanical energy, permanent magnet servo DC motors convert electrical energy into
mechanical energy through the interaction of two magnetic fields. One field is produced by a permanent
magnet and the other is generated by a current flowing in the motor coil. The resultant of the two
magnetic fields produces a torque that generates the rotation of the motor. When the motor rotates, the
current in the motor coil produces a constant value torque. In general, there are 2 types of servo motors.
232
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
Fig 3. Servo Motors
Namely a standard servo motor and continuous-servo motor. Standard type servo motors are only
capable of rotating 180 degrees. Standard servo motors are often used in robotics systems, for example, to
make "Robot Arm" (Robot Arm). while the continuous servo motor can rotate by 360 degrees. Continous
servo motors are often used for Mobile Robot. The servo body says the type of servo concerned.
3. Result And Discussion
3.1 Input Analysis
Analysis Input obtained by the author at the automatic door is input received from the PIR sensor.
PIR (Passive Infra-Red) is an infrared-based sensor. However, unlike most infrared sensors which consist
of IR LEDs and phototransistors. PIR does not emit anything like IR LED. As the name implies Passive ’,
this sensor only responds to energy from the passive infrared rays that are owned by every object that is
detected by it. The object that can be detected by these sensors is usually the human body. Inside the PIR
sensor, some parts have their respective roles, namely Fresnel Lens, IR Filter, Pyroelectric sensor,
amplifier, and comparator. This PIR sensor works by capturing heat energy generated from passive
infrared rays which are owned by each object with an object temperature above zero. Like the human
body that has a body temperature of about 32 degrees Celsius, which is the typical heat temperature found
in the environment. This infrared ray beam is then captured by the Pyroelectric sensor which is the core of
this PIR sensor, causing Pyroelectric sensors consisting of gallium nitride, cesium nitrate, and lithium
tantalate to produce an electric current, can generate electric current because this passive infrared ray
carries thermal energy. The process is almost the same as an electric current that is formed when sunlight
hits the solar cell. PIR sensors only react to the human body, this is due to the presence of an IR filter that
filters the wavelengths of passive infrared rays. The IR Filter modulated by the PIR sensor can filter the
wavelengths of passive infrared light between 8 to 14 micrometers so that the wavelengths produced from
the human body ranging from 9 to 10 micrometers are detected by the sensor. So, when someone walks
past the sensor, the sensor will capture passive infrared rays emitted by the human body that have
different temperatures from the environment, causing pyroelectric material to react to produce electric
current due to the heat energy carried by the passive infrared light. Then an existing amplifier circuit
amplifies the current which is then compared by the comparator to produce an output.
3.2 Process Analysis
The process obtained by the author in the process of automatic sliding door work. when humans are
in front of the PIR sensor in a stationary condition, the PIR sensor will calculate the wavelength produced
by the human body. This constant wavelength causes the heat energy generated is described to be almost
the same as the surrounding environmental conditions. When humans make a move, then the human body
will produce passive infrared rays with varying wavelengths so that it produces different heat. The heat
generated will be detected by the Pyroelectric sensor and converted in the form of different currents.
The resulting current is forwarded to the ADC (Analog to Digital Converter) to proceed to the
microcontroller. The microcontroller processes the signal from the ADC and then determines the actions
that must be taken, namely opening or closing the door. This decision is sent in the form of a digital
signal so it must be changed by DAC (Digital to Analog Converter) so that the actuator system can be
understood. In this automatic sliding door system, a DC motor is used as an actuator to move the sliding
door. The voltage produced by the DAC is generally only 0 to 5 Volts so that an additional power supply
of 12 VDC is needed to move the DC motor. The sliding door working process can be seen from the
diagram below:
233
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
Figure 4. Diagram of Automatic Sliding Door Work Process
3.3 Output Analysis
The output obtained by the author is the output of the L298N H-Bridge motor driver. The L298N
motor driver is the most widely used or used DC motor driver module in the electronics world which is
used to control the speed and direction of the DC motor rotation. L298N is an H-Bridge based motor
driver. Besides this driver can control 2 motors at once with a load current of 2 A. For a DC motor output,
a diode is used, it is intended that the motor driver can withstand the reverse current coming from the DC
motor. Motor driver input comes from the main microcontroller, for MOT 1A and MOT 1B to drive
motor 1, ENABLE 1 to regulate motor speed 1 using PWM, then for MOT 2A and MOT 2B to drive
motor 2, ENABLE 2 to set motor speed 2 using PWM.
Fig 5. A truth table for 2 motors
3.4 Steps of Tool Design
In making this tool several designs are interrelated with one another. Broadly speaking, the design
steps consist of 2 stages of work, namely designing the flowchart and making the program using Arduino
Uno. In this section, we will explain the process of planning and designing automatic sliding doors based
on automatic.
Explanation in this block diagram will be divided into several parts, namely:
Fig 6. Steps of Tool Design
3.5 Automatic Sliding Door Series
The working principle of this tool is the door can open automatically with a PIR sensor when it
detects human motion approaching the door.
a) PIR Sensor Circuit (Input)
Fig 7. PIR Sensor Circuit Image
234
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
b) Motor Driver Circuit
The L298N motor driver is the most widely used or used DC motor driver module in the electronics
world which is used to control the speed and direction of the DC motor rotation. IC L298 is an H-bridge
type IC that can control inductive loads such as relays, solenoids, DC motors, and stepper motors. At IC
L298 consists of logical transistors (TTL) with a NAND gate that serves to facilitate in determining the
direction of rotation of a dc motor. For the market, there is a motor driver module using IC l298, so it is
more practical in its use because the I / O pin is packed neatly and is easy to use.
The advantage of this L298N motor driver module is in terms of precision in controlling the motor
so that the motor is easier to control. Information :
1) Enable A: function to activate the output motor A
2) Enable B: function to activate the output motor B
3) 5 VDC jumper: as the 5 VDC voltage source selection mode, if not jumped it will go to 12 VDC
voltage source mode
4) Control Pin: As control of the rotation and speed of the motor that is connected to the
microcontroller
Fig 8. Of L298N Motor Driver Circuit
c) Minimum System Series
Minimum System Series using 328P Microcontroller (Arduino Uno). On the Arduino Uno board,
there are parts including:
1) Digital input/output pins (Labeled ‘0 to 13’)
In general, the I / O pin is a digital pin, the pin that works at the level of digital voltage (0V to
5V) for both input and output. 3,5,6,9,10 and 11, in addition to pins 0 and 1 also have special
functions as serial communication pins.
2) Analog input pins (Labeled ‘A0 through A5’).
The pin can accept analog input voltages between 0V to 5V, this voltage will be represented as a
number from 0 - 1023 in the program.
3) Pins for voltage sources
This group of pins is a collection of pins associated with a power source, for example, output
5V, Output 3.3V, GND (2 pins) and Vref (reference voltage for internal ADC reading)
4) ATMega328 IC
As explained earlier, this IC acts as a data processing control center.
5) IC ATMega16U
This IC is programmed to handle data communication with a PC via a USB (Universal Serial
Bus) port.
6) USB Jack
It is a type B USB socket as a serial data connector with a PC.
7) Jack Power
It is a socket for external power supply between 9V and 12V DC.
8) ICSP (In-Circuit Serial Programming) Port
This port is used to program Arduino without a bootloader.
9) Reset Button
Used to reset the Arduino microcontroller board to start the program from scratch
235
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
Fig 9. Arduino System Minimum Circuit
d) Power Supply Circuit
Fig 10.of Power Supply Circuit
The power supply circuit as shown above consists of a step-down part, a rectifier, and a filter.
Transformer or transformer T1 serves to reduce the voltage of the PLN 200 Volt AC into the desired low
AC voltage. In this case, the example above circuit is using a 12 Volt AC transformer output. After 220
Volt AC voltage. Lowered to 12 V, then the AC voltage is rectified using four silicon diodes. This silicon
diode will direct the AC voltage to DC. Especially for rectification purposes, these four diodes can be
replaced with a bridge diode. In the four-diode bridge, the diode that functions as a rectifier is packed in a
package, which on average is a box-shaped diode bridge.
After rectified with a diode, the AC output current from the transformer has changed to DC, but the
DC at the diode output is still impure because half the positive phase of the AC voltage goes out. To
overcome this, an Elco capacitor (Electrolytic condensator) is used which will decrease the phase peak of
the positive phase coming out of the diode.
As a result of installing the Elko as a filter, the DC voltage will become smoother and cleaner, but
the consequence is the effect of charging and discharging Elco (Electrolytic condensator) will increase the
voltage from 12 VAC to around 16 VDC.
After passing through the filter, the power supply circuit can already be used for general purposes
such as small current DC motors, radios, amplifiers, and others. To change the output voltage as needed, a
rotate selector switch can be used which is mounted between the output of the transformer and a rectifier
diode so that the output voltage can be changed according to needs, a rotate selector switch can be used
which is mounted between the output of the transformer with a rectifier diode so that the output voltage
can be changed as desired, for example, 3V, 6V, 9V, 12V, and 15V.
236
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Jurnal Mantik
Volume 4 Number 1 May 2020, pp. 230-237 E-ISSN 2685-4236
https://iocscience.org/ejournal/index.php/mantik/index
3.6 Program Flowchart
Fig. 11 flowchart program
4. Conclusion
After carrying out these practical work activities, a lot of experience. From the results of the
implementation of the design of the tool to the testing and discussion of the system, the writer can
conclude, including:
a) Employees who enter or exit the door can make the door work opening and closing
automatically as evidenced by the motion and heat energy in humans received by the PIR sensor.
b) With this automatic sliding door, it can be easier for employees to enter and exit the automatic
sliding door.
THANK-YOU NOTE
thank you to the LPPM STMIK Methodist Binjai team who helped researchers in the process of writing
and working on research
5. References
[1] Novi Lestari. (2017). Rancang Bangun Pintu Otomatis menggunaan Arduino Uno dan PIR. Lubuk Linggau:
STMIK Musirawas.
[2] Bhaguztrief. (2008). Pintu Geser Otomatis dengan Sensor PIR. RIFQY87.
[3] Ahmad Sahru Romadhon,Devi Rosa Anamisa. (2017). Sistem Pengendali Pintu Pagar secara Otomatis
menggunakan Mikrokontroller. Madura: Universitas Trunojoyo Madura.
[4] Ebiezer , Raden Supriyanto. (2017). Pembuka Pintu Otomatis menggunakan AVR Atmega 8535 dan sensor
PIR. Jakarta: Universitas Gunadarma.
[5] Aris Hadyan. (2018). Rancang Bangun Buka Tutup Gerbang Pabrik menggunakan RFID berbasis
mikrokontrollerAtmega 328. Medan: Universitas Sumatera Utara.
[6] Yogi Indriyanto. (2007). Rancang Bangun Pintu Otomatis dengan menggunakan sensor PIR KC7783R dan
Mikrokontroller AT89S51. Semarang: Universitas Diponegoro.
[7] Kamus Besar Bahasa Indonesia (KBBI). (2012). Retrieved 09 01, 2017, from https://kbbi.web.id/iur
237
th
Accredited “Rank 4”(Sinta 4), DIKTI, No. 36/E/KPT/2019, December 13 2019.
Jurnal Mantik is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).