DC Motor Control System Through Android Applicatio
DC Motor Control System Through Android Applicatio
2478/sbeef-2021-0007
Abstract. The study aims for the development of a control a big advantage by adding this technology in smartphones.
system for D.C motors through an application made for The communication method changed the way users utilize
Android mobile devices. The D.C motors are represented by a their mobile devices at home/office, and it has also helped
robot model car and the control application communicates with the transition of wired devices to wireless devices. A
with the system via Bluetooth technology. The Android mobile
device user must install an application on his mobile device,
Bluetooth device that acts like a host has the ability to
then, the user must turn on the Bluetooth communication on communicate with maximum seven Bluetooth devices in
the mobile device. The user can use various commands to the same time via a single connection. Communication is
control the robot model car such as front, back, stop, left, right. very important in everyday life and the Bluetooth
These commands are sent from the Android mobile device to technology is useful in a control system as means of
the Bluetooth receiver, which is interfaced with the control control [3]. The Bluetooth communication method is used
system. The control system has a Bluetooth HC-06 receiver to control the movement direction of the motors. The
that receives commands from the control application and sends controlled system is represented by a small robot model
them to the Arduino Nano microcontroller to control the car that consists of an Arduino Nano microcontroller
motors through two L298N drivers.
connected with a Bluetooth HC-06 module, two L298N
driver modules and four D.C motors. When the Android
Keywords: D.C Motor, Bluetooth, Control, Arduino, Android application will be connected to this system via a
Bluetooth connection, the user can manipulate the small
1. INTRODUCTION robot model car through wireless commands given in the
application. The robot model car can move left, right,
forward and backward.
Nowadays, mobile devices come equipped with high-
performance processors, larger storage capacities and have
more communication abilities. The smartphone, is a small
device that has the processing power to do all kind of
things and is changing the ways that humans interact with
machines. Smartphones gradually became a universal
portable device and gave people a daily use for different
tasks. In the past years, the Android OS (Operating
System) has gained more and more popularity in
smartphones. The Android platform comes with a full
software package, this software package is made of an OS, Figure 1. System block diagram.
a middleware layer and basic applications. The difference
from other existing platforms, like the iPhone OS, is that it In Figure 1 we have the block diagram of the system. The
comes with a software used as a development kit (SDK) controlled system receives the users command from the
[1]. mobile devices via a Bluetooth connection through the
HC-06 Bluetooth module, then the Arduino Nano
The D.C motor is mostly used for different drive processes the command received and operates the two
applications in the industrial field, the mai applications are L298N drivers that are used to select the speed and the
in automation, traction, civil and military systems because direction of the four D.C motors.
of its efficiency, silent operation, small size, reliability, and
low maintenance [2]. 1.1 Arduino Nano
31
Scientific Bulletin of the Electrical Engineering Faculty – Year 21 No.1 (44) ISSN 2286-2455
The Arduino Nano development board (e.g. Figure 2) is a 1.3 L298N driver
small development board measuring 18 x 45 mm. The
development board uses the ATmega328 microcontroller,
this microcontroller has a modified 8-bit AVR Atmel
processor running at a frequency of 16 MHz.[4] The
development board has 32 KB of FLASH type memory, 2
KB of SRAM type memory, 1 KB of EEPROM type
memory, 6 analog pins (A0-A5) and 14 digital pins (of
which 6 pins support a PWM type output). The
development board operates at a voltage of 5V and
provides a current of 40 mA on the output/input pins (50 Figure 4. L298N motor driver.
mA on the 3.3V output pin). The communication
protocols supported by the Arduino Nano development The L298N module (e.g. Figure 4) is a powerful motor
board are I2C, SPI, USART [5]. The Android Nano driver which is used for driving DC and stepper motors.
technical specifications are: The L298N module is used for controlling up to 4 D.C
- Microcontroller: Atmega328 motor or for controlling the direction and speed of 2 D.C
- Working voltage: 5V motors. The module is made from a IC L298, resistors and
- Recommended input voltage: 7V-12V capacitors, 5V voltage regulator, power supply indicator
- Limit input voltage: 6V-12V and a 5V power jumper that is used for activating the
- Digital pins: 14 (6 PWM output) voltage regulator when the jumper is inserted. If the user
- Analog pins: 6 chooses to operate the driver with a power supply that is
- Current per I / O pin: 40 mA less or equal to 12V, then the module will be power by the
- 3.3V current: 50 mA voltage regulator and the 5V pin can supply power to the
- Flash memory: 32 KB of which 0.5 KB for microcontroller. The pins that are responsible for the
bootloader motor speed are ENA and ENB, the motor speed is
- SRAM: 2 KB controlled by a PWM input signal. The pins that are
- EEPROM: 1 KB responsible for the direction of both the motors are IN1,
- Clock speed: 16 MHz IN2, IN3 and IN4, the direction is controlled by applying
a HIGH logic input signal. The L298N technical
1.2 Bluetooth HC-06 specifications are:
- IC model: L298N
- Chip type: Bridge H
- Supply voltage (motors): 46V
- Supply current (motors): 2A
- Operation voltage: 5V
- Module voltage: 5-35V
- Module current: 2A
Figure 3. HC-06 Bluetooth module. - Operation current: 0-36mA
The HC-06 Bluetooth Module (e.g. Figure 3) is a Class 2 1.4 DC motor with reducer
slave module that is made for wireless serial
communications. If the module is paired with a primary
Bluetooth device (e.g. computer, smartphone, tablet) its
transmission becomes transparent to the user. All the data
received by the module via the serial input from the
microcontroller is immediately transmitted and when the
module receives data, it is sent via the serial interface.
Interfacing the module with a microcontroller doesn’t
need a specific software code because of the serial
Figure 5. DC motor with reducer.
interface mention above. The HC-06 Bluetooth module
operates at voltage between 3.6V and 6V. The HC-06 The D.C motor with reducer (e.g. Figure 5) uses a voltage
technical specifications are: between 3V and 6V. The reducer ratio is 1:48 and at 3V
- Bluetooth chip: CSR has 125 RPM with a current consumption of 60 mA, at 5V
- Technology: Bluetooth 2.0 + EDR has 200 RPM with a current consumption of 100 mA and
- Operating voltage: 3.6V-6V at 6V has 230 RPM with a current consumption of 120
- UART interface with configurable baud rate mA. The D.C motor with reducer technical specifications
- Supports 8 Mb external flash are:
- Supports 802.11 protocol - Engine reduction: 1:48
- Motor supply voltage: 3V-6V DC
- Torque: 0.8 kg * cm
32
Scientific Bulletin of the Electrical Engineering Faculty – Year 21 No.1 (44) ISSN 2286-2455
- RPM: 3V: 125 rpm, 5V: 200 rpm, 6V: 230 rpm In Figure 8 we have the controlled model car fully
- Current: 3V: 60 mA, 5V: 100 mA, 6V: 120 mA assembled. The electronic board (3) is connected to the
L298N drivers (1,2) that are used to control the D.C
2. THE ELECTRONIC BOARD motors (4, 5, 6, 7).
33
Scientific Bulletin of the Electrical Engineering Faculty – Year 21 No.1 (44) ISSN 2286-2455
5. REFERENCES
34