I want to get one Arduino to talk another Arduino that's about 50 feet away. Can I use serial for this? I know RS232 has a distance of like 100 meters, but this isn't RS232.
How would I wire it up? Just TX on one, to RX on the other?
I want to get one Arduino to talk another Arduino that's about 50 feet away. Can I use serial for this? I know RS232 has a distance of like 100 meters, but this isn't RS232.
How would I wire it up? Just TX on one, to RX on the other?
More specifically I'd like to have a remote Digispark phone home to my main Arduino that's about 50 feet away. I play on running four wires between them: 5v, ground, TX, and RX. Is that workable?
Sure. Get some CAT5/ethernet cable and connect them up.
Start with slower speeds, work up until comm's get unreliable, and then back down.
I have similar small boards available as well, with '328 family or '1284 chip family. User assembly required at the moment. Am working on a reflow oven controller to put chips on myself.
www.crossroadsfencing.com/BobuinoRev17
Do I need pull up resistors or anything special? Just RX->TX and TX->RX?
Just Rx to Tx, Tx to Rx, Gnd to Gnd.
For long transmission lines, you should use a slower baud-rate to decrease the transmission-error probability. Or you can get a MAX232 chip for each arduino, and transmit at the at RS-232 voltage levels, to increase signal integrity.
What's considered a "long transition line?" I'm probably going about 50 feet... maybe 75. I planned on use 28800.
28,800, you might be okay.
See the chart & discussion midway down this page
http://www.z80.info/1656.htm
Having RS232 or RS485 driver would not hurt.
Does using RS232 with max232 needs any code change or special library or just connect the max232 to TX RX GND?? I mean if I already able to send data between two arduinos using TX RX GND but I need longer distance communication.
The MAX232 is just buffering signals, no code changes needed.
The chip changes the uC's Tx 0/5V output to ~+10v/-10V to send down the wire, on the receive side the chip changes the +10V/-10V back to 0/5V to drive the uC's Rx pin.
So you need a MAX232 on each end, and five 0.1uF caps, or 1uF caps, depending on which driver you get, for each chip to make the +/-10V for the driver.
http://datasheets.maxim-ic.com/en/ds/MAX220-MAX249.pdf
this is exactly what I know. Thanks for ensuring me
I can use RS-485 with max485 the same way as max232. right?
Yes. Be sure to use termination resistors.
http://pdfserv.maxim-ic.com/en/an/AN723.pdf
Scott Baker:
50ft is the standard "limit" for RS232 (the +/- 10Volt level) granted you can acheive longer distances with slower baud rates and careful routing/shielding. You will not be 100% successful with that length @ 0-5Volt levels (I've read that even 10ft can be troublesome at high baudrates). Definitely go with RS232 or RS485. It's very cheap to implement. Or you can experiment with the 0-5V, but it may get frustrating with intermittant issues.