Servos - PowerPoint PPT Presentation

About This Presentation
Title:

Servos

Description:

Title: Servos Author: Bruce Last modified by: bmw Document presentation format: On-screen Show (4:3) Other titles: Verdana MS P Arial Wingdings Bookman ... – PowerPoint PPT presentation

Number of Views:326
Avg rating:3.0/5.0
Slides: 16
Provided by: Bruc1209
Learn more at: https://www.cs.unca.edu
Category:
Tags: servos

less

Transcript and Presenter's Notes

Title: Servos


1
Servos
  • The material presented is taken from a variety of
    sources including http//www.seattlerobotics.org/
    guide/servos.html, http//www.baldor.com/pdf/manua
    ls/1205-394.pdf, and Parallax educational
    materials at http//learn.parallax.com/

2
Overview
  • Servo motors are used for angular positioning.
    They typically have a movement range of 180 deg
    but can go up to 210 deg.
  • The output shaft of a servo does not rotate
    freely. It seeks a particular angular position
    under electronic control.
  • Servos are typically rated by torque and speed. A
    servo rated 40 ounce-in/.21 means that at 1 inch
    from the hub, the servo can exert 40 ounces of
    force and move 60 deg in 0.21 sec.

3
What makes a Servo
  • Servo motors and are constructed out of basic DC
    motors, by adding
  • some gear reduction
  • a position sensor for the motor shaft
  • an electronic circuit that controls the motor's
    operation
  • The basic hobby servo has a 1801 gear ratio.
    The motor is typically small.
  • Typically, a potentiometer (variable resistor)
    measures the position of the output shaft at all
    times.
  • An informative link

4
Feed-back loop
  • open-loop

closed-loop
5
Control
  • An external controller (such as the Arduino)
    tells the servo where to move by encoding
    information in the duration or width of a high
    pulse, referred to as pulse width modulation,
    PWM).
  • PWM uses 1 to 2ms out of a 20ms time period to
    encode information.

6
PWM
  • A control wire communicates the angular movement.
    The angle is determined by the duration of the
    pulse on the control wire.
  • The servo expects a pulse every 20 millisec (.02
    seconds). The length of the pulse determines how
    far the motor turns.
  • For a 1.5 millisecond pulse, the motor turns to
    the 90 degree position (i.e., the neutral
    position).
  • If the pulse is shorter than 1.5 ms, the motor
    turns the shaft to closer to 0 degrees. If the
    pulse is longer than 1.5ms, the shaft turns
    closer to 180 degrees.

7
PWM
  • Each pulse is from 1300 to 1700 microsec (µs) in
    duration
  • The pulses repeat about 50 times each
    second---once every 20 millisec

8
PWM
  • The amount of power applied to the motor is
    proportional to the distance to be traveled.
  • If the shaft needs to turn a large distance, the
    motor runs at full speed.
  • If it needs to turn a small amount, the motor
    runs at a slower speed.

9
Modified Servos
  • Servo motors can also be retrofitted to provide
    continuous rotation
  • Remove mechanical limit (revert back to DC motor
    shaft).
  • Remove pot position sensor (no need to know
    position) and replace it with 2 equal-valued
    resistors with a combined resistance equivalent
    to that of the pot. Makes the servo think it
    is in the 90 deg position.

Not always necessary
10
Modified Servos
  • The idea is to make the servo think that the
    output shaft is always at the 90 degree mark.
  • This is done by removing the feedback sensor, and
    replacing it with an equivalent circuit that
    creates the same readings as the sensor at 90
    degrees.
  • Then, the control signal for 0 degrees causes the
    motor to turn full speed in one direction. The
    signal for 180 degrees causes the motor to turn
    full speed the other direction.
  • Since the feedback from the output shaft is
    disconnected, the servo continues in the
    specified direction as long as the signal
    remains.

11
Parallax Servos
  • The parallax servos are modified servos with an
    adjustable potentiometer.
  • The potentiometer (a.k.a., pot) should be
    adjusted to make the servo think that it is at
    the 90 degree mark.

12
Parallax Servo Connections
Servo Connector Black ground Red
power White signal
13
Connecting to the Arduino
14
Calibration Program
  • include ltServo.hgt
  • Servo myServo
  • void setup()
  • myServo.attach(9) myServo.writeMicroseconds(15
    00) // Stop
  • void loop()

15
Demonstration Program
  • include ltServo.hgt
  • Servo myServo // Create Servo object
  • void setup()
  • myServo.attach(9) // Servo is connected to
    digital pin 9
  • void loop()
  • myServo.writeMicroseconds(1700) // Counter
    clockwise
  • delay(2000)
    // Wait 2 seconds myServo.writeMicroseconds(1300)
    // Clockwise
  • delay(2000)
  • myServo.writeMicroseconds(1500) // Stop
  • delay(2000)
Write a Comment
User Comments (0)
About PowerShow.com