Datasheet
Chapter 1: Detect Distance with the Ping))) Ultrasonic Detector · Page 3
Ping))) Sensor Circuit
Figure 3 shows a schematic and wiring diagram you can use to test the Ping))) sensor.
√ Build the circuit.
Figure 3 - Ping))) Sensor Schematic and Wiring Diagram
Testing the Ping))) Sensor
As mentioned earlier, the Ping))) sensor needs a start pulse from the BASIC Stamp to
start its measurement. A pulse to P15 that lasts 10 µs (
PULSOUT 15, 5) is easily
detected by the Ping))) sensor, and it only takes a small amount of time for the BASIC
Stamp to send. A
PULSIN command that stores the duration of the Ping))) sensor's echo
pulse has to come immediately after the
PULSOUT command. The result the PULSIN
command stores is the round trip time for the Ping))) sensor's chirp to get to the object,
reflect and return.
Example Program - PingTest.bs2
You can test this next program by measuring the distances of a few close-up objects. For
close up measurements, the Ping))) sensor only needs to be roughly Boe-Bot height
above your working surface (8 to 10 cm). However, if you are measuring objects that are
more than a half a meter away, make sure to keep your Ping))) sensor about half a meter
or more above the floor.
√ Place your Board of Education with the Ping))) sensor circuit on something to keep it
at least 8 cm above the table surface.