Go Down

Topic: Transmitting on/off information via wires (Read 1 time) previous topic - next topic

Randomi

Jun 25, 2009, 01:40 pm Last Edit: Jun 25, 2009, 01:41 pm by DESiBELi Reason: 1
Hi!
I've been looking for the best way to transmit information over a long (100-200 meters) distance with two or max. three wires.
Basically I just want to have multiple on/off buttons behind these wires and have Arduino identify which one was pressed.

Would it work if I put different resistors behind each button, connect all of them in parallel so if the circuit closes, the resistance can be measured? Would this work or is there any other easy way?

Many thanks in advance.

Grumpy_Mike

#1
Jun 25, 2009, 02:06 pm Last Edit: Jun 25, 2009, 02:07 pm by Grumpy_Mike Reason: 1
Quote
I just want to have multiple on/off buttons behind these wires

Just.   ;D

First off you have to define how many. Then you can look into a way of sending that information. In electronics terms this is a long way. Measuring resistance down this length of wire would be difficult because of noise pickup.


Grumpy_Mike

OK well the best bet would be to convert the button presses into tones like on the telephone. Send the audio down the wires and decode at the other end.
There are chips to do the encoding and also chips to do the decoding but you can do the decoding in software if you want.

That is what I would do, no doubt there will be other suggestions along soon.  :)

kg4wsv

Use another arduino, and use RS232 to transmit the information.  3 wires = Vin, GND, TX data.

-j

Randomi

#5
Jun 25, 2009, 02:16 pm Last Edit: Jun 25, 2009, 02:18 pm by DESiBELi Reason: 1
I was thinking about sending a unique tone on each, I'm pretty sure I'm able to decode this on the software side but I've got no idea on how to do this on the hardware side á la cheap.

And I can't use another Arduino since the buttons aren't located in the same place + wouldn't 100 meters be an issue?

orionrush

Cat5 is a great choice for long runs. I run power down one twisted pair and two channels of standard def video down the other pairs with fairly long runs with good results. Though those are long lengths and maybe you could consider xbees but they have a range of 100meeters out doors as well.

For cable you could anti up to Cat6 or some of the shielded varieties if your seriously concerned with interference. I would be more concerned however, about power decay at these long runs. By the time your tone, pulse or data comes out the other end the 5v off your Arduino can be seriously absorbed by the wire itself. At even at 100 meters you'll have to incorporate as second power source to amplify the signal.

For example 5v at 1amp will drop by 4.1 volts after being sent down 100 meters on twisted pair of  standard Cat5.

best of luck. :D

letaage

#7
Jun 25, 2009, 02:48 pm Last Edit: Jun 25, 2009, 03:00 pm by letaage Reason: 1
The problem with wires 100-200m long is that they make very good antennas and will pick up all kinds of noise which generally will make things difficult at the receiver (Arduino) end.

Similarly 100-200m of 22 or 24AWG wires will have a reasonably high resistance and probably high capacitance to ground as well as and each other and a large inductance too... all not good for sending information over long distances.

Encoding information via resistance values might work but could prove unreliable due to noise picked up in the wires acting as antennas.  You'd need to make the resistances involved small as a high resistance will cause the noise to induce higher voltages due to small currents induced in the wires.  However small resistors mean small voltages available the signals you want to detect.

This method might be able to be make to work for a couple of switches but will be no good for sending serial data, so this method is not advisable if you are looking to send information at any reasonable data rate.  

The best solution for transmitting data over long distances is to use a differential signalling system and twisted pair wires, eg CAT-5 network cable.  Differential signals are ones that don't encode the signal as a voltage relative to ground (eg 5V = '1', 0V = '0') but encodes the signal as the difference between two signals (eg  Va - Vb > 0 = '1' and Va - Vb < 0 = '0').

Why is this? Have a read of this : http://en.wikipedia.org/wiki/Differential_signaling

Basically using a differential pair provides better noise immunity than single ended signals (like RS-232) and will work over much, much longer distances.  RS-422 and RS-485 are differential standards for serial data which can operate up to around 1200m at 100kbit/sec.

So you could use twisted pair cables (CAT-5 network cable contains 4 twisted pairs) a differential transmitter at the source end and a differential receiver at the receiver end for each signal and you should experience no problems at all.

For proper operation you need to match the characteristic impedance of the wire (approximately 110 ohms for twisted pairs) at the end of the wire, usually by putting a termination resistor connecting between the pair of wires at the receiver end.  Note that the characteristic impedance is not the DC resistance of the wire, but a fundamental property of the wire.

The 26LS31 and 26LS32 are cheap differential transmitters/receivers, you should be able to find them for < $1 each and you can twist wires together to make twisted pairs if need be.

If the number of wires is a concern you could use one Arduino at the switch end to read the switch states then and convert it to serial data and send that via 2 wires (ie a differential pair) to another Arduino to decode the switches.

orionrush

Im a new poster so the system wouldn't let me post these link straight away:

Here is a voltage calculator for Power over Ethernet (PoE) that will give you a rough guide on what to expect:
http://blog.fosketts.net/toolbox/power-ethernet-calculator/

In fact you should look into PoE, as well as Video over Ethernet (VoE)
for ideas. Cat5 gets used a lot in closed circuit video security systems, as well as in churches and amphitheaters that are doing video in big spaces on a budget. Here's another link to get you started:
http://www.audioholics.com/education/cables/myth-vs-reality-2013-putting-cat5e-based-a-v-structured-wiring-in-its-place

cheers

Randomi

Wow! That's some good answers and fast, thank you all.

I think I'll need to research this more. Using CAT-5 network cable seems logical. I'll try out with a long cable to see what kind of results I get.

Igor R

Hi,

I´ve just done one example of a RS485 Network with Arduino.
One master connected to 2 switch which controls on/off leds in two slaves Arduinos via RS485 bus.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1245694725


Info about RS485 => http://www.maxim-ic.com/appnotes.cfm?appnote_number=763&CMP=WP-1


Kind Regards,


Igor R.

kg4wsv

Standard RS232 (e.g. as implemented on a MAX232 arduino like this one) is capable of communicating up to 1500' at lower speeds.

Audio tones (e.g. DTMF) would also be a decent way to do it.  There are standard ICs for both generating and decoding.

-j


pwillard

I just described a simple RS232-RS485 adapter you can build on my BLOG site.

You can check it out here:

http://pwillard.com/?p=60

Igor R

Cool!

If you need USB, it´s easy to do the same with FTDI chip. It has TXDEN pin (Automatic Transmit Enable). I did one with DIP version and 75176 chip.


Go Up