Overview

Today in this article we are going to discuss How to make a Bluetooth Controlled car using Arduino so without wasting any time let’s make it

Components Used

  • Android phone
  • Bluetooth module,
  • Robot
  • Arduino

Block Diagram

Arduino

Description

The Uno R3 CH340G ATmega328p Development Board is the low-cost version of the popular Uno R3 Arduino. It is assembled with the CH340 USB to Serial converter chip, instead of using an Atmega16U2 chip.

We have used plenty of these low-cost Arduino boards with CH340 chips, and have found them to work perfectly. The only time the CH340 chip is used is during programming and when using the serial output of the USB port. During regular operation, this board is identical to the more expensive version without the CH340 chip.

Arduino Specifications:

  • Microcontroller ATMEGA 328P
  • Operating Voltage 5V
  • Input Voltage (recommended) 7-12V
  • Input Voltage (limit) 6-20V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • PWM Digital I/O Pins 6 
  • Analog Input Pins 6
  • DC Current per I/O Pin 20 mA
  • DC Current for 3.3V Pin 50 mA
  • Flash Memory 32 KB
  • SRAM  2KB
  • EEPROM 1 KB
  • Clock Speed 16 MHz

About Bluetooth module HC-05:

HC-05 is a Bluetooth module which is designed for wireless communication. It uses serial communication to communicate with devices. HC-05 has a red LED which indicates connection status, whether the Bluetooth is connected or not. Before connecting to the HC-05 module this red LED blinks continuously in a periodic manner. When it gets connected to any other Bluetooth device, its blinking slows down to two seconds.

It is used for many applications like wireless headsets, game controllers, wireless mice, wireless keyboards and many more consumer applications. To communicate smartphone with the HC-05 Bluetooth module, the smartphone requires a Bluetooth terminal application for transmitting and receiving data.

L298N Based Motor Driver Module – 2A

Description

This L298N Based Motor Driver Module is a high power motor driver perfect for driving DC Motors and Stepper Motors. It uses the popular L298 motor driver IC and has the onboard 5V regulator which it can supply to an external circuit. It can control up to 4 DC motors, or 2 DC motors with directional and speed control This motor driver is perfect for robotics and mechatronics projects and perfect for controlling motors from microcontrollers, switches, relays, etc. Perfect for driving DC and Stepper motors for micro mouse, line-following robots, robot arms, etc.

Pins:

  1. Out1: Motor A lead out
  2. Out2: Motor A lead out
  3. Out3: Motor B leads out
  4. Out4: Mo (Can actually be from 5v-35v, just marked as 12v)
  5. GND: Ground
  6. 5v: 5v input (unnecessary if your power source is 7v-35v, if the power source is 7v-35v then it can act as a 5v out)
  7. EnA: Enables PWM signal for Motor A (Please see the “Arduino Sketch Considerations” section)
  8. In1: Enable Motor A
  9. In2: Enable Motor A
  10. In3: Enable Motor B
  11. In4: Enable Motor B
  12. EnB: Enables PWM signal for Motor B (Please see the “Arduino Sketch Considerations” section)

Specifications

Download the Bluetooth RC controller app

Download the Bluetooth RC controller app from the mobile play store

/// Bluetooth controlled robot   

char Incoming_value = 0;                //Variable for storing Incoming_value
void setup() 
{
    Serial.begin(9600);         //Sets the data rate in bits per second (baud) for serial data transmission
    pinMode(13, OUTPUT);  
    pinMode(12, OUTPUT);
    pinMode(11, OUTPUT);
    pinMode(10, OUTPUT);//Sets digital pin 13 as output pin
}
void loop()
{
    if(Serial.available() > 0)  
    {
        Incoming_value = Serial.read();      //Read the incoming data and store it into variable Incoming_value
        Serial.print(Incoming_value);        //Print Value of Incoming_value in Serial monitor
        Serial.print("\n");
        if(Incoming_value == '1')  
        {
            digitalWrite(13, HIGH);
            digitalWrite(12, LOW);
            digitalWrite(11, HIGH);
            digitalWrite(10, LOW);
            Serial.print("forward");  
        }
        if(Incoming_value == '2')    
        {  
            digitalWrite(13, LOW);
            digitalWrite(12,HIGH);
            digitalWrite(11, LOW);
            digitalWrite(10, HIGH);
            Serial.print("backward");  
        }                            
        if(Incoming_value == '3')    
        {  
            digitalWrite(13, HIGH);
            digitalWrite(12,LOW);
            digitalWrite(11, LOW);
            digitalWrite(10, LOW);
        }                            
        if(Incoming_value == '4')    
        {  
            digitalWrite(13, LOW);
            digitalWrite(12,LOW);
            digitalWrite(11, HIGH);
            digitalWrite(10, LOW);
        }         
        if(Incoming_value == '5')    
        {  
            digitalWrite(13, LOW);
            digitalWrite(12,LOW);
            digitalWrite(11, LOW);
            digitalWrite(10, LOW);
        }                            
    }   
}

By Devilal

Leave a Reply

Your email address will not be published. Required fields are marked *