Pages: [1]   Go Down
Author Topic: HC-SR04 does only 5cm  (Read 719 times)
0 Members and 1 Guest are viewing this topic.
Vlissingen Netherlands
Offline Offline
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
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?


Offline Offline
God Member
Karma: 27
Posts: 862
old, but not dead
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Pittsburgh, PA, USA
Offline Offline
Faraday Member
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Pages: [1]   Go Up
Jump to: