For fast transaction call 0916.457.0748

Mobile Controlled 2WD Double Deck Smart Robot Car using L298N Controller and Bluetooth Module

Introduction

      This tutorial shows how to control a Smart Car using an android device via Bluetooth communication. The capabilty to control your smart car wirelessly has great advantage, no longer you need to worry where your car is going, since it is under your control. Then also the remote control is in your phone, which is verry accessible  and not time consuming. Enjoy and create your own Controlled 2w smart car.

Hardware Required

Step 1:

  1.  Assemble 2WD Smart Robot Car Chassis/2WD Round Double-Deck . Before assembling make sure you soldered the terminal of the motors with a wire, because soon it will be connected to the L298N outputs.

2. Connect the Motors to the L298N Motor Driver board

  • Connect the wires from one of the motors to the OUT1 and OUT2 Motor Control pins of the L298N Motor Driver Module
  • Connect the wires from one of the motors to the OUT3 and OUT4 Motor Control pins of the L298N Motor Driver Module.


3. Prepare the connections of the power and control pins
  • Power Pins
    • Connect Male-Male Power wire(Red wire) to the +12V Power Pin of the L298N Motor Driver Module.
    • Connect Male-Male Ground wire(Black wire) to the Ground Pin of theL298N Motor Driver Module.
  • Control Pins
    •  Leave the ENA and ENB jumpers on the L298N Motor Driver Module.
    • Connect the Female end of a Female-Male wire(Control 1) to the IN1 pin of the L298N Motor Driver Module.
    • Connect the Female end of a Female-Male wire(Control 2) to the IN2 pin of theL298N Motor Driver Module.
    • Connect the Female end of a Female-Male wire(Control 3) to the IN3 pin of theL298N Motor Driver Module.
    • Connect the Female end of a Female-Male wire(Control 4) to the IN4 pin of the L298N Motor Driver Module.

4. Connect HC-06/05 Pins to Arduino board.

  •  Connect VCC or 5V of the Bluetooth module to 5V output of the arduino board.
  • Connect GND to  GND of the bluetooth module and arduino board.
  • Connect TX or Transmitter of the bluetooth module to  Pin 0 (Rx) of the arduino board.
  • Connect RX or Receiver of the bluetooth module to  Pin 1 (Tx) of the arduino board.

5. Connect  L298N Power Pins and Control Pins to Arduino Board.

  •  Connect the other end of the Ground wire(Black wire) to the Ground Pin of the Arduino board.
  • Connect the other end of the Power wire(Red wire) to the 5V Power Pin of the Arduino board.
  • Connect the other end of the Control 1 wire to the Digital 5 Pin of the Arduino board.
  • Connect the other end of the Control 2 wire to the Digital 6 Pin of the Arduino board.
  • Connect the other end of the Control 3 wire to the Digital 9 Pin of the Arduino board.
  • Connect the other end of the Control 4 wire to the Digital 10 Pin of the Arduino board.

Step 2:

Upload Code to Arduino Board

Note: Before uploading the code, remove Rx Tx connections from your arduino board. 

Short Explanation
        The code simply process data received from the Android application, once a direction message received, the Car will act or turn according to the message.
        For Car Speed control, analog output was used, so that the speed of the car will vary according to the number sent from the Android App.

Step 3:

Power up your arduino board using Power Bank (I used 5 V 2 Amp Power Bank, but you can change supply voltage of your arduino board depending on its minimum and maximum voltage.)

Step 4:

1. Download Car Controller application from play Store. Click here (Connected Devices)

2. Pair and Add HC-05/06 Bluetooth module  to your mobile application  by going to the setting of your bluetooth. (Note: Default password of HC-05/06 is either 1234 and 0000.).

3. Open the Android application you've downloaded earlier, go to drawer menu and click controlled car and click Test Device (Make sure your bluetooth is on), then click paired devices and you will see the list of devices paired to your mobile. Then click the HC-05 or HC-06 device you'd paired earlier. 

4. From the controller Press "A" to Accelarate and "D" to Decelarate. For the direction, use the Joystick pad.

Enjoy Controlling you Smart Car


1 comment

  • Dev

    Good

Leave a comment

Please note, comments must be approved before they are published

Payment Methods

Facebook Rewards Program