Pages: [1] 2   Go Down
Author Topic: Two Ping sensors on one Arduino  (Read 2808 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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.
« Last Edit: March 07, 2011, 03:06:33 am by robtillaart » Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Per Arduino ad Astra

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 ...

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!!!
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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, ? ...
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

New Hampshire
Offline Offline
God Member
*****
Karma: 17
Posts: 781
There are 10 kinds of people, those who know binary, and those who don't.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Norway
Offline Offline
Sr. Member
****
Karma: 4
Posts: 423
microscopic quantum convulsions of space-time
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 smiley-razz) He got it to more than 20 feet range!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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 (99.05 KB, 329x461 - viewed 20 times.)
Logged

Pages: [1] 2   Go Up
Jump to: