logologo
Contact

HOMEABOUTSERVICESBLOGSBOOKSSHOPCONTACT

+977 9803661701support@nepatronix.orgLokanthali, Bhaktapur

© 2025 NepaTronix all rigths reserved

Bluetooth Control Car( Robotic Project)

  Back To Blogs

This proposal outlines the development of a Bluetooth-controlled car using an Arduino microcontroller. This car will be controllable remotely using a smartphone or tablet, offering a fun and educational introduction to robotics and electronics.

Project : 5


1. Introduction

This proposal outlines the development of a Bluetooth-controlled car using an Arduino microcontroller. This car will be controllable remotely using a smartphone or tablet, offering a fun and educational introduction to robotics and electronics.


2. Objectives

  • Design and build a car chassis using readily available materials.
  • Select and integrate an Arduino board and Bluetooth module for wireless communication.
  • Develop and implement control software on the Arduino for movement (forward, backward, turn left, turn right, stop).
  • Design a user interface for the smartphone/tablet app to control the car's movement. (This proposal focuses on the Arduino and car build, excluding the app development).

3.  Materials

  • Arduino Uno (or compatible board)
  • HC-05 Bluetooth Module
  • L298N Motor Driver Module
  • DC Motors (2x)
  • Battery Pack (e.g., Li-ion)
  • Breadboard and Jumper Wires
  • Wheels and Chassis (pre-built or DIY)
  • Additional components (e.g., caster wheel, mounting hardware)

4. Hardware Design

  • The car chassis will be constructed using materials like acrylic, wood, or Lego.
  • The Arduino board will be mounted securely on the chassis.
  • The L298N motor driver module will be connected to the Arduino to control the DC motors responsible for movement.
  • The HC-05 Bluetooth module will be interfaced with the Arduino for wireless communication with the smartphone/tablet app.
  • A battery pack will provide power to the entire system.

5. Software Development

  • Arduino IDE will be used to program the Arduino board.
  • The code will receive commands from the Bluetooth module and translate them into motor control signals for forward, backward, left, right, and stop functionalities.

7. Expansion and Future Work

  • The car can be enhanced by incorporating additional features like:
    • Sensors (e.g., ultrasonic sensor) for obstacle detection and line following.
    • LEDs for light effects or status indicators.
    • A smartphone app for a more intuitive user interface.
  • The project can be adapted to explore different locomotion mechanisms (e.g., tank treads, omnidirectional wheels)

Circuit Diagram:



  • Code:

    //This program is used to control a robot using a app that communicates with Arduino through a bluetooth module.

     

    #define in1 5 //L298n Motor Driver pins.

    #define in2 6

    #define in3 10

    #define in4 11

    #define LED 13

    int command; //Int to store app command state.

    int Speed = 204; // 0 - 255.

    int Speedsec;

    int buttonState = 0;

    int lastButtonState = 0;

    int Turnradius = 0; //Set the radius of a turn, 0 - 255 Note:the robot will malfunction if this is higher than int Speed.

    int brakeTime = 45;

    int brkonoff = 1; //1 for the electronic braking system, 0 for normal.

    void setup() {

      pinMode(in1, OUTPUT);

      pinMode(in2, OUTPUT);

      pinMode(in3, OUTPUT);

      pinMode(in4, OUTPUT);

      pinMode(LED, OUTPUT); //Set the LED pin.

      Serial.begin(9600);  //Set the baud rate to your Bluetooth module.

    }

     

    void loop() {

      if (Serial.available() > 0) {

        command = Serial.read();

        Stop(); //Initialize with motors stoped.

        switch (command) {

          case 'F':

            forward();

            break;

          case 'B':

            back();

            break;

          case 'L':

            left();

            break;

          case 'R':

            right();

            break;

          case 'G':

            forwardleft();

            break;

          case 'I':

            forwardright();

            break;

          case 'H':

            backleft();

            break;

          case 'J':

            backright();

            break;

          case '0':

            Speed = 100;

            break;

          case '1':

            Speed = 140;

            break;

          case '2':

            Speed = 153;

            break;

          case '3':

            Speed = 165;

            break;

          case '4':

            Speed = 178;

            break;

          case '5':

            Speed = 191;

            break;

          case '6':

            Speed = 204;

            break;

          case '7':

            Speed = 216;

            break;

          case '8':

            Speed = 229;

            break;

          case '9':

            Speed = 242;

            break;

          case 'q':

            Speed = 255;

            break;

        }

        Speedsec = Turnradius;

        if (brkonoff == 1) {

          brakeOn();

        } else {

          brakeOff();

        }

      }

    }

     

    void forward() {

      analogWrite(in1, Speed);

      analogWrite(in3, Speed);

    }

     

    void back() {

      analogWrite(in2, Speed);

      analogWrite(in4, Speed);

    }

     

    void left() {

      analogWrite(in3, Speed);

      analogWrite(in2, Speed);

    }

     

    void right() {

      analogWrite(in4, Speed);

      analogWrite(in1, Speed);

    }

    void forwardleft() {

      analogWrite(in1, Speedsec);

      analogWrite(in3, Speed);

    }

    void forwardright() {

      analogWrite(in1, Speed);

      analogWrite(in3, Speedsec);

    }

    void backright() {

      analogWrite(in2, Speed);

      analogWrite(in4, Speedsec);

    }

    void backleft() {

      analogWrite(in2, Speedsec);

      analogWrite(in4, Speed);

    }

     

    void Stop() {

      analogWrite(in1, 0);

      analogWrite(in2, 0);

      analogWrite(in3, 0);

      analogWrite(in4, 0);

    }

     

    void brakeOn() {

      //Here's the future use: an electronic braking system!

      // read the pushbutton input pin:

      buttonState = command;

      // compare the buttonState to its previous state

      if (buttonState != lastButtonState) {

        // if the state has changed, increment the counter

        if (buttonState == 'S') {

          if (lastButtonState != buttonState) {

            digitalWrite(in1, HIGH);

            digitalWrite(in2, HIGH);

            digitalWrite(in3, HIGH);

            digitalWrite(in4, HIGH);

            delay(brakeTime);

            Stop();

          }

        }

        // save the current state as the last state,

        //for next time through the loop

        lastButtonState = buttonState;

      }

    }

    void brakeOff() {

     

    }





Total likes : 4

Comments







Read More Blogs!

20 Arduino Projects For Beginners

Arduino UNO provides a versatile and accessible platform for building a wide range of innovative projects, whether you're a beginner just starting out or an experienced developer exploring complex applications. From simple LED blinking projects to advanced home automation systems and robotic creations, the possibilities are endless. Through hands-on experimentation and coding, Arduino UNO enables users to understand key concepts such as sensor interfacing, motor control, and automation. As seen in the diverse projects mentioned, the Arduino UNO serves as a gateway to mastering electronics, automation, and IoT development. By engaging in these projects, enthusiasts not only develop technical skills but also unlock creativity, allowing them to build real-world solutions for everyday challenges. With the foundation laid by these projects, the door is open for further exploration, customization, and innovation in the fascinating world of electronics and robotics.


4.4k010

loRa(LOng Range)Alert System(IoT Projects Arduino)

The IoT Projects Arduino LoRa (Long Range) Alert System is a wireless communication system designed to facilitate long-distance, low-power data transmission. In this project, two LoRa modules are employed in distinct locations, with one module acting as a transmitter and the other as a receiver. The system is engineered to send alerts or messages across large distances with minimal power consumption, making it ideal for remote monitoring and alerting applications. This IoT Projects Arduino documentation provides a comprehensive overview of the system's use, importance, operational principles, components, pin configurations, libraries used, working mechanism, main loop, notification function, and testing procedures.


3.0k07

20 ESP Project For beginner

The world of IoT (Internet of Things) is rapidly expanding, and the NodeMCU (ESP8266/ESP32) microcontroller has become a favorite tool for building smart, connected devices. In this blog, we explore 20 exciting and innovative projects using NodeMCU, ranging from home automation to smart security systems. Each project offers hands-on experience, allowing enthusiasts, hobbyists, and developers to dive into the realm of IoT and create practical, real-world applications. These NodeMCU projects demonstrate how everyday tasks can be automated and controlled remotely, whether it's monitoring air quality, controlling lighting, securing your home, or managing energy consumption. With detailed explanations and step-by-step guidance, this blog serves as a comprehensive resource for those eager to learn, experiment, and build projects that connect the physical world with the digital realm. Whether you're a beginner or an experienced maker, these projects will inspire you to unlock the potential of IoT with NodeMCU and explore the endless possibilities of smart technology.


4.8k07

Run Motor Fan from Solar(STEAM Education)

To understand the practical application of solar energy by demonstrating its conversion into electrical energy to power a Motor Fan.


1.7k03