Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Stepper Motor Speed and Direction Control Using Arduino and Bluetooth HC-06 Module through an Android App

By EG Projects July 22, 2020

​This is a simple tutorial on how to control speed and direction of stepper motor using arduino uno and bluetooth module hc-06 through an android phone app. The motor which i am using is Uni directional stepper motor. Their are two types of stepper motors unidirectional and bidirectional. Uni directional has four phases and bidirectional has 6 phases. Phases must be controlled properly other wise desired output can not be obtained. Before going further i assume that you are aware of the steeper motor phases and know how to control them effectively in order to get the maximum output.

Arduino stepper motor Bluetooth control project – Working principle

The user pairs its android phone with the hc-06 bluetooth module. After paring user can start the motor, can move the shaft in either direction clock or anti clock wise, can change the speed of motor rotation, can stop the motor with the commands that are embedded in side the code. The commands can be changed according to the user need. We will come to the code portion later in the tutorial.

Arduino stepper motor control circuit

Circuit diagram of the project is given below. The stepper motor which i am using works on 12 v DC. Stepper motor coils consumes about 80 mA to 250 mA, so we an not drive the steeper motor directly from arduino pins. We need some driver for this purpose and ULN2003 a darling-ton array ic is a good fit-in.  ULN2003 is capable of sourcing 500 mA of current at 50 v, it can easily source 25 0mA current at 12 v.
​
Stepper coils are controlled through arduino digital pins 2,3,4 and 5. The pins are directly connected to inputs of uln2003. The corresponding outputs of the uln2003 is supplying power to motor coils. Arduino is powered through external 12v adopter and uln2003 is powered through the same adopter. Hc06 is powered through the 3.3v supply output of arduino.
Note: The ground of the arduino must be grounded with ULN2003 ground. Both the ic’s must be at same potential to become  functional. If not grounded properly the circuit floats and the output is unpredictable.

Stepper Motor Speed and Direction Control Using Arduino and Bluetooth HC-06 Module through an Android AppPicture

Stepper Motor Speed and Direction Control Using Arduino and Bluetooth HC-06 Module through an Android App

Level shifters requirement

Arduino talks with hc06 bluetooth module on serial communication protocol. The baud rate for serial communication can be changed. I am working on default baud rate which is 9600 bps. Bluetooth module hc06 works on 3.3 v and can be powered from the 3.3 v source output of arduino uno. Since the hc06 bluetooth works on 3.3 v it outputs the data in the form of TTL signal rated at 3.3 v. Where as arduino uno operates on 5 v and its pins output data in the form of TTL signal rated at 5 volt. To balance the TTL level voltage. Voltage level sifters are inserted between the pins. Arduino TX is transmitting a 5 v signal which is shifted to 3.3 v by just a simple voltage divider circuit. The hc06 TX is transmitting a 3.3 v signal which is level shifted to 5 v.

Commands to run and control stepper motor from Bluetooth

Sending following commands from android app after it is paired with the hc06 Bluetooth module will make arduino to perform functions on stepper motor.

s or S = Starts and stops the stepper motor. First s starts motor and the coming next stops it.
f or F  = Rotates stepper motor in clockwise direction.
b or B = Rotates stepper motor in anticlockwise direction.

Speed rotation for stepper motor embedded in the code

0 = —————————————————– Rotation Speed=1000;
1 = —————————————————– Rotation Speed=900;
2 = —————————————————– Rotation Speed=800;
3 = —————————————————– Rotation Speed=700;
4 = —————————————————– Rotation Speed=500;
5 = —————————————————– Rotation Speed=400;
6 = —————————————————– Rotation Speed=300;
7 = —————————————————– Rotation Speed=200;
8 = —————————————————– Rotation Speed=100;
9 = —————————————————– Rotation Speed=50; 
Android app which i used can be found HERE. Its great and works efficiently on all the baud rates. I checked the pairing and working of motor on all baud rates and all works fine.
​

The function Move_Backward() rotates the motor in anticlockwise direction. The function StartMotor() rotates the motor in clockwise direction. User can change the commands according to his need. User can also insert the new rotation speeds.
More embedded microcontroller projects involving stepper motors in them are present in tutorials section. Each project contains free source code and circuit diagram of the project. In each project stepper motor speed and direction is controlled using microcontrollers. Visit the tutorials below. 

Stepper motor control over WiFi with nodemcu

Stepper motor with 32 bit stm32f103 microcontroller

Stepper motor controlled with 8051(89c51, 89c52) microcontrollers

Download the project code written in arduino ide 1.6. Code is free and opensource. Please give us your feed back on the project.

Watch the Project Video Here..

Arduino Project Files Code

You may also like:


  • What are different types of industrial robots?

  • What types of motors are used in electric vehicles?

  • What is Wireless Electric Vehicle Charging System (WEVCS)?

  • What is the role of embedded software in electric vehicles?

  • What are the components of robotic arms and industrial robots?

  • What drone parts you need to build a quadcopter?

Filed Under: Arduino Projects, Electronic Projects, Microcontroller Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

RSS Electro-Tech-Online.com Discussions

  • Why can't I breadboard this oscillator?
  • Failure of polypropylene motor-run capacitors
  • a point I can't understand about the sinc expression
  • Quick advice on remote car starter?
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection
  • Convection-cooled power controller integrates EtherCat connectivity

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe