Connect & Test Activity Board Arlo Ping))) Sensors

This connection diagram (below) shows where to connect each 3-wire Ping))) sensor cable.  If you’re looking at the color version, note that each black wire is connected to either GND on the breadboard, or the GND terminal in the servo header.  Each of those black wires should also be connected to a Ping))) sensor’s GND pin.  The power selection jumper between the P13 and P14 servo ports should also be set to 5V, likewise for the one between P15 and P16.  

WARNING: Wiring errors can damage the Ping))) sensors and/or your Propeller.  Do not turn power back on until you have double-checked all the connections in this section’s checklist below. 

  • Turn all power off before building the circuit.
  • Double check to make sure the power jumper between the P13 and P14 and the one between P15 and P16 servo ports are both set to 5 V.
  • Make sure that each 3-wire cable’s black wire is connected to a Ping))) sensor’s GND connection (and red to 5 V and white to SIG). 
  • On the Activity Board’s breadboard, make sure that each 3-wire cable’s black wire is connected to GND, each red wire is connected to V+.
  • Verify that each servo port is connected to its corresponding Ping))) sensor: P14 to Front, P15 to back, P16 to left, and P17 to right.

The SimpleIDE Terminal display after connecting the Ping))) sensors and running the example program will resemble this.  If all the Ping))) sensors are connected correctly, the display should show the centimeter distances of obstacles placed in front of each one (within its 3 cm to 3 m range, and typically +/- 1 cm).  Note that right now, the right Ping))) sensor does not see an obstacle, either because it’s beyond the 3 m limit, or the obstacle might be at an angle that’s reflecting the ultrasonic energy away from (instead of back to) the sensor.  If you put your hand about 10 cm in front of the right sensor, that value should change to about 10.  Make sure that each sensor correctly reports distances when you do that.

  • Set power like this: MAIN (on), MOTORS (off), Activity Board (position-2)
  • Load "Test Ping Array.side" into the Propeller with SimpleIDE’s "Run with Terminal" button.
  • Use the SimpleIDE Terminal and an obstacle (like your hand) 10 cm from each sensor to verify that each Ping))) sensor correctly reports centimeter distances of obstacles you place in front of them.  
  • For any Ping))) that doesn’t respond correctly, check the wiring connections.
  Arlo - Test Ping Array.c

#include "simpletools.h"
#include "ping.h"

int n = 0, pingPin, cmDist;
int pins[4] = {14, 16, 17, 15};

int main()
    if(n == 0)
      print("%c", HOME);
      print("Ping))) Distances\n");
    pingPin = pins[n];
    cmDist = ping_cm(pingPin);
      case 14: print("Front: "); break;
      case 16: print("Left:  "); break;
      case 17: print("Right: "); break;
      case 15: print("Back:  "); break;
    print("%03d cm\n", cmDist);
    if(n >= 4) n =0;