Arduino: RS485 full-duplex using MAX488
Posted: Apr 10th, 2013, 12:28 pm
Hello All,
Good news! I have tested and can confirm that I have achieved full duplex communication between two Arduinos via RS485 using the MAX488 chip. Even better, if you can get the standard TTL coms to work (Rx-Tx) then this solution is as easy as dropping two MAX488 chips inline!
I will post a more specific post (with drawings) soon, but in the mean time, here is what I have discovered.
TEST SET UP
-Requires two Arduino units. (in my case, one Uno (rev3) and one Mega.)
-EasyTransfer Library. (Download Here)
(The EasyTransfer Library is perfect for beginners or users that don't want to (or know how-to) write their own protocol for data exchange.)
Wiring:
Uno < -- > MEGA
GND-------GND
Tx---------Rx
Rx---------Tx
Using the EasyTransfer Library, you should be able to transfer data.
NOTE: This set up is limited in length. Some people have achieved more then 100 feet (30m) with this. But frankly, that requires extraordinary circumstances.
NEXT STEP
-Requires two Arduino units.
-EasyTransfer Library
-Two MAX488 chips
Wiring:
UNO < -- > MAX488(A) < -- > MAX488(B) < -- > MEGA
UNO < -- > MAX488(A)
GND---------Pin 4
5VDC---------Pin 1
Rx-----------Pin 2
Tx-----------Pin 3
MEGA < -- > MAX488(B)
GND---------Pin 4
5VDC---------Pin 1
Rx-----------Pin 2
Tx-----------Pin 3
MAX488(A) < -- > MAX488(B)
Pin 8-------------Pin 5
Pin 7-------------Pin 6
Pin 6-------------Pin 7
Pin 5-------------Pin 8
GND-------------GND
EDIT: There should be a 120ohm resistor between pins 7 and 8 on both MAX488 chips.
Using the same code as the test program, you should get the same results except now your tether can be as long 4,000 feet (1,200 m), and it is way more protected against noise and other outside interference. You sacrifice some bandwidth with this (approximately 250kb/sec), but if you are only exchanging headings, temps, and control inputs, this should be more then sufficient!
Hope this helps someone out there!
More details to follow soon! (Including Code samples!)
Ryan
"KR2_Diving"
Good news! I have tested and can confirm that I have achieved full duplex communication between two Arduinos via RS485 using the MAX488 chip. Even better, if you can get the standard TTL coms to work (Rx-Tx) then this solution is as easy as dropping two MAX488 chips inline!
I will post a more specific post (with drawings) soon, but in the mean time, here is what I have discovered.
TEST SET UP
-Requires two Arduino units. (in my case, one Uno (rev3) and one Mega.)
-EasyTransfer Library. (Download Here)
(The EasyTransfer Library is perfect for beginners or users that don't want to (or know how-to) write their own protocol for data exchange.)
Wiring:
Uno < -- > MEGA
GND-------GND
Tx---------Rx
Rx---------Tx
Using the EasyTransfer Library, you should be able to transfer data.
NOTE: This set up is limited in length. Some people have achieved more then 100 feet (30m) with this. But frankly, that requires extraordinary circumstances.
NEXT STEP
-Requires two Arduino units.
-EasyTransfer Library
-Two MAX488 chips
Wiring:
UNO < -- > MAX488(A) < -- > MAX488(B) < -- > MEGA
UNO < -- > MAX488(A)
GND---------Pin 4
5VDC---------Pin 1
Rx-----------Pin 2
Tx-----------Pin 3
MEGA < -- > MAX488(B)
GND---------Pin 4
5VDC---------Pin 1
Rx-----------Pin 2
Tx-----------Pin 3
MAX488(A) < -- > MAX488(B)
Pin 8-------------Pin 5
Pin 7-------------Pin 6
Pin 6-------------Pin 7
Pin 5-------------Pin 8
GND-------------GND
EDIT: There should be a 120ohm resistor between pins 7 and 8 on both MAX488 chips.
Using the same code as the test program, you should get the same results except now your tether can be as long 4,000 feet (1,200 m), and it is way more protected against noise and other outside interference. You sacrifice some bandwidth with this (approximately 250kb/sec), but if you are only exchanging headings, temps, and control inputs, this should be more then sufficient!
Hope this helps someone out there!
More details to follow soon! (Including Code samples!)
Ryan
"KR2_Diving"