0% found this document useful (0 votes)
10 views9 pages

Remote Control Car - Arduino

1) The students developed a wireless remote-controlled car using a Bluetooth module, Arduino Nano, and logic circuits. 2) They programmed the Arduino to receive commands from the cell phone via Bluetooth and control the car's motors. 3) The article describes the hardware and software developed to enable remote control of the vehicle.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views9 pages

Remote Control Car - Arduino

1) The students developed a wireless remote-controlled car using a Bluetooth module, Arduino Nano, and logic circuits. 2) They programmed the Arduino to receive commands from the cell phone via Bluetooth and control the car's motors. 3) The article describes the hardware and software developed to enable remote control of the vehicle.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Final Course Work ˜

Remote Control Car


1
F.Jonathan L.Drumondl, João Lucas L. Monteiro, 1
1
Lucas Vitoriano Q Lira, M.CesarF.D. Filho 1

1 Department of Teleinformatics - Federal University of Ceará (UFC)


ZIP code 60455-970 - Fortaleza - CE - Brazil

[email protected], [email protected]

[email protected], [email protected]

Abstract. This article provides a description of the confection of a wireless


remote control car using Bluetooth Module (HM-10), Arduino-Nano and logic
circuits. Also described in this article is the programming used in the project,
with methods to exemplify the logic of project operation. In short, this article
will give the theoretical basis of the project in a methodical way for the pur-
pose of evaluation of Mr. Danielo Gomes for the conclusion Introduction to
Computer Engineering.

Summary. This article presents the description of the construction of a remote-controlled car.
wireless remote using Bluetooth Module (HM-10), Arduino Nano and circuit
logical. I have also described in this article the programming used in the
I have methods to exemplify the logic of how the project works.
In summary, this article will provide the theoretical basis of the project in a methodical way.
for the purpose of evaluating the excellent professor Danielo Gomes for the
conclusion of the course Introduction to Computer Engineering.

˜
1. Introduction
Since the emergence of the internet and wireless communication means, it is urgent to
the need for people to have total control over everything around them. With this need
the means of automation and control emerged, where the entire current industry operates, such as
also has a tendency for the market of autonomous houses and the internet of things.
Due to this, we had the idea of creating a remote-controlled car that works
with the same purpose of controlling things remotely, to simplify a more complex system
complex and to demonstrate clearly to the audience some applications of the field of
Remote Control.

2. Project Development
Bluetooth technology is used for long-distance communication between
devices of various shapes, through a standard communication protocol.
We use the HM-10 module, which is capable of transmitting the Bluetooth protocol to the
car control through communication between the Arduino Nano, coupled to the car, and the
cell phone
Figure 1. Bluetooth module (HM-10)

With that, some basic functions for the communication of the module were defined.
with the Arduino and the cell phone. We had to assemble the part of the electronic circuit based on the
datasheet of the HM-10 module, which provides a standard for assembly, where it was necessary to make
some connections with wires between the board and the module. The entire process was accompanied by
welded to ensure that the circuit would not detach from the car when it was
in motion.
For the processing of the data sent by the Bluetooth module, we use a
Arduino Nano that is lighter, which increases the speed of the car, and has more ports.
digital and analog. To facilitate the connection and reconfiguration of the wires with the Arduino,
we connect the microcontroller on a breadboard.

Figure 2. Arduino Nano

Now, with the information processing part completed, we need to trans-


to supply the energy and the direction of rotation for the motors. For this, we use an H-Bridge,
that can change the polarity of the voltage, its direction and its power, making with
that the motors carry out the commands made by the processor.

Figure 3. The H bridge used in the project


2.1. Creation and Modeling
Since we have all the parts, it was necessary to create a chassis for the car.
that was large enough to accommodate all the pieces. With that, we went to the block
didactic of the course of Systems and Digital Media that were at our disposal a
3D printer, where it was possible to create this chassis with the ideal proportions. We used the
software Thinkercad for chassis modeling. Something interesting to highlight is that
It is free software with several example projects so that it is possible to learn to
model according to the project's needs.

Figure 4. Upper view of the chassis modeled in free software

Similarly, the task was divided among each person in the group, which made
possible to finish the work more quickly. We left half of the people with the
Hardware and the other half with Software that were created simultaneously in a way
that it would be possible to test the potential failures of each step of the project. The first project
I went to do the communication of the Bluetooth Module with the Arduino, which basically was the
most important part of the project, as through this communication it was possible to make with
so that the cell phone could control the motors, buzzer, and the direction of the car. Then after this
stage, we installed the module to the car, which had this arrangement in the project:

Figure 5. The nano and bluetooth allocated on the protoboard


After the installation of the bluetooth module and motors on the chassis, the car was left with
It was complete and it was only necessary to program the engines and module to make the car.
to function. The hardware part of the project was designed to be just a prototype of
easy understanding to make it easy for everyone on the team to put together, since not everyone had
knowledge of Arduino and electronics. We had this as the main challenge and I managed to
we can learn in a relatively short period of time, as everyone on the team was
willing to learn.

Figure 6. The completed project

2.2. Car Programming


The most important part followed by Bluetooth is the car programming.
it was possible to configure the modules, the motors, and the control of the car for its total
functioning, where we had to create a logic for each button press of the con-
troll. This logic allowed the buttons not to create undue interruptions between each other and
could activate parts of the engine in an organized manner, enabling locomotion
of the car. ´It is of utmost importance to highlight the learning of programming fundamentals
for a greater understanding of the hardware part and to have more control over the
project. In summary, it was necessary to add the Dabble library for it to function.
control, which contains some functions and protocols for the application to communicate with the module
with Bluetooth. It was also necessary to define some standard inputs for the motorcycle.
Yes, where we use some defines. The programming is summarized in a set of if's.
what made it possible to separate the drive of the motors and the steering of the car, to achieve
command the car to the left, right, up and down.
//Definitions of the ports for activation
two engines and car control
Dabble Library for operation
from the remote control application

#define IN1 8
#define IN2 7
#define IN3 6
#define IN4 5
#define ENA 9
#define ENB 10
#define buzzerPin 11
#define ledPin 4
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_MODULE
#include <Dabble.h>

void setup() {

Serial.begin(9600);
Dabble.begin(9600);
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2,OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4,OUTPUT);
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
}
functions to acquire the status of each button
void loop() {
Dabble.processInput();
bool buzzerState = GamePad.isSquarePressed();
bool ledState = GamePad.isCirclePressed();
bool isBrake = GamePad.isTrianglePressed();
bool upperButton = GamePad.isUpPressed();
bool lowerButton = GamePad.isDownPressed();
bool rightButton = GamePad.isRightPressed();
bool leftButton = GamePad.isLeftPressed();
float c = GamePad.getx_axis();
float d = GamePad.gety_axis();
float vTan = map(d, -7, 7, -255, 255);
float steering = map(c, -7, 7, -255, 255);
float v1 = vTan + steering;
float v2 = vTan - steering;

car horn
if(buzzerState){
analogWrite(buzzerPin,25);
Serial.print(buzzerState);
}
if(!buzzerState){
analogWrite(buzzerPin,0);
Serial.print(buzzerState);
}
//far´ois
if(ledState){
digitalWrite(ledPin, HIGH);
}
if(!ledState){
digitalWrite(ledPin,LOW);
}
if(!isBrake)
{
if(upperButton)
{
setMotor(255,255);
}
if(lowerButton)
{
setMotor(-255,-255);
}
if(rightButton)
{
setMotor(255,-255);
}
if(leftButton)
{
setMotor(-255, 255);
}
if(!upperButton&&!lowerButton&&!rightButton&&!leftButton)
{
setMotor(v1,v2);
}
}
conditioning for the direction and acceleration of the car
if(isBrake)
{
digitalWrite(IN1, HIGH);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, HIGH);
analogWrite(ENA,255);
analogWrite(ENB,255);
}
}
//function for car movement (up, down, left, right)
void setMotor(int vA, int vB)
{
int v1 = constrain(vA, -255, 255);
int v2 = constrain(vB, -255, 255);
if(v1>=0&&v2>=0)
{
digitalWrite(IN1,HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3,HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA, abs(v1));
analogWrite(ENB, abs(v2));
}
if(v1>=0&&v2<0)
{
digitalWrite(IN1,HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4,HIGH);
analogWrite(ENA, abs(v1));
analogWrite(ENB,abs(v2));
}

if(v1<0&&v2>=0)
{
digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA,abs(v1));
analogWrite(ENB, abs(v2));
}
if(v1<0&&v2<0)
{
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
analogWrite(ENA,abs(v1));
analogWrite(ENB, abs(v2));
}
}
The code is easy to understand as it basically focuses on motor activations.
actions resulting from button presses, with a series of if statements to organize the
interruptions that the control made in the engines.
˜
3. Final Considerations
The project was of utmost importance to the team, as we had to learn several
technologies to make the car work, whether with the communication of the module with the con-
I also learned to properly use the Arduino. We also understand the im-
importance of the integration of hardware with software, since we made direct commands
to the car with software and we had to test if the commands were working. Or-
Another important point is the prototyping and arrangement of components on the protoboard, having in
it is clear that a good organization of the manufacturing and electronics made the project easier
to assemble. Regarding the importance of the car, we can see it as a base for
learn wireless communication and networking protocols, which are the basis for the internet of things
Automation and control systems, which are fundamental for an engineering professional.
computation that will enter the automation market. In theory, it was a quite
productive that made us think as a team and acquire knowledge that the disciplines of
semesters do not provide us, making everything even more challenging and interesting.
ˆ
4. References
Arduino Open Source. General overview of the Arduino Nano. Available in:
Access 06
Jun. 2019
Future Electronic Corporation. H bridge L298 module datasheet. Available at:
[https://www.fecegypt.com/uploads/dataSheet/1522493822.h.pdf]. Access on: 06.
jun.2019
Guangzhou HC Information Technology Co. Product Datasheet of HC-06. Available
em:[https://www.olimex.com/Products/Components/RF/BLUETOOTH-SERIAL-HC-
06/resources/hc06.pdf]. Accessed on: June 06, 2019
Tinkercad. Create 3D digital designs with online CAD. Available at:
[https://www.tinkercad.com/]. Accessed on May 23, 2019.

You might also like