DIY Project: Arduino controlled Bluetooth Car

by Apr 28, 2020arduino uno projects

Let’s make a wireless Arduino Controlled Bluetooth car.

Contents:

1. Introduction

Hey everyone, today we are going to make an Arduino controlled Bluetooth Car. We will use the mobile phone’s Bluetooth to control the car. We will use the normal geared DC motors and the chassis. Let’s start with collecting the hardware items.

2. Materials Required

  • Arduino board (Nano/Uno)
  • L298N motor driver
  • RC Car chassis
  • 4 Geared DC motors
  • HC-05 (Bluetooth module)
  • Jumper wires
  • LED
  • Power Source (>=7.4V-1000mAh)

3. Integrating the Chassis Kit

The chassis kit includes 4 wheels, 4 geared DC motors, the body, and the screws. These components come along the kit only. Firstly, fit all the DC motors and then fit the wheels properly. Don’t close the upper lid (if present) now, as you need to fit the whole electronics in it. After going through the subsequent sections and completing the car, you can fit the upper lid (if present) of your Bluetooth Car. Refer to the image below.

4. Arduino Code

In the code, we need to set 5 digital pins as output. After receiving the command from the mobile app, we will make some particular pins ‘HIGH’ to execute the command, say to move ahead. The car can perform mainly four functions, to move ahead, behind, left or right. This is how the final code will look like.

char t;
 
void setup() {
pinMode(13,OUTPUT);   //left motors forward
pinMode(12,OUTPUT);   //left motors reverse
pinMode(11,OUTPUT);   //right motors forward
pinMode(10,OUTPUT);   //right motors reverse
pinMode(9,OUTPUT);   //Led
Serial.begin(9600);
 
}
 
void loop() {
if(Serial.available()){
  t = Serial.read();
  Serial.println(t);
}
 
if(t == 'F'){            //move forward(all motors rotate in forward direction)
  digitalWrite(13,HIGH);
  digitalWrite(11,HIGH);
}
 
else if(t == 'B'){      //move reverse (all motors rotate in reverse direction)
  digitalWrite(12,HIGH);
  digitalWrite(10,HIGH);
}
 
else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
  digitalWrite(11,HIGH);
}
 
else if(t == 'R'){      //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
  digitalWrite(13,HIGH);
}

else if(t == 'W'){    //turn led on or off)
  digitalWrite(9,HIGH);
}
else if(t == 'w'){
  digitalWrite(9,LOW);
}
 
else if(t == 'S'){      //STOP (all motors stop)
  digitalWrite(13,LOW);
  digitalWrite(12,LOW);
  digitalWrite(11,LOW);
  digitalWrite(10,LOW);
}
delay(100);
}

5. Circuit and Explanation

Consider the circuit shown below.

Circuit

Now, take the controller in which you have uploaded the code given above. Then, first of all, connect the D10-D13 pins of your microcontroller to the 4 input pins of the motor driver as shown in the figure. The controller gives the commands to run the motors via these pins only. Connect the two motors of each side to the output pins of the driver as shown. Connect the power supplies carefully. The Vcc of the Bluetooth module is connected to that of the controller. You can either use a simple switch or can connect the battery at the end of the setup. Try to confine the electronics within the chassis.

Make sure that all the connections are tight enough. After fitting the components, close the upper Lid in case your chassis consists of it. I hope you can see your finished car by now.

6. Configuring the Mobile Application

By now, we have completed our car. But how the car will move? For that, we need to pass the signals from a mobile app. You can develop your own app or download the several Apps present in the play store. After downloading the app, open the Bluetooth of your device, and search the available devices. Connect it with your car’s Bluetooth and enter the passkey (probably 0000 or 1234). The blinking rate of the HC-05 module should change which shows that the device has been connected now. Now open the settings of your app. In that, make sure that the commands which pass when you press a button are compatible with the code. For example, the forward button of the app should pass ‘F’ as that only moves our car forward. Check the other buttons too.

7. Final run

I hope you were able to complete the project. Congratulations! Anytime you want to run the car, switch on the button, pair with the app, and enjoy it. If you faced any issues, feel free to write it in the comment section.

Creating a multiplication Skill in Alexa using python

Written By Anmol Punetha

Hey, I am Anmol. I am a tech blogger and an electronics engineering student at the same time. As you're reading my blog, you are getting a generous amount of information in simpler words. Hope it's of use. Thank you for visiting. Keep reading!

RELATED POSTS

DIY project: Using RGB LED with Blynk

DIY project: Using RGB LED with Blynk

We already have talked about using Blynk with Arduino. In this tutorial, we will make a DIY project using RGB LED with Blynk. We will also control the intensity of it using some special widgets in Blynk. Contents: RGB LED with Blynk IntroductionMaterials...

Using a Seven Segment Display with Arduino

Using a Seven Segment Display with Arduino

Let's learn how to configure a SSD (Seven segment display) with Arduino. You will also learn to make the counter using a single SSD. Contents: IntroductionMaterials RequiredCircuitArduino CodeCode Explanation 1. Introduction The Seven Segment Display has basically 10...

Using Stepper motors with Arduino

In this tutorial, you will learn to configure the stepper motors with the Arduino Uno. https://iot4beginners.com/arduino-uno-a-basic-introduction/ Contents: IntroductionMaterials requiredHardware ExplanationThe circuitArduino CodeA DIY Project's idea 1. Introduction...

How to use Ultrasonic Sensor with Arduino?

How to use Ultrasonic Sensor with Arduino?

Introduction Ultrasonic sensors work by emitting sound waves at a frequency too high for humans to hear. They then wait for the sound to be reflected back, calculating distance based on the time required.  Since ultrasonic waves can reflect off a glass or liquid...

How to use a Servo motor with Arduino?

How to use a Servo motor with Arduino?

Introduction A Servo Motor is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of...

Using IR sensor with Arduino Uno

Using IR sensor with Arduino Uno

Introduction An  IR (Infrared sensor)is an electronic device, that emits in order to sense some aspects of the surroundings. An IR sensor can measure the heat of an object as well as detects the motion. The emitter is simply an IR LED( Light Emitting Diode) and...

Blinking a LED using Arduino Uno

Blinking a LED using Arduino Uno

Blinking a LED is the most basic project in the Arduino. You basically make some easy connections, write the code and upload it in the Arduino. With that, you can control the blinking rate, the duration for which it was glowing and lot more. To know how to install the...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....