Ping)) Ultrasonic sensor

is there any way to hook up the ping ultrasonic sensor to the vex with easy c?

Yes, and it seems to work with great consistency. I don’t have the Vex Ultrasonic Sensor to do side-by-side test, so I don’t know if the PING))) is being used to it fullest potential, or not.
There has to be some difference, between the Two different sensors, because the Vex Ultrasonic Sensor seems to be sensitive in that the Ultrasonic Sensor Input must be attached to a Vex Controller Output, and the Ultrasonic Sensor Output must be attached to a Vex Controller Interrupt. With the PING))), I just hook them up.

To connect the PING))), I made a Y-Cable, with One Female plug, and Two Male plugs. I am testing with EasyC 2.x, and the “ULTRASONICTEST.ECP” program in the Test Code directory.
Connect up the PING))) to the Output and Interrupt. It does not matter which cable goes to which port, BUT IT WILL MATTER if you plug the cable in wrong to the PING))) sensor. Double Check that you have Ground connecting to Ground. I don’t know if the PING))) can be damaged by connecting it wrong, and I don’t want to find out.

The function “GetUltrasonic” is described in the EasyC 2.x Help as:
“The Ultrasonic Sensor function block allows the user to define behavior based on analog signals from the sensor. The Ultrasonic Sensor uses high-frequency sound waves to detect objects. It emits a sound wave and measures how long it takes the sound wave to bounce back. The measurement is translated into a numeric value from 2 - 100. The closer the detected object the lower the signal value. If the sensor does not detect an object, it will read a high value, around 100.”

With a High Reflectance Object, and the PING))) the Vex Controller reports with the “GetUltrasonic” function:

(Tested from a Counter Edge, PING))) is 38 Inches from the floor)
08-10 at 01 Inch distance.
24-26 at 12 Inches distance.
40-42 at 24 Inches distance.
58-60 at 36 Inches distance.
75-77 at 48 Inches distance.
93-95 at 60 Inches distance.
99 is the Max Value.

(Tested from a Linoleum Floor, PING))) is 4.25 Inches from the floor)
08-10 at 01 Inch distance.
24-26 at 12 Inches distance.
40-42 at 24 Inches distance.
58-60 at 36 Inches distance.
75-77 at 48 Inches distance.
93-95 at 60 Inches distance.
99 is the Max Value.

So the effective range of the PING))) with the EasyC 2.x Ultrasonic Functions appears to be 0 to 5 Feet, plus a little bit.

There is no noticeable difference in the Ultrasonic Return in free air verses a hard, Linoleum Floor. Carpet might make a difference, I will have to test that later.

PING))) Front
PING))) Left Side
PING))) Back
PING))) Back Close

Testing the PING))) Top View
Testing the PING))) Target
Testing the PING))) Rear View Far
Testing the PING))) Rear View Close

Do you need the vex y cable or can i make my own??

You will need to make your own. The Vex y-Cables are for Motors/Servos, so they have the opposite type of connectors, (e.g. One Male, Two Female).

I had lots of Bumper and Limit Switches, so I disassembled 4 Bumper Switches and cut the cables off (to leave some insulation on the switches to know where to reconnect the wires in the future).
Then I took two cable and soldered the Black to the Black, the Red to the Red and the White to the White.
Then I soldered each of the colors to a Female Headers trimmed down to 3 connectors (see Break Away Female Headers for an example).
I did this twice, so I could plug in two PING)))s simultaneously.

Make sure that the Colors are in the same order as the Male Plugs, and that the Black Wires are plugged into the end of the PING))) marked GROUND.