Pages: [1]   Go Down
Author Topic: Transmitting on/off information via wires  (Read 748 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 25, 2009, 06:41:21 am by DESiBELi » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31416
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 25, 2009, 07:07:11 am by Grumpy_Mike » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Many = 10
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31416
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley
Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

-j
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: June 25, 2009, 07:18:05 am by DESiBELi » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-grin
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Read the data sheet!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 25, 2009, 08:00:35 am by letaage » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Edison Member
*
Karma: 16
Posts: 1579
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 18
Posts: 1627
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Edison Member
*
Karma: 16
Posts: 1579
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged


Pages: [1]   Go Up
Jump to: