0% found this document useful (0 votes)
11 views

Scada Report

Uploaded by

Duc Le
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Scada Report

Uploaded by

Duc Le
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

SCADA REPORT

BLUETOOTH PROTOCOL
Via
Arduino Bluetooth Car using HM10 Module

GROUP 10
Name Student’s ID Note
Pham Van Phuong 21070403 Leader
Tran Minh Duc
Nguyen Vu Quang Vinh
Nguyen Truong Nguyen

Hanoi, 5/11/2024
Contents
I. Introduction ......................................................................................................................................... 4
1. Objective ........................................................................................................................................... 4
2. Importance of Bluetooth in IoT ........................................................................................................ 4
II. System Overview ............................................................................................................................. 5
1. Components ...................................................................................................................................... 5
2. Architecture....................................................................................................................................... 6
III. Bluetooth Low Energy (BLE) and HM10 Module ....................................................................... 7
1. Overview of BLE .............................................................................................................................. 7
2. HM10 Module Specifications ........................................................................................................... 8
3. HM10 in Peripheral Mode ................................................................................................................ 8
IV. Bluetooth Connection Protocols .................................................................................................... 9
1. Overview of the Bluetooth Protocol Stack........................................................................................ 9
2. Connection Setup Process ............................................................................................................... 10
3. Data Transfer Protocol .................................................................................................................... 11
V. UART in Bluetooth Communication ............................................................................................... 12
1. Overview of UART Protocol .......................................................................................................... 12
2. Role of UART in HM10 and Arduino Communication.................................................................. 12
3. Advantages of Using UART in This Project................................................................................... 12
4. UART Configuration and Optimization for Bluetooth Control ...................................................... 13
VI. Implementing the Connection on Arduino and Smartphone .................................................... 14
1. Arduino and HM10 Code Setup...................................................................................................... 14
2. Smartphone Application ................................................................................................................. 17
VII. Protocol Handling and Communication Reliability................................................................... 18
1. Handling Connection and Disconnection Events ............................................................................ 18
2. Error Handling and Data Integrity .................................................................................................. 19
3. Optimizing for Latency and Stability.............................................................................................. 20
4. Security Considerations .................................................................................................................. 21
VIII. Comparison of Bluetooth with Other Communication Protocols ........................................ 21
1. Bluetooth (BLE).............................................................................................................................. 21
2. Wi-Fi ............................................................................................................................................... 22
3. Zigbee ............................................................................................................................................. 22
4. Radio Frequency (RF) Communication .......................................................................................... 23
IX. Testing and Results ....................................................................................................................... 23
1. Connection Testing ......................................................................................................................... 23
2. Performance Analysis ..................................................................................................................... 24
3. Limitations and Improvements ....................................................................................................... 24
X. Conclusion ......................................................................................................................................... 25
I. Introduction
1. Objective
The team's project goal is to design and implement a Bluetooth-based control system for
an Arduino Nano-powered vehicle. Using the HM10 Bluetooth Low Energy (BLE) module,
the system enables wireless communication between a smartphone and an Arduino
platform to control the vehicle's movements, using simple commands such as forward,
backward, left, and right. Additionally, the system integrates sensors to enhance the
vehicle's functionality, such as an automatic lighting system in the vehicle's cabin based on
the ambient light conditions of the environment and distance warning to prevent possible
collisions.

Picture 1.1.1. Arduino Bluetooth Car by Pham Van Phuong


2. Importance of Bluetooth in IoT
Bluetooth technology plays a crucial
role in the Internet of Things (IoT)
ecosystem by providing a wireless
communication method for devices to
interact with each other over short
distances. Its low power consumption,
ease of implementation, and widespread
adoption make it ideal for IoT
applications. In this project, Bluetooth
Low Energy (BLE) is specifically
utilized, as it offers energy efficiency,
which is vital for portable and battery-
operated devices. The use of BLE in
controlling an Arduino- based system Picture 1.2.1. Importance of Bluetooth in IOT
demonstrates its effectiveness in remote monitoring and controlling tasks within IoT
applications, ranging from home automation to robotic systems.

II. System Overview


1. Components
- The key components of this Bluetooth-controlled car system include:
Arduino Nano: Acts as the primary microcontroller, handling all input and output
operations.

Picture 2.1.1. Arduino Nano Pinout


