Go Down

Topic: Ultrasonic Gap length sensor project  (Read 205 times) previous topic - next topic

joeyko10642

Hi guys, I'm currently interested in a project that detects the width between 2 objects with a ultrasonic sensor such as the HC-SR04. There said, I'm fairly new to Arduino programming. Detecting the distance seems to be fairly easy, but I'm wondering if its possible to detect the distance between 2 objects in front of the sensor?


giovanniguerra

You mean the objects side by side or one behind another or...?

aarg

You mean the objects side by side or one behind another or...?

In either case, the answer is no.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

Procyan

if you mean something like this

   o    o
     
      V

and you can measure the angle (~) making the V you can use trig.  Measure the distance to the target and call it the hypotenuse.  The separation would then be 2X h(sin ~)

i think
Burt Munro:

"It is not the critic who counts, not the man who points out how the strong man stumbled, or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena..."

OldSteve

#4
Mar 17, 2016, 08:09 am Last Edit: Mar 17, 2016, 08:10 am by OldSteve
if you mean something like this

   o    o
      
      V

and you can measure the angle (~) making the V you can use trig.  Measure the distance to the target and call it the hypotenuse.  The separation would then be 2X h(sin ~)

i think
A HC-SR04 has a wide beam and isn't particularly directional, so there'd be no way to accurately measure the angle to a target.

As aarg said, the answer to joeyko10642's question is "no".
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

joeyko10642

A HC-SR04 has a wide beam and isn't particularly directional, so there'd be no way to accurately measure the angle to a target.

As aarg said, the answer to joeyko10642's question is "no".
If that's the case, is there possibly any sensors out there that can do the job?

OldSteve

If that's the case, is there possibly any sensors out there that can do the job?
No single sensor that I can think of. It might be possible using IR or laser, but that would depend on a number of factors such as distance, whether it's possible to put a detector behind the objects, whether the IR/laser syatem or the objects could be moved to sweep a beam past them, etc. (Similar to a gap sensor.)

Maybe someone else has some other ideas.
It would be easiest if an ultrasonic sensor could be mounted on one of the objects.

What's the exact setup, and what are the objects?
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

joeyko10642

No single sensor that I can think of. It might be possible using IR or laser, but that would depend on a number of factors such as distance, whether it's possible to put a detector behind the objects, whether the IR/laser syatem or the objects could be moved to sweep a beam past them, etc. (Similar to a gap sensor.)

Maybe someone else has some other ideas.
It would be easiest if an ultrasonic sensor could be mounted on one of the objects.

What's the exact setup, and what are the objects?
To be exact, I'd like to make this to measure the width between 2 objects to see if the object itself with the sensor mounted to it can go through the gap. In a wider picture, you can think of it as a car backup sensor to see if the car can move in between 2 other cars. 

OldSteve

#8
Mar 18, 2016, 08:36 am Last Edit: Mar 18, 2016, 09:22 am by OldSteve
To be exact, I'd like to make this to measure the width between 2 objects to see if the object itself with the sensor mounted to it can go through the gap. In a wider picture, you can think of it as a car backup sensor to see if the car can move in between 2 other cars.  
That's different to what I was mentally picturing.
My robot car does a similar thing. I mounted an ultrasonic sensor on a servo that swings it side to side, taking measurements in 5 positions. I mounted the servo upside-down, with the ping sensor glued to the body, so I could get it nice and low.
Perhaps you could do similar - mount the servo/ping sensor assembly so that it extends out the front, taking measurements to each side.

My robot car's 'head':-


Edit: For this to work, you need to get the ping sensor right between the two objects, so that it has to swing 90 degrees to each side to measure the distance. Manoevring it into position dead centre right between the two objects might be fun.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

joeyko10642

That's different to what I was mentally picturing.
My robot car does a similar thing. I mounted an ultrasonic sensor on a servo that swings it side to side, taking measurements in 5 positions. I mounted the servo upside-down, with the ping sensor glued to the body, so I could get it nice and low.
Perhaps you could do similar - mount the servo/ping sensor assembly so that it extends out the front, taking measurements to each side.

My robot car's 'head':-


Edit: For this to work, you need to get the ping sensor right between the two objects, so that it has to swing 90 degrees to each side to measure the distance. Manoevring it into position dead centre right between the two objects might be fun.
Will give this a thought. Your information definitely gave me some insight of the direction I should head for. Cheers bro.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy