HS-sr04 maximum read speed?

Hi everyone. I have decided to get back into my robot project. It has a HS-SR04 ultrasonic rangefinder on it. I remember that when I 1st started writing code for this that there was a maximum speed that could the sensor could be used at. Otherwise it could pick up on echos and not work well.

I cannot remember what the minimum delay time is for this sensor to work well?

Thanks, David.

See page 7 of the User Manual for waveforms.

https://docs.google.com/document/d/1Y-yZnNhMYy7rwhAgyL_pfa39RsB-x2qR4vP8saG73rE/edit

If you add up all the times using 38ms for no obstacle you get between 40 and 50 mS which translates to 20 to 25 PINGs/second. I would divide that by 2 and call it 10 pings/S.

raschemmel:
See page 7 of the User Manual for waveforms.

HC-SR04 User's_Manual - Google Docs

If you add up all the times using 38ms for no obstacle you get between 40 and 50 mS which translates
to 20 to 25 PINGs/second. I would divide that by 2 and call it 10 pings/S.

I don’t think that’s what he asked. He wants to know fast he can get valid data from the sensor. It appears to be 50 times/second which works out to 20ms between polls. More info can be found here: Using the ultrasound sensor when moving

You mean this one ?

Since the ultrasonic sensor is digital and offers its data via the I²C protocol, this is where the main latency comes from. On the other hand, you shouldn’t poll (i.e. read out) your sensor too frequently, if that is what you’re worried about. In several tests we’ve concluded with hundred NXT kits, that a polling rate of 50 Hz (50 times per second, delay of 20ms between each poll) does work perfectly with no problems at all. When you’re using NXT-G, you shouldn’t worry at all: You won’t get values faster anyway. When you’re working with other languages, and you feel your ultrasonic sensor doesn’t work so well in a tight loop with constant polling, try to insert this little 20ms break!