HM10 Bluetooth Module: A BLE module that facilitates wireless communication between
the smartphone and the Arduino Nano.

Picture 2.1.2. HM10 Bluetooth Module Pinout


Motor Driver Module L298N: Manages the power supply and controls the speed and
direction of the vehicle’s motors.
Picture 2.1.3. L298N Motor Driver Pinout
Motors: Four DC motors are used to drive the wheels, providing the vehicle with mobility.
Ultrasonic Sensor (HC-SR04): Measures the distance to obstacles, enabling the vehicle to
avoid collisions by activating an alert system.

Picture 2.1.4. HC-SR04 Pinout


Light Sensor: Detects ambient light levels, controlling the vehicle’s LED lighting system
based on surrounding brightness.
LED Indicators: Provide visual feedback, such as warnings when an obstacle is detected
or when lighting conditions change.
2. Architecture

Picture 2.2.1. Project’s architecture


The system is built around the Arduino Nano, which acts as the main controller, managing
all the inputs and outputs of the system. The main functional components and their modes
of operation in the system include:
- Digital Input:

Bluetooth Module (HM10): HM10 receives control signals from the smartphone and
transmits them to the Arduino Nano via the UART (Serial Communication) protocol. Each
signal is sent from the smartphone as digital data for the Arduino to process, thereby
controlling the car according to the required command.
Ultrasonic Sensor (HC-SR04): The ultrasonic sensor measures the distance from the car to
the obstacle. When the Echo pin of the sensor receives a feedback signal from the sound
wave, the Arduino receives a digital signal from this pin and uses the response time to
calculate the distance, thereby triggering a warning if the car is too close to the obstacle.

- Digital Output:
Motor Driver (L298N): Based on the control signal from the smartphone (via HM10),
Arduino sends digital signals to the motor driver to adjust the direction and speed of two
DC motors, helping the car move in the directions: forward, backward, left, and right. This
control signal is implemented through the digital output pins connected to the motor driver.
LED Indicators: The LED indicator turns on when detecting a nearby obstacle (distance
below a certain threshold determined by the ultrasonic sensor). The digital output signal
from Arduino will control the LED to turn on or off, providing a visual warning to the user.

- Analog Input:
Light Sensor: The light sensor measures the light intensity around the car and transmits an
analog signal to the Arduino's analog input pin. Based on this value, Arduino checks the
light level (in the form of voltage) and decides to turn on the LED when the ambient light
is low, ensuring the car has enough light for safe operation.

- Analog Output:
PWM Control of Motors: The PWM (Pulse Width Modulation) signal is sent by the
Arduino to the motor driver's speed control pins (enable pins) to adjust the speed of the
motor. By changing the time ratio of the PWM (analog output) pulses to the motor, the
Arduino can increase or decrease the speed of the vehicle, creating smooth and efficient
speed control.
III. Bluetooth Low Energy (BLE) and HM10 Module
1. Overview of BLE
Bluetooth Low Energy (BLE) is a wireless technology designed for applications that
require short-range, low-power connectivity, especially popular in IoT devices. BLE
consumes less power than traditional Bluetooth, allowing for longer battery life in small,
battery-powered devices. BLE operates on a client-server model and uses characteristics
and services to transmit and receive data. With its low-power and efficient connectivity,
BLE is an ideal solution for wireless connectivity in IoT applications such as remote
vehicle control.

2. HM10 Module Specifications


The HM10 module is a popular BLE module, designed to provide Bluetooth connectivity
to embedded devices, such as Arduino. Here are the main features of HM10:
Bluetooth Type: BLE (Bluetooth 4.0).
Operating frequency: Operates in the 2.4GHz frequency band.
Operating voltage: 3.3V – 6V, suitable for many types of microcontrollers.
Connection range: Transmission distance up to 10m in unobstructed conditions.
UART communication: Uses UART protocol to exchange data with Arduino Nano,
supports default baud rate 9600 bps, can be configured.
Peripheral mode: HM10 is mainly used in Peripheral mode, allowing it to receive
commands from the central device (smartphone) to control the car remotely.

Picture 3.2.1. HM10 Module Specifications

3. HM10 in Peripheral Mode


In this system, HM10 is configured in Peripheral mode. This means that HM10 emits
signals to allow central devices, such as smartphones, to detect and connect. When the
smartphone connects to the HM10, it can send control commands via the BLE interface,
and the HM10 will transfer these commands to the Arduino via UART communication.

Connection Process: When the smartphone searches for a BLE device, the HM10 will
appear as a connectable Peripheral device. Once the connection is successful, the HM10
starts transferring commands from the smartphone to the Arduino via the UART protocol,
allowing the car to receive control commands.
Data Conversion: The HM10 converts the BLE data received from the smartphone into
UART signals that the Arduino can process. This creates a stable and efficient connection,
allowing real-time control of the car without delay or interruption.
Energy Consumption: Since BLE is more energy efficient than traditional Bluetooth, the
HM10 module can operate for a long time without consuming much power, making it
suitable for systems that use batteries or require high performance.

Using the HM10 in Peripheral mode not only optimizes power consumption, but also
facilitates simple and efficient connection and data transmission. This allows remote
control of the vehicle via Bluetooth while ensuring high reliability in signal transmission.

Picture 3.3.1. HM10 in Peripheral Mode

IV. Bluetooth Connection Protocols


1. Overview of the Bluetooth Protocol Stack
The Bluetooth protocol is built on a protocol stack architecture, which helps manage and
organize data transmission between devices. The important layers in the Bluetooth Protocol
Stack include:
- Physical Layer: Responsible for transmitting and receiving radio signals on the 2.4GHz
frequency. This layer defines physical parameters such as frequency, transmission power,
and connection range.
- Link Layer: This layer controls the advertising, scanning, connecting, and maintaining
connections between devices. In this project, when the smartphone scans for HM10, the
link layer helps establish and maintain the connection.
- L2CAP (Logical Link Control and Adaptation Protocol): This layer acts as a logical link
protocol, handling the packaging and formatting of data before transmission. L2CAP
ensures that the data sent is broken into smaller data packets for transmission over
Bluetooth.
- Attribute Protocol (ATT): This protocol manages BLE attributes and services, which helps
to retrieve and update data on BLE devices. Each attribute (characteristic) can be read,
written or announced by the central device.
- Generic Attribute Profile (GATT): GATT specifies how BLE devices interact and
communicate with each other through services and attributes. In this project, GATT helps
the smartphone communicate with the HM10 and send control commands to the Arduino.

This Protocol Stack helps to ensure that data transmitted between the smartphone and the
HM10 module over BLE is arranged and transmitted efficiently and securely.

Picture 4.1.1. Bluetooth Protocol Stack

2. Connection Setup Process


The process of establishing a Bluetooth connection between the smartphone and the HM10
over BLE includes the following steps:
- Advertising: The HM10 continuously broadcasts signals so that central devices (such as
smartphones) can detect it. The advertising information includes the name and other
parameters of the device.
- Scanning: The smartphone scans for nearby BLE devices. When the HM10 is detected, the
user can select it to connect to.
- Pairing: Once detected, the smartphone sends a connection request to the HM10. This
process may include simple authentication (if required), such as PIN or password
verification, to ensure security.
- Bonding (Optional): If higher security is required, the bonding process will save
information about the connection, allowing the device to automatically recognize and
connect the next time it connects.
- Connection: Once the connection is successful, the smartphone can start sending and
receiving data to the HM10 via the Arduino UART protocol.
This BLE connection is optimized for tasks that require moderate data transfer speeds and
is energy efficient, making it ideal for IoT applications such as remote vehicle control.
Picture 4.2.1. Connection Setup

3. Data Transfer Protocol


Once the connection is established, data between the smartphone and HM10 is transmitted
according to the following rules and protocols:
- ATT and GATT Protocol: When the smartphone sends a control command, the data is
packaged in GATT format and transmitted via the ATT protocol. The HM10 receives this
data and converts it into a UART signal for the Arduino, allowing it to control motors or
other components.
- Packet Structure: Data is divided into smaller packets (20 bytes) to fit BLE. Data from the
smartphone can include commands such as "Up", "Down", "Left", and "Right" to control
the vehicle.
- Flow Control: The BLE data transmission protocol has flow control capabilities, ensuring
that there is no data loss during transmission. This helps maintain the reliability and
integrity of data sent from the smartphone to the HM10 and vice versa.
This data transmission process not only ensures accuracy but also provides quick feedback
when driving, helping the vehicle respond instantly to control commands.

Picture 4.3.1. Data Transfer Protocol


V. UART in Bluetooth Communication
1. Overview of UART Protocol
UART (Universal Asynchronous Receiver-Transmitter) is a serial communication protocol
commonly used to transmit data between microcontroller devices. In UART
communication, data is transmitted asynchronously, meaning that there is no clock signal
between the two devices, which reduces the number of wires required. UART transmits
data in serial bits over one line (TX - Transmit) and receives it over the other (RX -
Receive). Data is transmitted byte by byte, with each byte accompanied by a start bit and
a stop bit to indicate the beginning and end of each byte.
2. Role of UART in HM10 and Arduino Communication
In this project, the UART protocol plays an important role in transmitting control data from
the HM10 Bluetooth module to the Arduino Nano. HM10 receives control signals from the
smartphone via BLE connection and converts this signal into UART data, transmitting it
to Arduino via TX and RX pins.
- TX and RX pins: HM10 uses the TX pin to send control data to the Arduino's RX pin.
Arduino receives data from HM10 via UART communication and processes control
commands to control the car's motor, such as forward, backward, left turn, or right turn.
- Continuous data transmission: During operation, UART data is continuously transmitted
from HM10 to Arduino when receiving control commands from the smartphone. This
protocol ensures that control commands are updated in real time, creating a smooth and
responsive control experience.

Picture 5.2.1. Role of UART in HM10 and Arduino Communication

3. Advantages of Using UART in This Project


Using the UART protocol between HM10 and Arduino brings many benefits:
- Simple and Efficient: UART is an easy-to-configure and resource-saving protocol. This is
especially useful when used with microcontrollers like Arduino, where hardware resources
and memory are limited.
- Stable connection: Since UART is a rate-controlled data transfer protocol, it helps to
minimize data errors, especially when transmitting control signals from smartphones over
BLE.
- No need for clock synchronization: Unlike other protocols like SPI or I2C, UART does not
need a common clock signal, which reduces the number of wires connecting devices and
simplifies circuit design.
- Low latency: With the ability to quickly transfer data between HM10 and Arduino, UART
helps to minimize latency when controlling the car, helping the car respond quickly to
commands from the smartphone.

Picture 5.3.1. Advantages

4. UART Configuration and Optimization for Bluetooth Control


To ensure efficient UART data transmission between HM10 and Arduino, proper
configuration and optimization are required:
- Baud Rate: The default baud rate of HM10 is 9600 bps, which is also a common UART
baud rate for Arduino. Using this speed reduces the risk of packet loss and transmission
errors. If necessary, the baud rate can be adjusted via AT commands to suit the application
requirements.
- Buffer Management: Arduino can use buffers to temporarily store data received via UART
before processing. This helps ensure that data is read completely and without errors during
continuous transmission from HM10.
- Error Handling: In the event of errors or packet loss, Arduino can be programmed to check
the integrity of the data through special checks (such as length check or checksum encoding)
to minimize errors when controlling the car.
- Optimizing Command Processing: To minimize latency and ensure high performance,
Arduino can be programmed to process control commands as soon as they are received.
This improves the system's responsiveness when the user controls the car via smartphone.
Picture 5.4.1. UART Configuration and Optimization for Bluetooth Control

VI. Implementing the Connection on Arduino and Smartphone


