|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to connect Parallax Ping))) sensor
I have a Ping))) sensor what i gather from reading on the fourm the best way to use this sensor with cRIO is to take two I/O and connect it to the SIG pin on sensor. I was wondering if a diode and/or resistor(s) is needed?
|
|
#2
|
|||||
|
|||||
|
Re: How to connect Parallax Ping))) sensor
Der,
From a quick look at the description page, it appears that one pin on the module is a trigger and the other is the output from the sensor. You will need to write code to initiate a pulse and measure the time it takes for a return echo on the output pin. You then have to perform a calculation to determine distance based on the acoustic transit time at whatever altitude and humidity the sensor is being used in. To interface, you would use a digital output to trigger the output pulse and a digital input to listen for the echo. The description says it is TTL compatible. |
|
#3
|
||||
|
||||
|
Re: How to connect Parallax Ping))) sensor
Actually the Ping Sensor from Parallax has the Trigger and Echo lines on the same pin. To use this with the Sidecar, wire 2 PWM cables to form a Y and connect to 2 Sidecar Digital Input/Output pins. If you are using Labview (not sure with WindRiver), there is a WPI Library for these specific ultrasonic sensors.
|
|
#4
|
|||
|
|||
|
Re: How to connect Parallax Ping))) sensor
I got the ultrasonic sensor hooked up as a Y to two Digital Input/Ouput slots, but I am still having trouble getting a live reading from the ultrasonic sensor. Every time I begin the code, I get a single value that does not change (I'm using Labview). I searched on the National Instruments website and found an example, but it is using DAQmx VIs. Is this the right code? If so, how do I get the required VIs (i.e. "DAQmx Create Channel.vi", "DAQmx Read.vi", "DAQmx Timing.vi", etc) If not, could you point me in the right direction?
|
|
#5
|
|||
|
|||
|
Re: How to connect Parallax Ping))) sensor
Your problem may also relate to the way the digital sidecar is hooked up internally. My team's read of the Ultrasound class/VI in WPILib indicates it is written for a "raw" ultrasound sensor, where you send a sound pulse, then count for the echo time. The Ping))) sensor, however, operates on a single line. You send a trigger or "ask" pulse, then wait for a return pulse, and count the duration of the return pulse to get a distance measurement. These are different algorithms.
Electrically, even if you make the Y cable, there are still pull up resistors on the DSC, which you can't change. In order to make a Ping))) work, we've found you need to build some extra buffer circuitry, consisting primarily of a PNP transistor and a NOT gate. That will allow the line to the Ping))) to float instead of being pulled up to 5V by the DSC's internal resistors. Basically, you use the PNP transistor to pull the line up for the "ask" pulse, then use a NOT gate to detect the return pulse, and time its duration using your code. Not all that simple to do. If you would consider an alternative, Maxbotix makes an analog ultrasound sensor that is a bit easier to use with FRC hardware. Last edited by jee7s : 12-02-2011 at 00:04. Reason: Clarification |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|