Controlling the Outside World - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Controlling the Outside World

Description:

The Parallax standard servo motor has built in feedback. Range of motion is limited ... To move the servo horn we send a pulse train. 0v. 5v. voltage. Time (in ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 15
Provided by: rein150
Category:

less

Transcript and Presenter's Notes

Title: Controlling the Outside World


1
Controlling the Outside World
  • Servo Motor

2
Servo motor
  • A feedback controlled motor
  • The Parallax standard servo motor has built in
    feedback
  • Range of motion is limited
  • For those of you that have used the Parallax
    BoeBot kits, youre used to continuous servos
  • This is not a continuous servo!
  • That is, it will not go 360º
  • It will hit stops at either direction around

3
The servo motor
4
Wiring the servo motor
  • You can wire up the servo on the proto board as
    shown in the schematic
  • but, theres an easier way

5
Wiring the servo motor
6
Wiring the servo motor
  • The X4 and X5 connectors are designed to control
    the servo motors
  • But, the power source must be set via the jumper
    connector

7
Power
  • Check your power source!
  • If you still have one of my DC power blocks, it
    may be 9V or it may be 6V
  • Set the Vdd/Vin jumper as specified
  • Vdd if using a 9V source (or 9V battery)
  • Vin if using a 6V source
  • Power switch must be in position 2 to send power
    to the X4/X5 (servo) connectors

8
How it works
  • To light up an LED we send a continuous, level
    signal (DC voltage)

5v
HIGH pin
voltage
0v
time
9
Controlling the servo
  • To move the servo horn we send a pulse train

1.5ms
1.5ms
5v
voltage
20ms
0v
Time (in milli-seconds)
10
Controlling the servo
  • The pulse width will control the location of the
    servo
  • The time between pulses should be 20
    milli-seconds

11
From PBASIC
  • PULSOUT command
  • PULSOUT pin, duration
  • pin is the pin number to which your servo is
    wired (12, 13, 14, or 15 if you are using the
    servo ports on the RevC board)
  • duration is the pulse width

12
PULSOUT command details
  • The duration parameter is in units of 2µS (2
    micro-seconds)
  • The servo prefers values in units of
    milli-seconds
  • The time between pulses is under software control
    (PAUSE command units of milli-seconds)

13
Activity in class
  • Test the servo
  • Test all 4 servo ports
  • Find the values of the duration parameter (in the
    PULSOUT command) that cause the servo to hit the
    stops in both the clockwise and counter-clockwise
    directions

14
Homework
  • Write a program that continually moves the servo
    from one stop to the other
  • That is, it goes from full counter-clockwise to
    full clockwise and back again, continuously
  • Add two buttons to the board (B1 and B2)
  • B1 is the emergency stop (EStop)
  • When it is pressed all servo motion stops
  • B2 is the reset button
  • When it is pressed the servo motion begins again
Write a Comment
User Comments (0)
About PowerShow.com