Introduction
In this article, we are going to make a Bluetooth-controlled servo motor project using the HC05 Bluetooth module and Arduino UNO.
For controlling the position of the servo motor remotely using Bluetooth we use the MIT app inventor to make a wireless remote. In our app, we can set the position of the shaft of the servo using a slider and also with three buttons (0, 90, and 180).
Just make the proper connections and then upload the given code. You can read more articles on IoT and basic electronics published by us. For your convenience, we are also sharing screenshots of the work.
Description
- Do you know how the HC 05 module works with Arduino, if not then go through with our article on it?
- Search for the MIT app inventor and login into it.
- Then make your own GUI and virtual connections using different widgets in Arduino servo motor project.
- You can see that there are many options like buttons, sliders, etc.
- When you successfully develop the design then generate the QR code.
- Download the MIT inventor android application and scan the QR code.
- Turn on the Bluetooth of your mobile phone so that it can connect with the Arduino.
- Then you can give commands i.e. set the position of the servo motor from 0 to 180 using your mobile phone.
Servo Motor project Components
- Arduino UNO
- HC 05 Bluetooth module
- Servo motor
- Jumper wires and a breadboard
- USB cable for uploading the code
Circuit Diagram of Servo motor project
Bluetooth Controlled Arduino Servo project Connection
Arduino UNO | Servo Motor |
GPIO 14 | D0 Pin |
+5 Volt | VCC |
GND | GND |
Arduino UNO | HC-05 Bluetooth |
11 Pin | RX Pin |
10 Pin | TX Pin |
( +5V ) VCC | VCC |
GND ( Ground ) | GND ( Ground ) |
- Take a servo motor and connect its positive power supply wire with the 5 volts pin of the Arduino and the negative supply wire with the GND pin of the Arduino.
- Connect the signal wire of the servo motor with the digital-9 pin of the Arduino.
- Then take the Bluetooth module (HC 05) and join its VCC pin with the 5 volts pin of the Arduino and GND pin with the GND pin of the Arduino.
- Attach the Tx pin of the Bluetooth module with the digital-10 pin of the Arduino.
- Connect the Rx pin of the Bluetooth module with the digital-11 pin of the Arduino.
- You can use a breadboard for making common connections.
- We have also made a home automation project using Bluetooth and Arduino.
- Now upload the code and test your circuit.
Bluetooth control Arduino servo motor code
NOTE: Please upload this code to the Arduino IDE but first you need to install <SoftwareSerial.h> library to the IDE software. Check here how to add a zip library to the Arduino IDE.