Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05

Components and supplies

Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
Arduino UNO
×1
Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
SG90 Micro-servo motor
×1
Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
HC-05 Bluetooth Module
×1
Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
Breadboard (generic)
×1
Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
Jumper wires (generic)
×1

Apps and online services

Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
Arduino IDE

About this project

In this project I am going to show you how you can control a servo motor with the help of a smartphone application via Bluetooth.

For this project we will be using a Bluetooth HC-05 module with an Arduino Uno to control a servo 9g.

--> How does this project works?

This project has two parts:

1. The android application - This application will be sending various data packets to our HC-05 Bluetooth module. (click here to download the application)

(p.s. This app is not developed by me.)

2. The hardware - This consists of HC-05 Bluetooth module, an Arduino Uno and a servo motor.

--> This is how it works --

The android app sends data packets to the Bluetooth module. The Bluetooth modules sends this data packet to Arduino Uno through Serial Communication. Arduino Uno is programmed to generate control signal for the servo motor depending upon the value of the data packet. Here is a flowchart for better understanding.

Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05

--> How to get Started

1. Download the android application. (click here)

2. Upload the code on the Arduino uno.

3. Make the connections.

Please note that the bluetooth HC-05 module needs to be connected with 3.3v and not with 5v vcc as it can damage the module.

4. Connect Bluetooth module to android app - When you power up your Hardware the Bluetooth module will become visible. So open the application and click on find nearby devices. Select HC-05. Once it shows connected you are good to go!

You can use the slider or enter the value manually to control the servo arm.

Code

  • Bluetooth controlled servo
Bluetooth controlled servoC/C++
this code id to uploaded on to the Arduino uno.
#include<SoftwareSerial.h>
#include<Servo.h>
Servo x;
int bttx=9;    //tx of bluetooth module is connected to pin 9 of arduino
int btrx=10;    //rx of bluetooth module is connected to pin 10 of arduino
SoftwareSerial bluetooth(bttx,btrx);
void setup()
{
  x.attach(11);        // servo is connected to pin 11 of arduino
  Serial.begin(9600);
  bluetooth.begin(9600);
}
void loop()
{
  if(bluetooth.available()>0)    //if bluetooth module is transmitting data
  {
    int pos=bluetooth.read(); // store the data in pos variable
    Serial.println(pos);
    x.write(pos);             //move servo head to the given position
  }
}

Schematics

This is how the circuit has to be made.Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05

Manufacturing process

  1. Build a Bluetooth‑Controlled Raspberry Pi Robot with Audio Feedback
  2. Arduino Tic Tac Toe with MAX7219 LED Matrix and Cardboard Enclosure
  3. Build a Reliable Arduino Countdown Timer with SparkFun 7‑Segment Display
  4. Voice-Activated Home Appliances: Bluetooth Control with Google Assistant
  5. Build a Bluetooth‑Controlled Arduino Car: A Complete DIY Guide
  6. Smartphone‑Controlled Bluetooth Mouse: Build Your Own Virtual Joystick
  7. Control Multiple Servos via Bluetooth: Arduino & Android App
  8. Bluetooth‑Controlled Car: DIY Arduino Remote Vehicle
  9. Build an Arduino Color Sorter: Simple Guide with TCS3200 & Servos
  10. Build an Arduino Radar System with Ultrasonic Sensor & Servo – Step‑by‑Step Guide