Pages: 1 2 [3]   Go Down
Author Topic: Communicating with an Arduino that is relatively far away  (Read 4070 times)
0 Members and 1 Guest are viewing this topic.
Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the helpful hints Rob, I appreciate it!

How do you like this? It does look a lot clearer smiley
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the slash after the name or the "overscore"
Also the small circle on the graphic, on chips that means an active low or inverted signal.

Just some notes about schematic layout.

If you mirror image the remote chip the drawing will be a lot clearer.

When things are tied to power rails it's almost always better (clearer) to have VCC going up and GND going down. Your caps go up.

Most beginners make a real dog's breakfast by running the GND wire to every possible place. You haven't done that which is good, in this case however I would argue that because these chips are physically remote from each other you should draw the GND line between the two to reinforce that they have to have a common GND and that that is formed by a GND wire in the cable.

______
Rob

Actually these don't require a common ground between the local and remote chips, that is one of the advantages of the A/B signals being a true differential signal pair. I'm sure some will disagree with this, but I would say hold off until you actually test such a link using independent power sources at each end, it will continue to work without a common ground wire between the pair.

Lefty
« Last Edit: November 13, 2012, 09:58:27 pm by retrolefty » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On the remote end you really should ground pin 3, DE, to make sure it's transmit driver is forced off into tri-state mode.

Lefty
According to the table it shouldn't care but I guess better safe than sorry smiley-wink

Version 4 then:


Your probably right, but I'm kind of a belt and suspenders kind of guy and like to hardware the control signals when I know they are never going to be switched.
Lefty
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8592
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Welcome to the world of conflicting opinions Nico. This is one of the common dichotomies like Canon/Nikon, Ford/GM etc.

I have experience with RS-485 but Lefty has made a career of using it in very bad environments, so I'll bow to him on this while retaining the right to differ smiley

IMO the schematic is much clearer now.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys, really appreciate your input! smiley

One more question then. Over here, Icc is specified as 0.375 mA typical, the PDF datasheet I have says max 1.000 mA. So I assume it will be safe to power the chips from the Arduinos 5V if the local Arduino is USB powered?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys, really appreciate your input! smiley

One more question then. Over here, Icc is specified as 0.375 mA typical, the PDF datasheet I have says max 1.000 mA. So I assume it will be safe to power the chips from the Arduinos 5V if the local Arduino is USB powered?

Certainly.
Logged

Offline Offline
God Member
*****
Karma: 7
Posts: 647
"In this house, we obey the Laws of Thermodynamics" Homer J. Simpson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have experience with RS-485 but Lefty has made a career of using it in very bad environments

Why use RS485 though rather than RS422 if there is no need to multidrop?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8592
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think it matters here. 485 has better common-mode voltage specs, and I think the chips are easier to find and there's a larger range, but either is good I think.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes either can be made to work as long as the driver chip on one end is the same 'flavor' as the receiver chip at the other end.

By the way Wikipedia shows a good three resistor termination method one can use on the receiver end of each path (if using two pair full duplex) which will ensure no false data hits due to noise in case the far end of a link is powered off, it's shown in the first picture showing a series 680 ohm, 120 ohm, 680 ohm resistors wired to the recievers Vcc and ground and A and B signal pins. Good idea.

http://en.wikipedia.org/wiki/EIA-485

Lefty
Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally got around to finishing this up.. And wanted to update the thread with some findings.
The first is that the remote/RX end pin 3/DE must in fact be grounded. I just got garbage if I didn't ground it.
The other is that B on one end must be connected to B on the other end, and A to A. Connecting B to A and vice versa also gave garbage.
It seems to work fine without the resistors too, but I assume that may change with longer distances so I put them there anyway.
Figured this stuff might be good to know.

The chips I'm using are MAX3082E. Amazingly everything worked as expected the first time I connected it, I had to actually disconnect some stuff to make sure it wasn't just the software fooling me smiley-wink This weekend we'll test with a longer cable in between.

Thanks again for all the help!
« Last Edit: February 28, 2013, 04:27:44 pm by Nico V » Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Another update.. We put the stuff to the test this weekend. Using 75 meters of cat6 cable between the 2 sides, in an electronically noisy outdoor environment, the chips powered by the Arduinos +5V pin, 2 chips per Arduino/side, no common ground. To top it off temperatures were -15C/5F and there was a blizzard going on.

The result of the test was that everything worked perfectly fine, no trouble whatsoever! smiley
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8592
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good stuff.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: 1 2 [3]   Go Up
Jump to: