Review and Practice

Self-check

  • In this activity, you:
    • Measured a servo signal’s period.
    • Calculated its frequency.
    • Verified that pulse width (how long the brief on-times last) is what contains the information the servo needs to respond to by correctly positioning its horn.
    • Predicted a pulse width at a certain angle and wrote a script to:
    • Set the servo to that angle
    • Test to verify that your predicted pulse width is correct
  • Were you able to measure a servo’s signal period and calculate the frequency?
  • Do you understand how the pulse width controls the servo horn position?
  • Were you able to write a script to control the servo angle and verify the measurements on the oscilloscope?

 

Questions

  1. Who might use an oscilloscope for servo measurements?
  2. What do you call the time that the signal stays high?
  3. Is the pulse width for a 45° angle narrower or wider than the pulse width of a 180° angle?
  4. What term is used to describe the space between two adjacent rising edges?
  5. What will the time difference be between the first and second signal period for a 90° angle?
     


Exercises

  1. What is the function of write_analog(value) in regards to the servo?
  2. What determines the angle of the servo horn?
  3. How do you determine the frequency of a signal?
  4. What is the duty cycle for a 15° angle?
     


Project

Predict the pulse width for 15°. Calculate the duty cycle for positioning the servo horn at 15° then write the script to verify your prediction that moves back and forth 0° and 15°.