1. Arduino and HM10 Code Setup
- Initialization and Configuration
In this section, constants and variables are declared to define the pins for various
components in the system:
Motor pins: Include the enable pin and two control pins for each motor (right and left).
Light sensor: lightSensorPin is connected to pin A0 to read ambient light levels.
LED: ledPin and ledPin1 are control pins for two LEDs.
Distance sensor (HC-SR04): trigPin and echoPin are used to send and receive ultrasonic
signals for distance measurement.
- setup() Function - System Initialization
In the setup() function, pin modes are set as OUTPUT or INPUT depending on the
component’s function:
Motors: All motor pins are set to OUTPUT.
Sensors: trigPin is OUTPUT (for emitting pulses), echoPin is INPUT (for receiving
reflected pulses).
Bluetooth: Dabble.begin(9600, 2, 3); initializes the Bluetooth communication speed
between Arduino and the HM10 module.
Serial Monitor: Serial.begin(9600); allows for debugging information to be printed.
- loop() Function - Main Loop
In the main loop, control commands from the gamepad are processed, and corresponding
functions are called:
Dabble.processInput(): Processes control signals from the Dabble app.
Movement commands:
Forward/Backward: When pressing up/down, both motors move in the same direction at
maximum or minimum speed (-255).
Turning Left/Right: One motor moves while the other stops, allowing the car to turn.
Function Calls: rotateMotor(), autoLight(), and distanceAlert() handle additional
functions like automatic lighting and distance alerts.
- rotateMotor() Function - Motor Control
The rotateMotor() function adjusts the direction and speed of the motors:
Direction Control: Based on rightMotorSpeed and leftMotorSpeed values, each motor’s
direction is set.
Speed Control: analogWrite() adjusts motor speed according to the absolute value of the
speed input.
- autoLight() Function - Automatic LED Control
The autoLight() function controls the LED based on ambient light levels:
Reading the Sensor Value: analogRead(lightSensorPin) measures the voltage from the
light sensor.
Light Thresholds: The LED turns on or off based on the voltage value.
Delay: delay(500); checks the light level every half-second.
- distanceAlert() Function - Distance Warning
The distanceAlert() function uses the HC-SR04 sensor to measure distance and provide a
warning:
Pulse Emission: The trigPin emits a 10-microsecond pulse to the HC-SR04 sensor.
Distance Calculation: pulseIn(echoPin, HIGH) measures the return pulse duration, which
calculates the distance based on the speed of sound (0.034 cm/μs).
LED Warning: If the distance is less than 10 cm, the LED blinks to signal a nearby
object.
Picture 6.1.1. Flow Chart
2. Smartphone Application

Picture 6.2.1. PhuongPham BLE Application


- Key Features:
Cross-Platform Compatibility: Developed using Flutter, the app runs on both Android and
iOS, ensuring wide device support and accessibility.
Bluetooth Connectivity: The app uses Bluetooth Low Energy (BLE) to establish a stable
connection with the Arduino HM10 module for communication.
Real-Time Control: Users can control the movement of the car via on-screen buttons or
joystick-like controls with minimal latency.
User-Friendly Interface: The app is designed to be easy to navigate, with clearly labeled
controls for users to operate the car with ease.
- Technologies Used:
Flutter: The app is built using Flutter, an open-source framework for building natively
compiled apps for mobile, web, and desktop from a single codebase. Flutter enables app
development for both Android and iOS with a single, unified codebase, streamlining the
development process and ensuring consistency across platforms.
Bluetooth Low Energy (BLE): The app uses Bluetooth Low Energy (BLE) technology to
establish communication with the Arduino HM10 Bluetooth module. BLE is energy
efficient and allows for reliable, short-range communication, making it an ideal choice for
controlling hardware such as Arduino boards in real-time.
FlutterBlue Plugin: To implement Bluetooth functionality in the app, the FlutterBlue
plugin is used. This plugin provides a simple API for managing Bluetooth devices,
scanning for available Bluetooth peripherals, connecting, and exchanging data between the
smartphone and the Arduino device. It abstracts the complexity of Bluetooth
communication on both Android and iOS, ensuring seamless integration with the HM10
module.
HM10 Bluetooth Module: The HM10 module acts as a Bluetooth interface for Arduino,
allowing wireless communication. The module supports BLE and allows smartphone apps
to send commands to Arduino, such as motor control, sensor reading, etc.

Picture 6.2.2. GamePad Module


VII. Protocol Handling and Communication Reliability
1. Handling Connection and Disconnection Events
In a vehicle control system using Bluetooth between Arduino and smartphone, connection
and disconnection management is very important to ensure the stability and reliability of
the system. The connection and disconnection events in this system include:
- Connection Handling: When the smartphone connects to the HM10 module, the Arduino
needs to recognize the connection status to switch to the ready-to-receive-command mode.
When the connection is successful, the HM10 and Arduino will synchronize to start
transmitting control data. One way to detect the connection status is to use a status flag or
a signal message from the HM10.
- Disconnection Handling: When the smartphone loses connection with the HM10 (due to
moving out of range or closing the application), the system needs to detect the
disconnection and return the vehicle to a safe state, such as stopping the engine to avoid
unexpected incidents. Arduino can be programmed to receive disconnection notifications
from HM10 or to automatically stop the motor after a period of no commands.
- Keep-Alive Check: To ensure a stable connection, the system can periodically check with
the smartphone by sending a "keep-alive" check signal from HM10 to the smartphone. If
no response is received within a certain period of time, Arduino will understand that the
connection is lost and stop the motor or perform other safety operations.
Picture 7.1.1. Handling Connection and Disconnection Events

