Shop OBEX P1 Docs P2 Docs Learn Events
not working with long wires — Parallax Forums

not working with long wires

sowmyasri.2007sowmyasri.2007 Posts: 2
edited 2012-04-30 02:58 in Accessories
hello friends

I have tried this ultrasonic sensor with water for that i have connected with a very long wire of 30 mts its not working but its working with upto 20 mts cable so can you please give your valueble suggestions to meet my requirement.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-25 10:55
    Can you post more information about the sensor? What kind of interface does it have? How is it powered?

    -Phil
  • sowmyasri.2007sowmyasri.2007 Posts: 2
    edited 2012-04-25 22:10
    we have used ultrasonic ping sensor interfaced with an general purpose I/O pin of a microcontroller we have given a 5v supply as it required and whenever we have tested with a short wires we can get an approximate output but whenever we are using long wires of above 20metres we are facing an out of range output.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-25 23:32
    You are getting an output, though, right? IOW, it's not just non-responsive. Here are some things you can try, from simplest, to more complicated:
    1. Add an electrolytic cap of at least 220 uF between Vdd and Vss at the Ping))) end of the cable.
    2. Add a 4.7K pulldown resistor to the non-Ping))) end of the cable, between Sig and Vss.
    3. Add a local 5V regulator circuit to the Ping))) end of the cable to provide its Vdd, and supply 9V to the regulator over the cable.

    The most likely scenario is that the cable is dropping too much voltage, either altogether, or just when the Ping))) fires. In the latter case #1 will help; in the former case, #3 will help. #2 will help to eliminate problems with electrical noise.

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-04-26 21:44
    If using two totally separate wires instead of a shielded cable, is there any chance that interference could also be a problem? Could you twist the two wires to effect a "twisted wire pair"?

    http://en.wikipedia.org/wiki/Twisted_pair
  • HTAHTA Posts: 1
    edited 2012-04-30 02:58
    What is the specification of the sensor output? It will define how long the lines could be and if you need an addition output driver or a special input on the receiving side.

    enjoy problem solving!
Sign In or Register to comment.