1 / 21

Lecture 1: Your Boe-Bot's Servo Motors

Lecture 1: Your Boe-Bot's Servo Motors. Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc. Presentation developed by: Martin A. Hebel Southern Illinois University Carbondale College of Applied Sciences and Arts Electronic Systems Technologies 7/6/04.

nola
Download Presentation

Lecture 1: Your Boe-Bot's Servo Motors

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 1: Your Boe-Bot's Servo Motors Presentation based on:"Robotics with the Boe-Bot" By Andy LindsayParallax, Inc Presentation developed by:Martin A. HebelSouthern Illinois University Carbondale College of Applied Sciences and Arts Electronic Systems Technologies 7/6/04

  2. Continuous Rotation Servo • Used to provide drive motion for the Bot. • Standard Servo: Used for positioning, such as with RC airplanes rudder and flaps. • Continuous Rotation Servo: Rotate in a certain direction and speed.

  3. Tracking Time • PAUSE is used to have the BASIC Stamp wait a short amount of time.PAUSE duration • Duration is in milliseconds (mS) or 1/1000th of a second, 1-65535PAUSE 1000

  4. Repeating Actions • A DO….LOOP is used to repeat a sequence of commands.DO 'Commands to performLOOP

  5. Servo Signals • Servos are controlled with a high pulse lasting a short time, and repeated. • The PULSOUT instruction can be used to send a short pulse.PULSOUT Pin, Duration • Pin: Pin device is connected to. • Duration: Time in 2S (microsecond) intervals, 1-65535. Microsecond = 1 millionth of a second.PULSOUT 12, 1PULSOUT 13, 2

  6. Servo Signals • Typical servos require a pulse of 1mS to 2mS to define the direction/position. • A 20mS pause be between each pulse. • Reducing this pause tends to drain battery faster, but doesn’t speed up the bot • If you forget it, you’ll notice the bot completing it’s movement command early! • What values of PULSOUT are in the valid range?

  7. Make sure you plug it in right (if you unplug)

  8. Centering the Servos The pulse width defines the direction and speed of the servo motor. • 1000 – Maximum speed one direction • 750 – Stopped • 500 – Maximum speed other direction • Use the servo center programs to ensure it is stopped at 750.

  9. Storing and Counting Values • Variable are used to store values • Variables much be declared prior to being used. Declaring a variable is giving it a name, and a size to hold.VariableName var Size

  10. DEBUG ? is short hand to display the value of a variable or pin.

  11. Counting and Controlling Repetitions • FOR…NEXT loops can be used to control the number of repetitions a segment of code takes.FOR StartValue TO EndValue {STEP StepValue}…NEXT

  12. What will this code do? Freq VAR Word DO FOR Freq = 1000 to 5000 Step 100 DEBUG ? Freq FREQOUT 4, 100, Freq TOGGLE 12 TOGGLE 13NEXT LOOP

  13. Testing Servos • To control the servo, send a series of pulses with values between 500 to 1000 (1-2mS) • Changing the value will change the direction and speed to some extent.

  14. FOR…NEXT to Control Servo Run Time • The FOR…NEXT Loop can be used to control how long to drive a servo.

  15. LAB 1 Overview • Spend some time calibrating your servos. • Find the pulsout width that freezes the motors (around 750) • Determine how to move the robot slowly • Clamp a pen on your bot, take it to the newsprint, and have it start drawing! • Robot Art Contest?

  16. Review

More Related