Wired communication over a distance of about 20-30 feet

I am working on a project that will have a central display and somewhat remote sensor pods. The sensors will be connected by wire to the central display. This is in a noisy (vehicle) environment.

Each sensor pod generates 5 analog signals in the range of 0-5V. The analog signals are conditioned in the pod.

I'm trying to figure out the best way to connect this to the central display. An ADC in the sensor pod would make a lot of sense, but the only ones I can find use SPI, which does not work over the distances I need.

Right now I'm thinking of putting a small atmega in each sensor pod. The arduino would turn on, collect the measurements, and transmit them to the central display using RS232 signals. Each sensor pod uses about 30ma at most; I could cut this down to about 12ma if needed.

When the central display wants a reading from a specific sensor pod, it would turn it on, get the readings, and then shut it off. That way I only need to use a single serial port on the display, and I only have 4 wires going to each sensor pod.

Thoughts?

I like the distributed processing approach. You could filter the power on the far ends to have a nice clean reference also.
Use half-duplex RS485 (MAX485) back to the central location for most error free transmission uisng 4 wires, Vcc, Gnd, Data+, Data-.
MCP3208 for 8-channel 12-bit ADC if onboard 10-bit ADC in a 168 or similar is not sufficient.

Hi,
SPI will certainly work over those distances. You would need a chip Select / Module select line of some kind to each pod.

Look at the Arduino Libraries: Libraries - Arduino Reference
Look at SPI: SPI - Arduino Reference
Look at Clock Divider: SPI - Arduino Reference

At 125 Khz (Divide by 128) there is 8 microseconds per clock cycle. There are at least 2 microseconds setup / propagation delay per bit.

You would need to cable it carefully, probably CAT5 ( 4 pairs) AKA Ethernet cable. MOSI Master Out Slave In, MISO MAster In Slave Out, CLK (Shift clock). Each could be a pair with one side grounded. One more pair could be +12V and Chip/Module Select. Regulate to 5V.. Etc.

You probably want to send and receive each signal with something like an LS14 Schmitt Trigger Hex Inverter for nice clean signals. 100 ohm 'back match'.

2 microseconds is a long time!

Depending on the particular devices you use, you may be able to daisy chain the cable to all pods...

** Hey, Robert.. we ended up in the same elevator at the same time :slight_smile:

Looks I was on the fast car 8)

I would think that in an electrically noisy environment like this, it would make more sense to bring the analog value back to the central control unit and digitise it there. You can apply any filtering and noise suppression you need to the DC analog signal without affecting the reading. A digital signal would be much more vulnerable to noise.

CrossRoads:
Use half-duplex RS485 (MAX485) back to the central location for most error free transmission uisng 4 wires, Vcc, Gnd, Data+, Data-.

How do you interface a MAX485 to an arduino? (This is probably a stupid question, but I'm not a hardware guy.....)

PeterH:
I would think that in an electrically noisy environment like this, it would make more sense to bring the analog value back to the central control unit and digitise it there. You can apply any filtering and noise suppression you need to the DC analog signal without affecting the reading. A digital signal would be much more vulnerable to noise.

That's the current setup. I'm testing that right now. If I can get it to a 4 wire RS485 system v. the current 7 wire system that would make the connections easier.

See the datasheet
http://datasheets.maximintegrated.com/en/ds/MAX1487-MAX491.pdf
Has connection examples.
See page 13 for an example for your application.

See this tutorial as well:
http://www.maximintegrated.com/app-notes/index.mvp/id/723

How do you interface a MAX485 to an arduino?

The easy way is to use some module that has a MAX485 chip mounted on it.

DISCLAIMER: Mentioning stuff from my own shop... which is what I can show you. See:
=485&s[title]=Y&s[short_desc]=Y&s[full_desc]=Y&s[sku]=Y&s[match]=all&s[cid]=0]http://yourduino.com/sunshop2/index.php?l=search_list&s[search]=485&s[title]=Y&s[short_desc]=Y&s[full_desc]=Y&s[sku]=Y&s[match]=all&s[cid]=0
As you can see the chip itself is only 20 cents...

A little more info on this page (Scroll down): http://arduino-info.wikispaces.com/Popular-ICs

That link is not working as intended Terry.
Simple search for RS485 brings up a $2 chip.

Hi, Ummm....
http://yourduino.com/sunshop2/index.php?l=product_detail&p=317

Is $2.00 but it's for a package of 10 chips...

I know, I know it's a small markup and some people think I'm crazy.

But I LIKE MAX485's 8)

Ah, didn't notice it was for 10.

Google LTC490, its an 8 pin IC which allows full duplex RS485 communication, currently using a pair for a ROV.

Similar to the MAX488/MAX490 chips.

I vote to use STP Shielded cat5e/cat6a/cat6e cable to connect with MAX485.

Cat5 cable for RS485

if Rt=120 ohm for RS485 cable, I will try Rt=110 ohm for cat5 cable.

So if I understand this correctly, in my setup the pod only gets power when I want it to communicate.

I tie pins 2, 3, and 8 to a +5 source.

MAX485 pin 1 is RX on the arduino and pin 4 is TX.

yes? I'll figure this out eventually, hopefully without ruining too much equipment. :sweat_smile: