Go Down

Topic: HC SR04 on long wire (Read 270 times) previous topic - next topic

Chiopas

Hello,

I have faced a problem with connecting HC SR04 via long wire. My wire is about 15meters long (it's regular CAT5E cable) and sensor isn't working. If I connect with short wire than it works fine. I used multimeter to measure the voltage and it's 4,6v and I've found in one of the forums that this sensor should work in range of 5v - 4,5v.
I'm very new to electronics and I do not know what to do. Maybe you can help me to solve this problem?

klemko

#1
Oct 24, 2016, 12:49 pm Last Edit: Oct 24, 2016, 12:55 pm by klemko
there are several fixes/workarounds:

-you can use osciloscope to check interefences on the cable
-if there are interferences, you can use low/high pass filter on the line(which is basicly a RC or LC filter, or maybe jsut a simple capacitor, use google for more info)

I had simialr problem when sensing a object location and all i needed was to know if object is 50cm or 100cm away from sensor, so i added a hand soldered breadboard version(4x2cm) of arduino(it costs me like 3€ to make 1) uno right next to the sensor and then jsut used 1s long HIGH/LOW logic signal to send over 30 meter cable via 2 digital input/output + pulldown resistor. On ther other side i jsut checked for HIGH or LOW(over the period of 1second, whit 1us interval to check if this is really signal or is interference).

Still works after 1 year whit no problem. Although you can use similar logic and use a hand soldered atmega328 close to sensor and use it to convert data from sensor to a communication that is more suitable for long distances.


GL whit your project

Go Up