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

Wireless Servo motor control

By Venugopal M April 21, 2008

Wireless Servo motor control
 
Introduction:
 
In some applications we have stop the motor at an exact angle like 40, 72,164 degrees. For this type of applications dc motor is not suitable, because if once we apply the power supply to dc motor, after turning off the supply it continue to rotate some time because of momentum. It can’t be stop at an exact angle. So for such application we have to use servo motor. For example in a big liquid tank it is required to control liquid flow then it can be done with the help of motorized valve whose opening can be varied using servo motor.
 
The new thing in this project is, controlling exact angle of motorized valve using servo motor of big liquid tanks to control liquid flow. The servo motor is controlled wirelessly through RF remote.
 
 Description:
 
In this project valve opening levels are assumed as switches. Four switches represent four stages of valve opening to control the liquid flow. And to control servo motor angle microcontroller used. Servo motor angle is controlled by PWM signal. Arduino micro controller has PWM output pins. The arduino micro controller gets input from receiver decoder and controls the angle of servo motor by generating PWM
 
Required components and equipments:
 
Sr. no. Name of component Required quantity
 
1 RF Tx module(434Mhz) 1
2 RF Rx module(434Mhz) 1
3 HT12E   1
4 HT12D   1
5 LED 1
6 Resistor – 1KΩ (Quarter watt) 4
7 Resistor – 1MΩ (Quarter watt) 1
8 Resistor – 50KΩ (Quarter watt) 1
9 Arduino pro mini development board 1
10 Mini servo motor (8 gm) 1
11 Battery – 9V 2
12 Push button switches 3
13 Bread board 4
14 connecting wires
 
Circuit diagram:
 
Procedure:
 
Transmitter section:
 
Step1:  connect the four push buttons to the data input pins (10,11,12,13) of HT12E, with pull down resistors of 1 KΩ.
Step2: connect 1MΩ resistor between 15 and 16 pins of HT12E.
Step3: connect 17 pin to the 2nd pin of RF transmitter, and 14 pin connect to the ground.
Step4: 1-8 pins of HT12E are address pins, all are connected to ground. Pin 18 is connected to Vcc and pin 9 is connected to ground.
Step5: Connect RF Tx module’s pin 1 to the ground, pin 3 to the Vcc and pin 4 to the antenna.
Receiver section:
Step1: connect the decoder 10,11,12,13 pins to Arduino microcontroller digital pins 6,7,8,9 as inputs.
Step2:  Servo motor has three wires, 1) Vcc (Red), 2) Ground (Black or Brown) , 3) control (Orange or yellow). Connect Vcc to 5V, and Ground to GND, control wire to the any PWM pin of Arduino pro mini. 
Step2: Connect 50KΩ resistor between 15 and 16 pins of HT12D.
Step3: Connect pin 14 to the 2nd pin of RF Rx module, and connect pin 17 to the LED indicator (it will glow when signal is received) 
Step4: 1-8 pins of HT12D are address pins, all are connected to ground Connect pin 18 to Vcc and pin 9 to ground. 
Step5: Connect RF Rx module’s 1, 6, 7 pins to the ground, pins 4 & 5 to the Vcc and pin 8 to the antenna.
 
Now you are ready to run and test the circuit. Let us see how it works.
 
Working:
 
1. The HT12E encoder inputs are controlled by switches, this parallel data converted by encoder in to the serial data and fed to RF Tx module input pin 2 from the encoder 17th pin.
2. Transmitted data is ASK modulated signal means the data present in variations of the amplitude. The receiver within the range can receive the ASK signal and generates serial data same as at transmitter and fed to 14th pin of decoder (HT12D).
3. This serial data is converted in to parallel data by the decoder and the parallel data output is available at 10,11,12,13 pins of decoder. 
4. These pins are connected to Arduino digital pins as input. Arduino gets this digital input and based on received data it sets particular angle of servo motor by generating PWM
5. With each switch there is particular set angle. In demo angles assigned like:
                             Switch 1   —  0o .
                             Switch 2   —  45 o .
                             Switch 3   —  80 o .
                             Switch 4   —  160 o .
6. When switch 1 at transmitter side is pressed, the respective pin at receiver changes its state and servo motor rotates to 0 o.
7. When switch 2 at transmitter side is pressed, the respective pin at receiver changes its state and servo motor rotates to 45 o.
8. When switch 3 at transmitter side is pressed, the respective pin at receiver changes its state and servo motor rotates to 80 o.
9. When switch 4 at transmitter side is pressed, the respective pin at receiver changes its state and servo motor rotates to 160 o.
This complete working is due to the program embedded into arduino micro controller. Here is the complete program.
 
Pictures:
 
 
 
 
 
 
 
 
 
 
 
 
While running the circuit it is required to take following precautions
 
Precautions:
 
1. Address lines status (high/low) should be same at both transmitter and receiver.
2. At transmitter 14th pin of HT12E should be connect to ground or connect a switch between ground and the 14th pin to reset the encoder.
3. In the transmitter circuit the resistor connected between 15 and 16 pins of HT12E should be between 750MΩ to 1MΩ.  And at receiver side the resistor connected between 15 and 16 pins of HT12D should be between 30KΩ to 50KΩ.
4. Incase if you want to use any other battery, checkout the data sheet of HT12E/HT12D first.
5. When dealing with servo motors take care about source current , there should be sufficient current when servo is running. If enough current is not there use bug booster convertor.
 

Project Source Code

 

Project Source Code

###

#include <Servo.h> 
Servo myservo;
int pos = 0; 
//decoder 10,11,12,13 output pins connected to arduino 10,11,12,13 digital pins as input.
int tx1 = 10;
int tx2 = 11;
int tx3 = 12;
int tx4 = 13;
//decoder 10,11,12,13 output pins connected to arduino 6,7,8,9 digital pins as input.
int led1 = 6;
int led2 = 7;
int led3 = 8;
int led4 = 9;
 
void setup(){
  
  pinMode(tx1,INPUT);
  pinMode(tx2,INPUT);
  pinMode(tx3,INPUT);              // decoder output microcontroller reading as input.
  pinMode(tx4,INPUT);
  
  pinMode(led1,OUTPUT);
  pinMode(led2,OUTPUT);
  pinMode(led3,OUTPUT);           // led's as output.          
  pinMode(led4,OUTPUT);
  
  Serial.begin(9600);
  myservo.attach(9);
}
 
void loop(){
  
  // reading data and storing in avariable for further use.
  int Tx1 = digitalRead(tx1);
  int Tx2 = digitalRead(tx2);
  int Tx3 = digitalRead(tx3);
  int Tx4 = digitalRead(tx4); 
  
  if (Tx1 == HIGH){
     myservo.write(0);
   delay(1500);
    
  } else if (Tx2 == HIGH){
    
   myservo.write(45);
   delay(1500);
    
    
    
  } else if (Tx3 == HIGH){
     myservo.write(80);
   delay(1500);
    
    
  } else if (Tx4 == HIGH){
     myservo.write(160);
   delay(1500);
    
    
  }
}
//Program to 

###

 


Circuit Diagrams

RF14


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

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

  • BF999 Input and output impedance
  • Industrial Relay Board Design for Motorcycle Use
  • Sendust vs Ferrite for SMPS
  • On/Off Slide Switch Reassembly Help
  • sim7090g

RSS Electro-Tech-Online.com Discussions

  • I Wanna build a robot
  • Wierd makita battery
  • using a RTC in SF basic
  • Is AI making embedded software developers more productive?
  • ac current limiting

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz
  • Amphenol RF introduces SMPM to SMPM assemblies on RG-178 cable
  • Infineon launches 3D magnetic sensors with ±50 mT to ±160 mT measurement ranges

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