Distance Sensor HC-SR04: Incorrect measurement
-
I experimented with several HC-SR04 using a very simple scetch with Arduino 1.8.5, reading the measurements on the serial monitor. For a static setup I fastened the HC-SR04 in a vice and had it point against a white wall, inside a dust free room. No matter which distance between the wall and the sensor adjusted, the readings kept on being more or less constant BUT all of a sudden for a few readings the values decreased to almost zero and then continued with the expected measurement.
Does anybody have an explaination for this phenomena?
Thanks for your assistance in advance. -
I experimented with several HC-SR04 using a very simple scetch with Arduino 1.8.5, reading the measurements on the serial monitor. For a static setup I fastened the HC-SR04 in a vice and had it point against a white wall, inside a dust free room. No matter which distance between the wall and the sensor adjusted, the readings kept on being more or less constant BUT all of a sudden for a few readings the values decreased to almost zero and then continued with the expected measurement.
Does anybody have an explaination for this phenomena?
Thanks for your assistance in advance.@sunnyboy69 Getting false readings can be anything as it depends if it is a serial read from the device or simple timing of the echo, unstable voltage, or even an object caught in the path of quite a wide cone, but without further details it is impossible to identify. I've been caught before with a serial reading device, took a while before I realised....
An extension of what @bjacobse suggested is to repeat readings until you get two identical consecutive results which are <> known limits and not cuckoo results..
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login