Go Down

Topic: Placing HC-SR04 inverted (upside down) (Read 164 times) previous topic - next topic


For an Obstacle Detection application on a RPi 3B+, I've placed the HC-SR04 on a pair of eye glasses and as I move forward wearig this glasses when walking, it detects obstacle like walls up to 13 feet away. My associates have coded the Pi in such a way that different audio tones are generated for 13~10 feet, 10~4 feet and < 4 feet, so a Visually Impaired person can know the distance to the obstacle.
If I point my head downwards and move towards an object 2 feet high, say a chair, it detects this obstacle only when it is 4 feet away. Kindly note that I'm 5'8", so the glasses is about 5'6" above the ground.
Due to wiring constrains, I now have to place the HC-SR04 inverted (upside down). Now as I walk forward, it detects obstacle like walls up to 13 feet away but when I approach the a 2 feet high object, say a chair, it now detects this  obstacle only when it is 6 inches away or sometimes the whole system hangs.
Can the SR04 be placed inverted for this application and will it work? Do let me know if anything can be done to make this work in an inverted placement?
Thank you.


Sep 08, 2019, 02:41 pm Last Edit: Sep 08, 2019, 02:49 pm by Pogo
I don't think that having the sensor 'upside down' is the problem. I think that you are seeing variations in the level of the returned signal that lead to variations in the reported distance.

Looking straight at a wall will give a strong return signal at quite large distances, but looking obliquely at the same wall will return a very small if any signal and hence no or only very close measurement. Looking obliquely at a small object will return even less signal, and so give even poorer measurements.

A look at the datasheet for one of these sensors says that the effective angle is less than 15 degrees. That means you have to view the object pretty much straight on.



When the object is way lower than where you have the sensor it's probably out of the field of vision and won't be detected.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up