2. Error Handling and Data Integrity


In a vehicle control system using Bluetooth between Arduino and smartphone, connection
and disconnection management is very important to ensure the stability and reliability of
the system. The connection and disconnection events in this system include:
- Connection Handling: When the smartphone connects to the HM10 module, the Arduino
needs to recognize the connection status to switch to the ready-to-receive-command mode.
When the connection is successful, the HM10 and Arduino will synchronize to start
transmitting control data. One way to detect the connection status is to use a status flag or
a signal message from the HM10.
- Disconnection Handling: When the smartphone loses connection with the HM10 (due to
moving out of range or closing the application), the system needs to detect the
disconnection and return the vehicle to a safe state, such as stopping the engine to avoid
unexpected incidents. Arduino can be programmed to receive disconnection notifications
from HM10 or to automatically stop the motor after a period of no commands.
- Keep-Alive Check: To ensure a stable connection, the system can periodically check with
the smartphone by sending a "keep-alive" check signal from HM10 to the smartphone. If
no response is received within a certain period of time, Arduino will understand that the
connection is lost and stop the motor or perform other safety operations.
Picture 7.2.1. Error Handling and Data Integrity
3. Optimizing for Latency and Stability
To ensure that the Bluetooth vehicle control system responds quickly and stably, it is
necessary to optimize the latency and stability during data transmission between the
smartphone and Arduino. Some optimization methods include:
- Latency Reduction: To reduce the latency in receiving and executing control commands, it
is necessary to optimize the UART transmission speed between HM10 and Arduino,
ensuring the data transmission speed is 9600 bps or higher if necessary. In addition,
minimizing unnecessary processing tasks in the Arduino source code can help improve
response time.
- Buffer Management: Using a buffer for data transmitted via UART can minimize packet
loss and ensure that data is received in full. When using a buffer, Arduino can temporarily
store data packets and process them in order, minimizing the possibility of packet loss and
helping to process control commands more efficiently.
- Connection Interval Optimization: In BLE, the connection interval can be adjusted to
optimize latency and power consumption. In this project, setting a reasonable connection
interval will help balance latency and stability when controlling the car via smartphone,
ensuring fast response without consuming too much power.
- Noise Reduction: Interference can reduce the quality of Bluetooth connections. To reduce
interference, the system can use signal filters or increase the distance between the
Bluetooth device and interference sources, such as other electronic devices operating on
the 2.4GHz band.
Picture 7.3.1. Optimizing for Latency and Stability
4. Security Considerations
To protect the system from unauthorized access, several security measures can be applied:
- Encryption: If supported by the HM10 and smartphone, encrypting data transmitted over
Bluetooth can protect control information and prevent unauthorized users from tampering
with the system.
- Secure Pairing: Using a PIN or other authentication method to pair devices can help ensure
that only authorized devices can connect to the HM10 and control the vehicle.
- Periodic Authentication: For added security, the system can perform periodic
authentication during the connection process to ensure that only authorized devices can
control the vehicle.

Picture 7.4.1. Security Considerations

VIII. Comparison of Bluetooth with Other Communication Protocols


1. Bluetooth (BLE)
Bluetooth Low Energy (BLE) is a low-power version of Bluetooth designed for short-range,
low-power communication applications, especially suitable for IoT devices such as sensors
and control devices. Some of the characteristics of BLE include:
- Range: BLE has a transmission range of about 10–100 meters in an unobstructed
environment, depending on the signal strength and type of device. However, the range may
be reduced due to the effects of obstacles or interference.
- Data transmission speed: BLE has a maximum data transmission speed of about 1 Mbps.
While not as fast as Wi-Fi, it is sufficient for basic communication applications such as
remote device control and sensor data exchange.
- Power saving: BLE consumes very little power compared to protocols such as Wi-Fi,
making it an ideal choice for battery-powered devices that require long battery life.
- Project application: BLE in the HM10 module helps the vehicle control system achieve a
balance between communication performance and energy saving, suitable for remote
control via smartphone without consuming much energy.
2. Wi-Fi
Wi-Fi is a wireless communication protocol with high data transmission speed, mainly
used in local area networks (LANs) and Internet connections. Some characteristics of Wi-
Fi include:

- Operating range: Wi-Fi has an operating range of 30–100 meters, depending on the type
of device and environment. It usually works well in home or office networks, but the range
is reduced in environments with many obstacles.
- Data transmission speed: Wi-Fi supports high data transmission speeds, which can reach
hundreds of Mbps to several Gbps, very suitable for large data transmission applications
such as video streaming or complex remote control.
- Power Consumption: Compared to BLE, Wi-Fi consumes more power, which may reduce
the battery life of the device if used continuously.
- Project Application: Although Wi-Fi has high transmission speed and wide range, its
higher power consumption makes it unsuitable for a simple and energy-saving vehicle
control system. Moreover, the requirement of an available Wi-Fi network may limit the
mobility of the system.
3. Zigbee
Zigbee is a low-power wireless communication protocol, specifically designed for IoT
applications and short-range communication with simple devices. Zigbee is mainly used in
automation systems such as smart homes and industry.

- Operating range: Zigbee has a transmission range of about 10–20 meters in an


unobstructed environment, but the range can be extended using repeater nodes (mesh
networking).
- Data transmission speed: Zigbee's transmission speed is relatively low, about 250 kbps.
Although not suitable for high-speed applications, this speed is sufficient for simple
communication tasks.
- Power consumption: Zigbee is very energy-efficient, making it an ideal choice for long-
lasting battery-powered IoT devices.
- Project application: Although Zigbee is energy-efficient and suitable for IoT systems, it
has a lower transmission speed than BLE and requires a more complex network structure.
Therefore, BLE is still a better choice for simple remote vehicle control.
4. Radio Frequency (RF) Communication
RF Communication is a form of data transmission using radio waves in a wide frequency
range. RF can use simple modules such as RF 433 MHz to communicate basic data over
relatively long distances.

- Operating range: RF has a much longer transmission range than BLE, often up to several
hundred meters or even kilometers in an unobstructed environment, depending on the
transmit power and antenna type.
- Data transmission rate: RF transmission rates are usually quite low, around a few kbps to
100 kbps, but can meet applications that do not require high bandwidth.
- Energy consumption: RF usually consumes less power, especially when designed for
occasional communication applications. However, compared to BLE, RF is not optimal for
mobile devices that need real-time communication.
- Project application: Although RF has a wide range, it has a low transmission rate and does
not support real-time communication as well as BLE. Moreover, RF communication is
often not suitable for transmitting complex and synchronous control data, making BLE a
better choice for controlling vehicles via smartphone.

Data Power
Protocol Range Ideal Use Case
Rate Consumption
Bluetooth 10–100 Up to 1 Short-range, low-power IoT,
Very Low
BLE meters Mbps smartphone-controlled systems
Up to
30–100 High-data-rate applications, network-
Wi-Fi several High
meters based systems
Gbps
10–20 Up to
IoT, smart home automation, simple
Zigbee meters 250 Very Low
data transfer
(Mesh) kbps
Several
Up to
hundred Long-range, low-data-rate systems,
RF 100 Low
meters to basic communication
kbps
km
Table 8.1. Comparison of Bluetooth with Other Communication Protocols
IX. Testing and Results
1. Connection Testing
- Objective: Ensure that the system connects stably between Arduino and smartphone via
Bluetooth BLE, with the compatibility of HM10 module.
- Method: Perform connection tests by connecting and disconnecting between the phone and
HM10 module in various scenarios, including:
Connection at different distances, from 1 to 10 meters.
Test the stability of the connection in environments with interference (such as near
Wi-Fi devices).
Consider the delay when performing control operations from the phone.
Result: The BLE connection between HM10 module and smartphone works stably
at a distance of 1–8 meters. Outside this range, the connection may be disconnected
or delayed. Latency is low and the system responds immediately to control
commands (average 100–150 ms).
2. Performance Analysis
- Objective: Evaluate the performance of vehicle control functions, test the response time,
accuracy, and stability of the system.
- Method:
Test vehicle control operations through basic commands such as forward, reverse, turn left,
turn right, and stop.
Measure the response time of commands from pressing the button on the phone until the
vehicle performs the action.
Test the operation of the built-in sensors (light sensor, distance sensor) to ensure the vehicle
responds properly to the surrounding environment.
- Results: The system performed well in control tests, with a delay when the vehicle
responded to commands ranging from 100–200 ms, depending on the distance. The sensors
worked effectively; LED lights turn on/off according to the ambient light level, and the
accurate distance sensor warns with LED lights when obstacles are within 10 cm.
3. Limitations and Improvements
- Limited connection range: BLE connection via HM10 module is only stable within about
8–10 meters in environments with few obstacles. When used outdoors or in environments
with many obstacles, the connection range can be significantly reduced.
- Data transmission speed limit: With BLE's maximum data transmission speed of 1 Mbps,
the system sometimes has a small delay when sending complex control commands or when
requiring continuous transmission of sensor data from the vehicle to the phone.
Limited anti-interference ability: BLE can be affected by interference from other devices
using the same 2.4 GHz frequency, such as Wi-Fi and other Bluetooth devices, resulting in
unstable connections.
- Vehicle power consumption: Although BLE is energy efficient, other vehicle components
such as motors and sensors consume relatively large amounts of power, which can reduce
the operating time if using batteries.
- Improvements:
Extend the connection range: Upgrade the HM10 module to more modern BLE modules
(such as HM11) or use BLE mesh network solutions to improve the connection range and
stability when controlling at long distances.
Improve data transmission speed: To minimize latency when controlling the vehicle
remotely, you can experiment with other communication protocols such as Wi-Fi if the
power requirements are not too strict.
Optimize signal processing: Use signal filtering and connection management algorithms
to minimize the impact of interference from other devices, ensuring a more stable
connection in an environment with many electronic devices.
Power system improvements: Use high-capacity batteries or add solar charging solutions
to extend vehicle operating time in outdoor environments.
X. Conclusion
The project of remote control of the car using Bluetooth via Arduino and HM10 module
has achieved positive results in applying Bluetooth Low Energy (BLE) technology to
control IoT devices. Through the research and testing sections, we have evaluated the
performance and usability of the system, and drawn some valuable lessons and experiences.

- Summary of results achieved


Effective Bluetooth BLE connection: HM10 module allows stable connection with
smartphone, helping to transmit control signals quickly and save energy. BLE connection
achieves low latency and ensures effective communication between the car and the control
device, responding well to short-range applications.
Remote control capability through simple commands: The car can perform commands to
move forward, backward, turn left, turn right and stop with fast response time. The system
shows stable operation, responding accurately to control commands from the user.
Automatic sensor integration: The project has integrated light sensors and distance sensors
to create automatic features such as turning on/off LED lights depending on the ambient
light and warning when the vehicle is approaching an obstacle. These features help the
system adapt better to the surrounding environment, improving safety and control
efficiency.
Scalability for IoT applications: The BLE system has the potential to be applied in other
IoT systems thanks to its energy saving and simplicity in connection setup. Technologies
such as UART help increase communication efficiency, which is the foundation for
expanding many other control functions.

- Limitations and development recommendations


Connection range: BLE only supports vehicle control in a short range (about 8–10 meters
in an environment with few obstacles). To expand the scope of application, it is possible to
consider integrating technologies such as BLE mesh networks or using Wi-Fi or Zigbee
modules.

Improve stability and anti-interference ability: In an environment with many devices using
the 2.4 GHz band, BLE connection may be unstable. Therefore, it is necessary to consider
anti-interference solutions, such as using signal filtering algorithms, to ensure a more stable
and reliable connection.

Improve the energy system: Bluetooth-controlled vehicles consume relatively large


amounts of energy when operating continuously. To extend the operating time, energy-
saving solutions can be applied or larger capacity batteries can be used, or combined with
automatic battery charging systems.
Apply artificial intelligence (AI): In the future, AI can be integrated into the system to
automatically recognize and process complex commands, or perform autonomous
navigation tasks, enhancing the vehicle's applicability in higher automation scenarios.

- Conclusion
The Bluetooth remote control project has demonstrated the feasibility of using BLE
technology in IoT applications with low-cost and energy-saving connectivity requirements.
Despite some limitations in connection range and anti-interference ability, the current
system has successfully completed the set goals, including stable connection, precise
control, and integration of basic automation features.
With the proposed improvements in connection range, signal stability, energy optimization,
and AI applications, the project has the potential to be widely developed and applied in
areas such as home automation, remote control of IoT devices, and smart mobile systems.
This not only brings high flexibility but also opens up great prospects for deploying BLE
and Arduino technology in future IoT projects.

You might also like