Distance Sensor moving objects (max speed object will pass sensor is 40km)

Hi

Iḿ having trouble making my HC-SR04 sensor detect moving objects. Basically, it works fine if the object is moving away or towards the ultrasound but It cant read objects passing in front of the sensors at speed. I.E. If the object is moving from A (transmitter) to B (Receiver) at speed it doesn't have time to detect it...am I doing something wrong or do I need to look at different types of sensors


B

A

thanks

Not enough information to even guess.

Post the code, using code tags.
What sort of objects?
What is the minimum distance from the moving object to the sensor?

newbie snoob so forgive my lack of detail

i downloaded a generic code that shows distance in cm when an object is placed in front of the sensor from about 2cm to 50cm ... it works fine ... however, if i make the object move at speed thru the sensors I get nothing ... the object is a ball about 15cm wide, i just wanted to know if it was possible to detect the distance of an object if it passes in front of the HC-SR04 sensor at speed. The min distance the ball will pass 15cm and the max is just over a metre ...

You'll need to do some maths for yourself: measure the time the sensor uses to detect a not-moving object. This is the minimum time the object has to keep in range of the sensor. Now you can calculate the maximum speed for an object with a given diameter.

i downloaded a generic code that shows distance in cm when an object is placed in front of the sensor from about 2cm to 50cm

But you can't figure out how to post it? See the "How to use this forum" post.

jremington:
But you can't figure out how to post it? See the "How to use this forum" post.

didn't post as its a very simple piece of code, even a snoop like me can figure it out so I didn't want to burden people like you with minor details ... but thanks for sarcasm ... my post was more about the sensors themselves, are they reliable enough to measure distance when an object is moving at speed.

are they reliable enough to measure distance when an object is moving at speed

In general, yes, if used correctly.