Vous êtes sur la page 1sur 4

ESPOCH.

Escuela de Ingeniera Electrnica en Control y Redes Industriales

ROBOT WITH BLUETOOTH MODULE


Katherine Estrada (668)
katherinestrada29@gmail.com

Anglica Len (201)


anetlebupo@hotmail.com

Diana Aucapia (246072)


vdyanys1991@hotmail.es

4. THEORETICAL FRAMEWORK

ABSTRACT: This work presents the


construction of a robot, integrating a bluetooth
module for control. The robot will use bluetooth to
receive a signal, which will use it to make the turns
being ordered. For this setup the bluetooth module
with Arduino programming.

a. SERVO HS-311
The HS-311 is the perfect servo for inexpensive
applications. Do not let the price fool you though; this
servo features many of the same aspects of more
expensive servos. One piece circuit board and tight
mesh gears ensures great durability. Comes with a
number of various servo horns and arms with mounting
hardware.

KEYWORDS: Arduino mega, Bluetooth module,


programming, comunication.

1.

A servomotor (also called servo) is similar to a DC


motor that is capable of being located at any position
within its operating range, and remain stable in that
position device. A servo motor is an electric motor that
can be controlled both in speed and position.

INTRODUCTION

He explained about building a robot with Arduino


which can be controlled via Bluetooth with Android
phone / tablet.
USB Bluetooth is the wireless world. It is now
almost standard for wireless personal electronic
interfaces. Bluetooth is used in printers, scanners, mice,
keyboards, headsets, cordless digital camera to transfer
images to the PC, some phones, wireless PDAs and
MP3 players.

2. OBJECTIVES

Figure 1. Servo HS-311

Build a robot with a Bluetooth


module that has the ability to move
easily.
Investigate how the Bluetooth
module and the advantages it gives
us to use it.

b. BLUETOOTH MODULE HC-05

3. MATERIALS

2 Truncated HS-311 servos


1 bluetooth module
1 Pair of wheels
1 Arduino mega
1 Battery 9 V
1 Crazy wheel
13 Connection cables Arduino
1 Switch
Silicone

Figure 2. Bluetooth module.

The module bluetooth HC-05 is offering a better price


and features, as it is a master-slave module means that
besides receiving connections from a PC or tablet is also
able to generate connections to other devices bluetooth.

ESPOCH. Escuela de Ingeniera Electrnica en Control y Redes Industriales

.
This allows us, for example, connect two bluetooth
modules and form a point to point connection for
transmitting data between two microcontrollers or
devices.

c. ARDUINO MEGA
Decision making and control of the motors are
usually run by a microcontroller but in this case we use
Arduino. The control board contains the element, along
with other basic electronic components required to run
the microcontroller.

The HC-05 has an AT command mode to be


activated by a high state in the PIN34 while lights (or
reset) the module.
In versions for breadboard this
pin is marked as "Key". Once you are in the AT
command mode, you can configure the bluetooth module
and change parameters such as device name,
password, master / slave mode, etc.
HOW TO SET
To communicate with the module and configure it,
you need access to the module via a serial interface. We
can use an Arduino with a pair of wires (using the
Arduino USB-Serial Bridge), a kit for XBee or a simple
MAX3232 on the PC serial port.

Figure 4. Arduino MEGA.

BASIC CONNECTION WITH ARDUINO


Connections for arduino are fairly simple. We require
only minimum food place and connect pin serial transmit
and receive (TX and RX). Remember that in this case
the pin must be connected crossed TX Bluetooth ->
Arduino RX and RX Bluetooth -> Arduino TX. The
following figure shows the basic connections the module
to work.

5. CONCLUSIONS AND
RECOMMENDATIONS

Figure 3. Connection of Bluetooth module and arduino.

You must connect the bluetooth as shown in Fig.3, so


shall enter into AT mode and change its transmission
rate to 38400 baud, you will know which came into AT
mode because the LED will begin to flash on and off
slowly.
Then you have to load the configuration of the
arduino bluetooth. Once the code loaded into the
Arduino, but you must enter AT commands.

6.

Open the Arduino IDE Serial Monitor: You must open


the Terminal Arduino IDE, select 9600 baud as the
transfer rate and enable "Both NL & CR" option. By
doing this you will see what appears in Fig.2. Following
this sends the "AT" will automatically receive response
"OK" command if this was successful it's all good.

To rename your device type "AT + NAME =" name


"command" and to verify it rewrites the command "AT +
NAME". This way you will perform the same steps with
different AT commands offered by this device.

The structure of the robot is the primordial


because the robot has to be circular in the front
part to avoid it engages in the track.
When we program the robot is essential know
the corrects angles of rotation and the time of
these
We must verify that all connections are made
correctly to avoid short circuits that affect the
operation of our robot.
Programming for configuring Bluetooth was held
in conjunction with the Arduino platform and
software.
It is recommended to separate power circuits to
the stage of the controller board in this case our
Arduino one to another stage that feeds directly
to how servo card.
When testing the robot must verify that there
are no anomalies in control and that may affect
the performance of the same.

REFERENCES

[1] http://www.microsonic.de/es/Interesting-facts.htm
[2]http://academica.unavarra.es/bitstream/handle/245
4/2503/577360.pdf?sequence=2
[3] http://www.geekfactory.mx/radio/bluetooth-hc-05y-hc-06-tutorial-de-configuracion/

7. ANNEXES
7.1 CODE

ESPOCH. Escuela de Ingeniera Electrnica en Control y Redes Industriales

7.1.1
CODE
MODIFICATION

dato = Serial.read();

BLUETOOTH

/*ADELANTE A*/
if(dato == 'A')
{
adelante();
}
/*ATRAS B*/
else if (dato == 'B')
{
atras();
}
/*PARO E*/
else if ( dato== 'E')
{
paro();
led();
}
/*DERECHA D*/
if(dato == 'D')
{
derecha();
}
/*IZQUIERDA C*/
else if (dato == 'C')
{
izquierda();
}
}}
/*FUNCIONES */
void adelante()
{
servoder.write(180);
servoiz.write(73);
}
void atras()
{
servoder.write(0);
servoiz.write(180);
}
void paro()
{
servoder.write(90);
servoiz.write(90);
}
void led(){
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
delay (800);
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
delay (800);
}
void derecha()
{
delay(100);
servoder.write(90);
servoiz.write(70);
}
void izquierda()
{
servoder.write(110);
servoiz.write(90);
}

char CONEC[10] = "RPC"; //Nombre del dispositivo


bluetooth
char BPS
= '4'; // frecuencia de 9600
char PASS[10] = "1234"; // contrasea
void setup()
{
Serial.begin(9600);
pinMode(13,OUTPUT);
digitalWrite(13,HIGH);
delay(20000);
digitalWrite(13,LOW);
Serial.println("AT");
delay(1000);
Serial.print("AT+NAME");
Serial.println(CONEC);
delay(1000);
Serial.print("AT+BAUD");
Serial.println(BPS);
delay(1000);
Serial.print("AT+PIN");
Serial.println(PASS);
delay(1000);
}
void loop()
{
digitalWrite(13,!digitalRead(13));
delay(500);
}

7.1.2 CODE
BLUETOOTH

TELEOPERATION

WITH

#include <Servo.h>
Servo servoder;
Servo servoiz;
char dato;
int led1=7;
int led2=6;
void setup()
{
Serial.begin(9600);
servoder.attach(10);
servoiz.attach(9);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
}
void loop()
{
//preparando el Serial
if (Serial.available() >0) {
//Recebe os dados de x e y

ESPOCH. Escuela de Ingeniera Electrnica en Control y Redes Industriales

7.2 IMAGES

1.Necessary holes to secure the wheels of rubber with


servos.

2. Paste Servos with hot silicone to the fiber structure.

3. Positioning and securing the Arduino MEGA at structure


with bluetooth and connect lead wires to the servos.

4. Connect the battery of 9 Vot the cart with bluetooth

5.We create an application in the App Inventor 2 for control of


the cart with bluetooth

6. programming of the application

Vous aimerez peut-être aussi