Ultrasonic Sensor

Hello,

I've been working on a project that uses an ultrasonic sensor to trigger a function if within a certain distance. I'm using the HC-SR04 sensor, and it works for the most part but the platform it senses is moving quickly with a motor. I've had trouble with it not detecting it in that range as it goes past it too fast, or gets slighty inaccurate readings that do not trigger it.

I was wondering if there was a more recommended sensor that was relatively inexpensive that would be both more exact and faster at detecting a range. Looked around and didn't find much in that area, so figured Id ask here

Thank you!

Ianuno:
Hello,

I've been working on a project that uses an ultrasonic sensor to trigger a function if within a certain distance. I'm using the HC-SR04 sensor, and it works for the most part but the platform it senses is moving quickly with a motor. I've had trouble with it not detecting it in that range as it goes past it too fast, or gets slighty inaccurate readings that do not trigger it.

I was wondering if there was a more recommended sensor that was relatively inexpensive that would be both more exact and faster at detecting a range. Looked around and didn't find much in that area, so figured Id ask here

Thank you!

You can ask and ask, but with no supplied information, you won't get much help.

What is your certain distance? What range are you looking for? How fast is the object moving? Is it moving exactly 90 degrees to the ultrasonic beam? If not, the motion of the object will be added or subtracted from the time for the return ultrasonic pulses.

Are you delaying anything in the non-posted code which would make time slots where the object would not be detected?

Why are you using ultrasonic instead of IR break-beam detection?

Paul