Go Down

Topic: HC-SR04 does only 5cm (Read 733 times) previous topic - next topic

Andries Steketee

Hello to you all,

I have a HC-SR04 hooked up on my MEGA, i did it with the trig and echo pin together as described at http://code.google.com/p/arduino-new-ping/wiki/NewPing_Single_Pin_Sketch
Now when i run it i only read 5cm but there is much more space in front, when i used this on a other arduino it work as a charm.
Also when i touch the sender, receiver or xtal it sometimes respond.
I have three HC-SR04's but the all do exactly the same.

Any one is familiar with this problem?

greets

afremont

Maybe it's hearing the transmitter side ringing down.  Are there library calls you could do to set a blanking period?  Try putting a divider between the sending and receiving side to block direct sound from making it over.
Experience, it's what you get when you were expecting something else.

GoForSmoke

I have the same basic thing. Once the trigger pin is raised and lowered you wait for echo to go high at which point you start timing until echo goes low and that's your range.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up