Two Ping sensors on one Arduino

Hi, Newbie here again.

I want to run two Ping sensors from one Arduino and have them both be reading pulses at the SAME time. They would both be the input to an LED whose intensity would be controlled by a person's proximity.

My reasoning for using two Ping sensors is that I would like to increase the pulse distance of the Ping sensor. Currently, I have found my Ping (with a cyperbolic reflector to already increase distance) reads only to 370 cm max. In general, mine reads only to 200 cm. I would like to double that distance.

Any ideas? Are two ping sensors possible? Is there an easier way to do this?

Your comments are SO appreciated.

That are a lot of questions:

The effectiveness of a ping sensor depends on the distance the sound has travelled. The longer the path the more energy it looses. Most signals loose energy squared with the distance => twice the distance means four times less signal. So doubling the distance means you have to focus the energy somehow. A reflector could be a good thing (you allready tried ), but maybe a tube will also focus the signal. But by focussing the signal the reflected signal will also be focussed more so It might "shoot" besides the sensor.

I would start with tubes metal / plastic whatever can be found and start experimenting. Hard materials reflect sound best, softer ones absorb the energy.

Easiest way is to search for a sensor that meets your needs, but price is allways an important parameter too :slight_smile:

Using 2 ping sensors in parallel as you propose [SAME TIME] will be not trivial as the Arduino itself can only do one thing at a time.

Some of the Devantech sonars allow you to listen only, but I think you need to work out a way of putting more power into the output burst.
Maybe look at powering with a MAX232 or something like that.
Suggest you try to get hold of an old Polaroid unit.

Thanks for the suggestions, Groove and robtillaart. I'll definitely look into tubes and into a MAX232.

I'm sure I'll have some follow-up questions, so I'll keep you posted.

putting more power into the output burst

Check the datasheet if the sensor has a (bit) larger range when supplying a higher voltage to it. Or better said, if you apply too little the power definitely will decrease so take care that you use the optimum voltage => in short consider a separate power supply. It will not double the distance but ...

Putting more power in may cause the transmitter to ring, making your transmitted pulse longer.

Does that imply increase in distance at the cost of decrease in accuracy?

If extreme range is the aim, probably not, but it may well impact on minimum range.

Check the datasheet if the sensor has a (bit) larger range when supplying a higher voltage to it.

I checked, and the optimum voltage is 5V. Considering I hook it up to the Arduino itself, I feel like this is def optimal. The datasheet also says the Ping runs from 2 cm to 3.3 m.

Why would my Ping sensor only work up to 5.5 ft? This is quite the mystery to me.

Why would my Ping sensor only work up to 5.5 ft? This is quite the mystery to me.

Do you have an URL of the datasheet?

There isn't a url of the datasheet, but under downloads and resources on this link, the datasheet is listed as a .pdf under Ping documentation v1.6:

http://www.parallax.com/tabid/768/ProductID/92/Default.aspx

Again, I incredibly appreciate you help!!!!

So the URL of the datasheet is : http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/28015-PING-v1.6.pdf
just hoovering over the link => right button => copy link location (firefox)

If time permits I will have a look at it, but very busy with my own stuff this week.

Could you tell more about the application, what you are trying getting done? What kind of objects do you want to detect? people, walls, rabbits, doors, ? ...

The range of a sonar based sensor is highly dependent on the nature of the target itself. Not only the shape and size of the target, but the composition of that target, since sound reflects differently off different materials. You're only going to see that advertised maximum range against an ideal target, and a soft, sound absorbing, human body (assuming with cloths on, which are even more sound absorbing), is nowhere near an ideal target. (an ideal target being a flat, hard surface that offers maximum sound reflection)

The datasheet itself shows the characteristics of two different targets, a cylinder and a 12x12 piece of cardboard, and neither one reaches the advertised 3m maximum range.

My reasoning for using two Ping sensors is that I would like to increase the pulse distance of the Ping sensor.

In that case take a look at AlphaZeta's really nice DIY range finder (Now that took some googling to find, just saying :P) He got it to more than 20 feet range!

@robtillaart: I'm detecting people. I'm an artist, and my work is about viewer accessibility. As the viewer walks up to the artwork, an LED at the center of the work corresponds in brightness to the distance that person is from the work--the closer the person walks, the brighter the light. The farther away, the dimmer the light gets. Ultimately, the closer the person gets and the more they try to view the artwork, the more impossible that task becomes. I need the sensor to function as far as possible to affect the greatest amount of viewers.

Attached is a crude mockup of the situation.

@jraskell: thank you! that seems very logical. i checked my serial monitor instead of relying on my other output (an LED), and the distance was 370 cm at the most, but mostly 250 cm. It's a bit farther than I thought, so that's useful in some sense!

@raron: WOW! What a great find! Now if only I can build such a magical device...

mockup.jpg

I've bene playing with a Parallax Ping module now for a while, and I've noticed that it excels at large, flat objects and has trouble over 5 feet with cloths, fabrics and irregularly shaped things (ie, People).

Having some understanding of how the arduino has to talk to the Ping sensor, does it absolutely HAVE to be identical pings at the same time? The Ping has to be triggered, send a burst out, wait for the return, and then send the timing back to the arduino...sooo (hypothesizing) if you were to stagger them by (standby - rapid datasheet math here) 25 milliseconds...you could theoretically have them operate on the same arduino. For the project that you are proposing, I don't see why this couldn't be accurate enough...

As I see it, if you write code poorly enough, you'll have more delays and slowdown in the coding execution, than you will inaccuracies by the two units being offset by 25 milliseconds...if you write your functions correctly, they can easily compensate for the staggered execution... i think...

is 25 milliseconds gonna kill ya?

thebigphish, that is an EXCELLENT suggestion!!!!!! i will try to write this code and see how it works.

Now if I can only get the LEDs to work.