# 5v signals over long wires

This is a general question, but maybe the specifics of how it arose are necessary....

Elsewhere there is a discussion of a nice PIR module...

panasonic datasheet http://pewa.panasonic.com/pcsd/product/sens/pdf_cat/amn.pdf

This is just the "heart" of a typical unit, with some "smarts"

Three connections: Vcc (3.5v-5.5v), ground and output. The output is (in the case I find interesting) digital, from a comparator I believe, and I believe it will pull an Arduino output high, but needs (again... I think) a pull down resistor to make the Arduino see a low.

Now for the general question....

How far away can such a device be put on just 3 wires before something clever becomes necessary? And what is the best "something clever".

I'd prefer to drive it off of the Arduino's 5v rail... to preclude ever presenting the Arduino with anything above 5v. So the first problem is resistance along the wire supplying Vcc to the device. If the wire is long and the current high, by the time the supply reaches the remote sensor, the voltage will have dropped. And thus the "high" from the sensor won't be as high as it should be.... even before it starts its own journey back to the Arduino through its own long wire.

"Robust" answer: Send, say, 12 volts out to the sensor. Put a voltage regulator on its pcb to derive the Vcc for the sensor locally. Use the output from the sensor to drive a relay's coil. Use the relay to switch the data wire back from the sensor between 0 volts and 12 volts. And at the Arudino use an opto-isolator between the signal from the sensor and the Arduino. Fine... "Should work"? But is all of that necessary? Is there a simpler (or otherwise better) solution between the extremes of the two "solutions" written up here?

If I go with the "simple" solution, I will of course measure the voltage arriving at the Arduino on the wire with the output from the sensor... how low can that be before the Arduino won't reliably "see" it as a "high"? (Assuming I'm using a 5v Arduino, not one of the low voltage ones.)

how low can that be before the Arduino won’t reliably “see” it as a “high”

There are no clear cut answers, that explains why you have never seen one. Like most things the answer is “it depends”.

Just look upon what “it depends”. You have already identified the voltage level as being a factor, mainly due to the resistance in the wire but there are other factors:-

1. The capacitance in the wire - this will affect how quickly a signal can change so a slower signal will be able to be sent on a longer journey than a faster one. There is also a matter of the speed of the rise time of the digital signal. This is also affected by the capacitance, if it is too slow then the receiving chip might malfunction.
2. Noise pickup - A long wire can pick up all sorts of other signals that can interfere with your wanted signal. In some environments this will be a bigger signal than others. It can cause false signals at the receiving end and even damage the receiving circuit if it is too big. Slow signals can filter out some noise with capacitors (see 1 above) and inductors but fast signals are less likely to be able to use a filter.

So the it depends turns out to be, the speed of signal, type of wire and electrical noise of the environment. All things that are hard to quantify.

By the way your so called robust solution is not a very good solution. Most robust solutions involve differential pairs of signals. That is two signals one going positive and the other going negative. There is a whole host of “line driver” chips to do this sort of thing. Another robust method is a current loop. Where the voltage is raised until a current of a specific value flows through your wires. Some current loops use only a few mA but have hundreds of volts available to drive them.

How long of a wire are you thinking, and what kind of wire?

Well, assuming you’re using the standard current digital output module, it only needs about 300 uA max. So resistance in the power wires probably isn’t much concern really. You should certainly put a capacitor across the device’s power pins. Using a higher voltage and a local regulator would be even better, but you may not need it.

Now, the 100uA max output of the signal wire may be a problem over a long run, as that may have difficulty driving the capacitance of the cable, and the receiving end (Arduino) would need a fairly high impedence input which could be susceptible to EMF picked up by the wire. What you might want to do is buffer the signal at the PIR device. One way could be to put a simple CMOS inverter chip (ie 74HC00 or equiv), or possibly even just a transistor could work. Either way to give you a more robust signal.

Hi , I am a newbie and is trying my hand at hacking a micro ROV. I have a 125 m tether length and I plan to put the arduino at the control box and a CMPS03 compass at the ROV.

At this initial stage, I have to get a reading of the compass at the control box end. Will I have to get more creative than just plugging the compass to the arduino via the tether directly.

Thanks a lot just for reading

Hi Richard,

That was a fast response..

Yeah I am controlling and powering the ROV through the tether. I wouldn't know how to describe the wire for you. there are 18 wires in the tether. I plan to use four of them for the sensor. It s rather thin, the wires i mean

If you're stuck with that particular tether wire you could try combining the cores for the power (+ and 0V); i.e. use 7 for the + and 7 for the 0V...

Yup, i'll just hook it up and see what happens first. will post the results

thanks guys

Hi Guys,

A) I ve hooked the power supply to the 100 m tether. tested the multimeter at the arduino and got 4.96 V and I got the same reading at the other end of the tether.

After hooking up the sensor, I got 4.96 at the arduino and 3.6 at the other end.

B) using short wires I got a reading of 270(west) from the compass but after hooking the power supply only to the tether, i got a huge fluctuating number.

C) I hooked up the power supply using the short wires and the SDA SCL line to the tether. I got no readout at all.

that s about it. I guess i need some other way to make this work

Actually, it is 3.94V and it is pretty steady.

I did not use any filtering or bypass on the other end. I don't have a capacitor with me at the moment.

The motors would definitely affect the sensors but I got some magnetic shields which could dampen the effect.

the arduino is powering the sensor alone at the moment.

Hi guys,

I just solved the problem. Using PWM output from the sensor instead of the SCL/SDA line, I managed to get a reading from my CMPS03(Compass) using a 100 m tether.

thanks

All the above ? about noise etc have to be addressed. Having done so, look at the two voltage levels you are receiving from your PIR at the Arduino end, then hook up a comparator with a compare voltage half way between the "high" and "low" values, this will clean up your signal and produce 0-5v levels for the Arduino.