Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • cyber:bot Roaming with the Ping)))

cyber:bot Roaming with the Ping)))

Build the Ping))) Bracket and Circuit

The Build

  • Build and test your cyber:bot, following all tutorials up to Navigation with the cyber:bot
  • Attach the Ping))) sensor and Mounting Bracket Kit to your cyber:bot, following the directions that come with the kit.
    • The Ping))) Sensor plugs into servo header pin 16 on the cyber:bot board.
    • Mounting bracket standard servo plugs into servo header 17 on the cyber:bot board.
  • Center the Ping))) Mounting bracket on the servo horn.
  • Attach the Ping))) Mounting Bracket to the servo horn.
  • Move it back and forth and verify that the approximately 180 degrees of movement occurs evenly in front of the robot (the servo has mechanical limits)
  • Reposition it as necessary before tightening the black screw.
  • Next, you’ll need to check the servo wires to make sure they are free of binding.

It’s a good idea to add a “strain relief” with a zip tie or small wire to each end of the cable. One could secure the Ping)))’s cable to the header block and another may be used to keep the cable pointed upward so it doesn’t interfere with components on the breadboard. Make sure the cable doesn’t rub against anything when the servo moves.  

 

How the Ping))) Ultrasonic Sensor Works

The Ping))) Ultrasonic Distance Sensor lets your cyber:bot detect obstacles by measuring the distance to them.

Much like a bat, the Ping))) sensor emits an ultrasonic chirp, then listens for the chirp’s echo. The time between these two events is used to calculate the distance to an object. While most objects will return an echo, be aware that size, material, and angle all make a difference, as shown in the image below.  

The Ping))) sensor measures the echo return time in terms of microseconds. Then, it uses the fact that sound travels at 0.03448 cm/µs at room temperature. That’s 3.448 hundredths of a centimeter per millionth of a second at a temperature of (22.2 ºC). Just as a car travels distance = speed x time, so does sound, with an equation of s = ct, where s is the distance, c is the speed of sound and t is the time.

Did you know that the speed of sound in air actually changes with air temperature?  This Learn reference article explains more about why this happens. Temperature extremes can actually make a slight, but notable, difference in Ping))) sensor measurements.

 


Printer-friendly version
Sub-system Ping))) and Servo Testing
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress