Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Wireless Servo motor control

By Venugopal M

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

 

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.

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!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)
  • An Embedded Developer’s Perspective on IOT (Internet of Things)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Need help to choose accelerometer
  • Pic 16f877A Hex file
  • 7 segment display connections
  • finding attenuation coefficient in CST
  • Effect of variable gain amplifier and LNA on the input RF signal's phase

RSS Electro-Tech-Online.com Discussions

  • How to designing a battery charging indicator circuit for 18650 battery pack
  • NOR gate oscillator in LTspice not working
  • ICM7555 IC duty cycle limit at high frequency?
  • I've DESTROYED 3 piezo buttons :((((
  • led doorbell switch
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering