Introduction: MONSTER BOT

 Controlled by a smartphone through a Bluetooth module and an Arduino board CART
materials
• Arduino uno
• Bluetooth Module HC -05
• Smartphone
• Bridge h ( L293B )
• Auto Chassis with motors
He began performing a circuit which is controlled by the Arduino one card, this should perform the functions that make the car can move in directions forward, backward, left, right.
To begin the project will use a breadboard on which we mount our circuit . Images will be added in this connection will be explained as well as each .

Step 1: CONNECTION

In image 1 the connection made to the operation of the h bridge to control engines , which helps bridge h is achieved in changing the rotation of the motor is displayed , the configuration of connections h bridge L293B according to the data sheet is the picture 2 .
To understand what is meant by the picture 2 describe each of the pins :
• Pin 1 and pin 9 in these current works with the bridge which connects h , this can be extracted from the 5v working with Arduino .
• Pin2 , pin7 , pin 10 and pin 15 are these pins that control the motor speed, which are connected to a PWM signal from the Arduino board . Pins 2 and 7 are used to control the same motor and the pins 10 and 15 are for controlling the other motor.
• Pin 3 , pin6 , pin 11 and pin 14 are the pins that are used for the operation of these engines give the power to the motor spinning pins 3 and 6 are for the power and ground of an engine ; pins 11 and 14 are used for power and ground on the other engine , no matter how this is connected and changing polarities to rotate to one side or the other engine.
• Pin 4 , pin 5 , pin 12 and pin 13 are connected directly to the ground , which can be used in the Arduino board .
The Arduino board is shown in picture 3 .
Which contains the following connections :
To feed the power circuit is connected directly to GND Cable for land and other Arduino 5v to offer.
4-pin PWM is used to control the motors, which correspond to PWM digital pins 5, 6 , 10 and 11.
And the engines are connected directly to the bridge h accordingly.

Step 2: DESCRIPTION OF BLUETOOTH

To begin with the configuration of the bluetooth HC-05es necessarily to connect before each of the pines of the bluetooth correctly in the Arduino one. Remembering that the module of bluetooth HC-05 supports the voltages of entry of 3.3 and 5v. The pines that we will find in the bluetooth for are the following ones:
-Vcc: Supply of the module between 3,6V and 6V.
-GND: The mass of the module.
-TXD: Transmission of information.
-RXD: Receipt of information to a voltage of 3,3V.

The voltage of supply for the Arduino by means of Jack of 2.1mm is advisable between 7v-12v for his correct functioning. Not to forget that having done movements in the connections is advisable to remove the battery to avoid shortly and consequently the hurt to any component the module of the bluetooth to be able to burn.






Step 3: CODE OF MONSTER BOT

# INCLUIR <SoftwareSerial.h> / / Inicialización de El El El El El El los pins bluetoothTx int = 1; bluetoothRx int = 0; / / Variables Que la ONU corresponden alfiler CADA pin de la Arduino 0 y el pin 1 En Si de de de de de de han omitido ya Que se utilizan en la Comunicación serie En Si Establece Entre pin2 int Arduino y el módulo Bluetooth = 2; pin3 int = 3; int pin4 = 4; pin5 int = 5; pin6 int = 6; pin7 int = 7; pin8 int = 8; pin9 int = 9; PIN10 int = 10; PIN11 int = 11; PIN12 int = 12; Pin13 int = 13; / / El control de de de de de Varables utilizado Parr Controlar la VELOCIDAD del motor de la CC int VELOCIDAD = 255; speed2 int = 255; Bluetooth SoftwareSerial (bluetoothTx, bluetoothRx); / / Declaracion de los Métodos Que usaremos void forward (); Vacío inversa (); void giro_derecha (); void giro_izquierda (); void pararMotorTraccion (); void pararMotorDireccion (); encenderLuz void (); apagarluz void (); encenderComponente void (); apagarComponente void (); encenderComponente2 void (); apagarComponente2 void (); encenderComponente3 void (); apagarComponente3 void (); modificarVelocidad void (int NIVEL); void setup () {/ / Comienza la serie Comunicación Con El USB y declaran de DE COMO pinos de Salida Que utilizaremos Serial.begin (9600); pinMode (pin2, OUTPUT); pinMode (pin3, OUTPUT); pinMode (pin 4, OUTPUT); pinMode (pin5, OUTPUT); pinMode (pin6, OUTPUT); pinMode (pin7, OUTPUT); pinMode (contacto 8, OUTPUT); pinMode (pin9, OUTPUT); pinMode (PIN10, OUTPUT); pinMode (PIN11, OUTPUT); pinMode (PIN12, OUTPUT); pinMode (Pin13, OUTPUT); / / Configuracion de La Conexión en serie de estafa bluetooth bluetooth.begin android (115.200); bluetooth.print ("$ $ $"); de retardo (100); bluetooth.println ("U, 9600, N"); bluetooth.begin (9600); } Bucle Void () {/ / Leer y ESCRIBIR en el Bluetooth de serie si (bluetooth.available ()) {recibido = Carácter bluetooth.read (); Tosend charlas = (char) bluetooth.read (); Serial.print (Tosend); } / / Si el arduino android Envía Algo Que este método Tiene el Carácter Que Yo os mando / / y Sí Basa en Que se ejecuta el Método Deseado if (Serial.available ()) {Tosend charlas = (char) Serial.read ( ); bluetooth.print (Tosend); Interruptor (Tosend) {/ / si si obtiene Una C entra en el Modo de control de la Pantalla Cardux Casó 'C': / / Lea el siguiente pin y estafa de la base de de de de en El Número o letra luces pin Correspondiente si (. de serie available ()) {toSend2 char = (char) Serial.read (); bluetooth.print (toSend2); Interruptor (toSend2) {pulsado El Botón / / Forward Casó 'W': Adelante (pin5, pin6); mameluco; Atrás Botón Presionado / / case 'S': Marcha Atrás (pin5, pin6); mameluco; Caso pulsado / / IZQUIERDA 'A': giro_izquierda (pin2, pin 3); mameluco; / / Botón Caso presionado derecho 'D': giro_derecha (pin2, pin 3); mameluco; / / Este Método SE ENCUENTRA está en Marcha Parr DEJAR de presionar El Botón de Avance o Retroceso Casó 'Z': pararMotor (pin5, pin6); mameluco; / / Este Método Caso SE ENCUENTRA CUANDO SE ejecuta suelta El Botón de la Derecha o Izquierda Hacia la 'X': pararMotor (pin2, pin 3); Rompen; / / Cuando Cambian las luces está en Estado Caso Encendido 'I': encenderLuz (pin4); Rompen; / / Cuando Las Luces Cambian al Estado Apagado Casó 'O': apagarluz (pin4); mameluco; / / Caso de de de 'H' de de de Cuando el Interruptor Esté en la comp1 Estado: encenderComponente (contacto 8); rompo; / / Cuando el Interruptor está en Estado I comp1 off case 'B': apagarComponente (contacto 8); mameluco; / / Caso de de de de de Cuando el Interruptor Esté en la comp2 Estado 'J': encenderComponente (pin9); rompo; / / Cuando el Interruptor está en Estado I COMP2 Caso off 'N': apagarComponente (pin9); mameluco; / / Caso de de de de de de Cuando el Interruptor Esté en la comp3 Estado 'K': encenderComponente (PIN10); rompo; / / Cuando el Interruptor está en Estado I COMP3 off case 'M': apagarComponente (PIN10); mameluco; / / Si la Aplicación está en pausa, EJEMPLO POR, Parr salir de la Aplicación o CUANDO Una Llamada de Los Motores Que se conectan a los pinos el 5 y 6 y Los Pinos continuo 2 y 3 / / Para Evitar HACER giro y el control de de de de el de el del Tiene Que Proyecto, si USTED QUIERE vuelta dar Pecado Algo Más SÓLO Tiene Que ESQUEMA ESQUEMA ESQUEMA ESQUEMA ESQUEMA ESQUEMA Añadir la línea de Código Que DESEA Caso ejecutar 'x': pararMotor (pin5, pin6); pararMotor (pin2, pin 3); mameluco; / / Procedimiento De Control de tracción de Velocidad del motor en el carro Casó 'V': if (Serial.available ()) {toSend3 char = (carbón de leña) Serial.read (); bluetooth.print (toSend3); Interruptor (toSend3) {/ / basado en el valor Que el el el el el el usted recibe es la VELOCIDAD Que el cesta caminando 64 es El Más Bajo Y 255 El Más Alto '0 Casó ': modificarVelocidad (64); mameluco; Caso 1 ": modificarVelocidad (96); mameluco; Caso 2": modificarVelocidad (128); mameluco; Caso '3 ': modificarVelocidad (172); mameluco; Caso '4 ': modificarVelocidad (255); mameluco; }} Break; } / / Fin de Interruptor toSend2} / / Fin de Si Se Rompen; } Adelante Void (int Pin1, Pin2 int) {analogWrite (Pin1, LOW); analogWrite (Pin2, VELOCIDAD); digitalWrite (Pin13, HIGH); } Inversa Void (int Pin1, Pin2 int) {analogWrite (Pin1, VELOCIDAD); analogWrite (Pin2, LOW); digitalWrite (Pin13, HIGH); } Vacío PararMotor (int Pin1, Pin2 int) {digitalWrite (Pin1, LOW); digitalWrite (pin2, LOW); digitalWrite (Pin13, LOW); } ModificarVelocidad void (int NIVEL) {VELOCIDAD = vel; } ModificarVelocidad2 void (int NIVEL) {speed2 = vel; } Giro_izquierda Void (int Pin1, Pin2 int) {digitalWrite (pin2, LOW); digitalWrite (Pin1, speed2); digitalWrite (Pin13, HIGH); } Giro_derecha Void (int Pin1, Pin2 int) {digitalWrite (Pin2, speed2); digitalWrite (Pin1, LOW); digitalWrite (Pin13, HIGH); } Vacío encenderLuz (int pin) {digitalWrite (pin, HIGH); } Apagarluz void (int pin) {digitalWrite (pin, LOW); } EncenderComponente void (int pin) {digitalWrite (pin, HIGH); } ApagarComponente void (int pin) {digitalWrite (pin, LOW); } Vacío EncenderPin (int pin) {digitalWrite (pin, HIGH); } ApagarPin void (int pin) {digitalWrite (pin, LOW); }





















































































































































































































































































































































































Step 4: VIDEO

https://www.youtube.com/channel/UC6Et0vzMwvpTctm_xw5RkKg/videos
Arduino Contest

Participated in the
Arduino Contest