Servo motor angle rotation control by adjusting PWM ratio.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
ECT 357 Ch 16 Output Control. Today’s Quote: The measure of a man is not how great his faith is bt how great his love is. The measure of a man is not.
Done by : Mohammad Al-awad Fathe Hindi Supervisors : Dr. Raed Al-qadi Dr. Luai Malhis Graduation Project 2014.
Servos The material presented is taken from a variety of sources including:
Servos The material presented is taken from a variety of sources including:
Lecture Outline  DC motors  inefficiencies, operating voltage and current, stall voltage and current and torque  current and work of a motor  Gearing.
EET 2261 Unit 13 Controlling Stepper Motors and Servos  Read Almy, Chapter 21.  Lab #13 due next week.  Final Exam next week.
Components of a servomotor are: - a DC electric motor, - gears with an output shaft; - position-sensing mechanism; - control circuitry. Robotics and Automation.
L.
DC Motors DC Motors are widely used in robotics because of their small size and high energy output. Key characteristics of DC motors include: 1. High Speed.
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2006 Class 5 May
Digital I/O Connecting to the Outside World
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Pulse Width Modulation (PWM) LED Dimmer Circuit
Servo Motors # A servo is a motor that you can position at any angle very accurately. # Servos have a limited servo range; most servos have a range of.
1 Servo Motor. 2 Overview A servo motor is a motor that is only capable of rotating 180 degrees A servo motor is controlled by giving it an angle to proceed.
Applied Control Systems Robotics & Robotic Control
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Chapter 31 Faraday’s Law.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Controlling the Outside World
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi. Objectives 1. Control the rotation of standard servo motor  A standard servo motor is limited in its rotation.
By: Khalid Hawari Muath Nijim Thaer shaikh Ibrahim Supervisor: Dr. Jamal Kharousheh Dr. Nasser Hamad 27 December 2010.
Motors & Motor Drivers ECE 450.
Microprocessoren lesson 6. PWM /motor control/servo.
STEPPER MOTORS Name: Mr.R.Anandaraj Designation: Associate. Professor Department: Electrical and Electronics Engineering Subject code :EC 6252 Year: II.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
Servos The material presented is taken from a variety of sources including:
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
PIC18F4431. PIC18F1330 Infrared Encoder/Decoder.
PWM: Pulse Width Modulation © 2014 Project Lead The Way, Inc.Digital Electronics.
Arms, Legs, Wheels, Tracks, and What Really Drives Them Effectors and Actuators.
Components of a typical full-featured microcontroller.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
INTRODUCTION TO ROBOTICS Part 3: Propulsion System Robotics and Automation Copyright © Texas Education Agency, All rights reserved. 1.
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
Sitarambhai Naranjibhai Patel Institute Of Technology & R.C.
DC motor principles Speed control Direction Stepper motor principles
Stepper Motor – Types, Advantages And Applications
Wireless Bluetooth Controller For DC Motor. Introduction Wireless becoming more and more available and widely used Bluetooth is one of the major players.
Introduction to VEX® components
The “Board of Education” 1 Three-position switch 0 = OFF 1 = ON / wheels OFF 2 = ON / wheels ON breadboard (for building circuits) electrical power (V.
Introduction to Motors, servos and steppers
DC Motors DC Motors are widely used in robotics because of their small size and high energy output. Key characteristics of DC motors include: 1. High Speed.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
MICROCONTROLLER AND INTERFACING
Obstacle avoiding robot { pixel }
Servo Systems Servo is mechanism based on feedback control.
Group members MUHAMAAD DANISH 2015MC05 USMAN ALI JAT 2015MC14 MUREED SULTAN 2015MC18 AZAN ASHRAF 2015MC19 AYMEN.
Introduction to Servos
Servos The material presented is taken from a variety of sources including:
DC MOTOR SPEED CONTROL 1. Introduction
Control a motors angular position with a flex sensor
‘SONAR’ using Arduino & ultrasonic distance sensor
Electric Motors.
Servo Systems Servo is mechanism based on feedback control.
Servos The material presented is taken from a variety of sources including:
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Servos The material presented is taken from a variety of sources including:
ECE 354 Computer Systems Lab II
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Controlling YOUR ROBOT
EET 2261 Unit 12 Controlling Stepper Motors and Servos
Hitec HS 303: Robotic Servo Motor
UNIT 11: RC-SERVOMOTOR CONTROL
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Introduction to Motor Drives
Presentation transcript:

Servo motor angle rotation control by adjusting PWM ratio. SERVO MOTOR CONTROL Servo motor angle rotation control by adjusting PWM ratio.

Index What is a servo motor ? How do servo motors work ? Information about Hitec HS-311 Standard servo motor. Algorithm for two servo motors control. Schematic diagram and operation analysis of the circuit.

What is a servo motor ? A Servo is a small device that incorporates a three wire DC motor, a gear train, a potentiometer,an integrated circuit, and an output shaft bearing (Shown in Figure). Of the three wires that stick out from the motor casing, one is for power, one is for ground, and one is a control input line. The shaft of the servo can be positioned to specific angular positions by sending a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. If the coded signal changes, then the angular position of the shaft changes. Servos come in different sizes but use similar control schemes and are extremely useful in robotics. The motors are small and are extremely powerful for their size. It also draws power proportional to the mechanical load. A lightly loaded servo, therefore, doesn’t consume much energy. A very common use of servos is in Radio Controlled models like cars, airplanes, robots, and puppets. They are also used in powerful heavy-duty sail boats. Servos are rated for Speed and Torque. Normally there are two servos of the same kind, one geared towards speed (sacrificing torque), and the other towards torque (sacrificing speed).

Servos are constructed from three basic pieces; a motor, a potentiometer (variable resister) that is connected to the output shaft, and a control board. The potentiometer allows the control circuitry to monitor the current angle of the servo motor. The motor, through a series of gears, turns the output shaft and the potentiometer simultaneously. The potentiometer is fed into the servo control circuit and when the control circuit detects that the position is correct, it stops the motor. If the control circuit detects that the angle is not correct, it will turn the motor the correct direction until the angle is correct. Normally a servo is used to control an angular motion of between 0 and 180 degrees. It is not mechanically capable (unless modified) of turning any farther due to the mechanical stop build on to the main output gear. The amount of power applied to the motor is proportional to the distance it needs to travel. So, if the shaft needs to turn a large distance, the motor will run at full speed. If it needs to turn only a small amount, the motor will run at a slower speed. This is called proportional control.

How do servo motors work ? Servos are controlled by sending them a pulse of variable width. The control wire is used to send this pulse. The parameters for this pulse are that it has a minimum pulse, a maximum pulse, and a repetition rate. Given the rotation constraints of the servo, neutral is defined to be the position where the servo has exactly the same amount of potential rotation in the clockwise direction as it does in the counter clockwise direction. It is important to note that different servos will have different constraints on their rotation but they all have a neutral position, and that position is always around 1.5 milliseconds (ms). The angle is determined by the duration of a pulse that is applied to the control wire. This is called Pulse width Modulation. The servo expects to see a pulse every 20 ms. The length of the pulse will determine how far the motor turns. For example, a 1.5 ms pulse will make the motor turn to the 90 degree position (neutral position). When these servos are commanded to move they will move to the position and hold that position. If an external force pushes against the servo while the servo is holding a position, the servo will resist from moving out of that position. The maximum amount of force the servo can exert is the torque rating of the servo. Servos will not hold their position forever though; the position pulse must be repeated to instruct the servo to stay in position.

Hitec HS-311 Standard Detailed SpecificationsControl System: +Pulse Width Control 1500usec Neutral Required Pulse: 3-5 Volt Peak to Peak Square Wave Operating Voltage: 4.8-6.0 Volts Operating Temperature Range: -20 to +60 Degree C Operating Speed (4.8V): 0.19sec/60 degrees at no load Operating Speed (6.0V): 0.15sec/60 degrees at no load Stall Torque (4.8V): 42 oz/in (3.0 kg/cm) Stall Torque (6.0V): 48.60 oz/in (4.5 kg/cm) Current Drain (4.8V): 7.4mA/idle and 160mA no load operating Current Drain (6.0V): 7.7mA/idle and 180mA no load operating Dead Band Width: 5usec Operating Angle: 40 Deg. one side pulse traveling 400usec Direction: Clockwise/Pulse Traveling 1500 to 1900usec Motor Type: Cored Metal Brush Potentiometer Drive: 4 Slider/Direct Drive Bearing Type: Top/Resin Bushing Gear Type: Nylon 360 Modifiable: Yes Connector Wire Length: 11.81" (300mm) Dimensions: 1.57" x 0.79"x 1.44" (40 x 20 x 36.5mm) Weight: 1.52oz (43g)

When a pulse is sent to a HS-311 that is less than about 0 When a pulse is sent to a HS-311 that is less than about 0.6 ms the servo does not rotates to any position and holds its output shaft at zero degree. If the pulse is wider than 0.6 ms the servo rotates. For example, if pulse width is equal to 1,5 ms HS-311 will rotate 90 degrees and for pulse width is equal or greater than 2 ms, HS-311 will make rotation of 180 degrees. The minimal width and the maximum width of pulse that will command the servo to turn to a valid position are functions of each servo. Different brands, and even different servos of the same brand, will have different maximum and minimums. Generally the minimum pulse will be about 1 ms wide and the maximum pulse will be 2 ms wide.

Algorithm

When the program is executed, data starts to read from serial port When the program is executed, data starts to read from serial port. The program algorithm consists of two loops, and after first data read from serial bus first loop of the program looks for characters star (*) and slash (/) for detection of data for which PWM module belongs to. In the second lop of the program, data write an appropirate PWM module Data come from serial port is firstly checked for star character. If data is star character coded in binary, the following data will be written to PWM1 module of PIC 16F877, then program will turn to start for another read operation. If this time first character of data come from USART is not a star ASC II character, then program checks data for first character could be a slash ASC II character. If the character is slash then following binary data will be send ro PWM2 module as a PWM data information, after that program will turn start again. If data come from serial port is neither a star character nor a slash character, then program turns to start for a new read operation, and follow path of first loop until one of these two criteria is satisfied. There is no need draw anything about algorithm of Visual Basic part of the circuit. If we need to point something about it ; for simultaneous two servo motor operation, first set PWM value of motor 2 then set PWM for motor 1 and hold the button pressed for required operation time. As long as mouse button is pressed motors hold given positions in PWM signals.

Schematic Diagram

PWM Period = [(PR2) + 1] • 4 • TOSC •(TMR2 Prescale Value) PWM Mode of PIC16F877 In Pulse Width Modulation mode, the CCPx pin of PIC16F877 produces up to a 10-bit resolution PWM output. Since the CCP1 pin is multiplexed with the PORTC data latch, the TRISC<2> bit must be cleared to make the CCP1 pin an output. The following steps should be taken when configuring the CCP module for PWM operation: 1. Set the PWM period by writing to the PR2 register. 2. Set the PWM duty cycle by writing to the CCPR1L register and CCP1CON<5:4> bits. 3. Make the CCP1 pin an output by clearing the TRISC<2> bit. 4. Set the TMR2 prescale value and enable Timer2 by writing to T2CON. 5. Configure the CCP1 module for PWM operation. The PWM period is specified by writing to the PR2 register. The PWM period can be calculated using the following formula: PWM Period = [(PR2) + 1] • 4 • TOSC •(TMR2 Prescale Value)

Operation of Circuit The main purpose of this circuit is observing and understanding the operation principles of servo motors in electronic circuits. Thus, we only required a PWM generator with two undepended outputs. Therefore we used PIC 16F877 microcontroller just for its PWM modules and also for its other advantageous properties like as its price, easy programmability etc. Beside PIC 16F877, we use MAX 232 for PC communication. We only connect receiver pin of PIC 16F877 to MAX 232 since we don’t require transmitting any data to PC. We made standart (prerequired) connections of both MAX 232 and PIC16F877. Since servo motors have three input pins two for supply and one for control signal, we do not use any buffer or driver for IC for drive them by PIC 16F877. Although, each servo motor draws about 0,5A from power supply, their control signal input require low power PWM signal. As we mention about, we apply continuous PWM signal as long as mouse button is pressed. This cause overheat on motors. So, when mouse button is unpressed servo motor rotate to zero degree simultaneously. After the motors reach zero degree, PWM signal will be still available at inputs of motors for four seconds. Then PWM signal will be stopped by Visual Basic controlled program part. However servos work rightfully as long as PWM signal is applied, so, after this point servos couldn’t save their high torque ability.

Sources www.servocity.com www.microchip.com www.hitec.com **/ And special thanks to Abdül Balıçı and other dear friends for their helps.