Italy
Asked — Edited

Hc-Sr04 Only Reports '20'

Hello.

I have made the connections as report in tutorial.

  • on D0 5v
  • on D0 ground Trigger on D0 signal Echo on D1 Signal

But the distance is always 20........ Can someone explain where the error is?

Thank you

Ema from Italy


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#2  

I was having the same issue last week, were my sensor will always read a value of 20. During my trials and errors, strong possibilities that I short circuit it due to negligent wiring or bad sensor from the start. I am not sure. But I purchase a set of 6 from ebay for about 10$ ( free shipping). They arrive in the mail yesterday, pop in in and everything work fine now.

Keep in mind that the polarity in the Hc-sr04 is not in the same order with the polarity in the EZ-B. That was my first mistake, maybe why my Hc-sr04 had a short.

Hc-sr04 ( VCC - TRIGG - ECHO - GROUND) EZ-B port D0 ( GND - vcc-TRIG ) EZ-B port D1 ( Echo)

make sure that you have ground to ground ,vcc-vcc trig to trig echo to echo, double check your wiring. User-inserted image