Rs485 to TTL Converter Module

Hi,

I have a Rs232-TTL converter module working for my Rs232 serial communication with a scale. I need a similar solution but for Rs485 due to distance requirements. I am using the Fez Cobra iii board and can use any of the Com 2-5 pinouts.

Does anyone have any suggestions regarding a Rs485-TTL product to use with some sample code (if it works different from just using standard serial)? Is this even possible at all?

Any help will be greatly appretiated!!

Thanks!!

RIaan

How about this one:
https://www.ghielectronics.com/catalog/product/479
You don’t Need to use the GAdgeteer Module, you can jsut add the components to your circuit.
Schematics of the module are available.

For SW:
Just use it as any RS232 with the following exceptions:

  1. You might get an echo of what you send (depends on the chip you actually use)
  2. RS485 is not full Duplex: means, only one device can send at any time. This is why RS485 is usually used in master slave Scenarios. Modbus RTU is a very common prtocoll used over RS485 with a sinbgle Master and multiple slaves.

@ Reinhard Ostermeier - How do you determine the difference between actual incoming data and the echo?

Every time you send a Byte, you simply read one to eliminate the echo. (or multiple bytes in a row)
Since you need to spicify the master and slave roles on an RS485 bus anyway, the master will never get data, except as an response from an slave. The slaves are always listening, and only send data as an response, after which the can read back the echo.

As far as I know this is true for all serial half Duplex busses like RS485, LIN, K-Line/Bus, …

1 Like

You might be able to use RS422. Electrically, it is identical to RS485 and will go the same distance but it uses a pair of wires for TX and a pair of wires for RX. If you put a TTL to RS422 converter on the UART ports on both ends, your code doesn’t even know it isn’t talking RS232. Make sure you Google RS422 and use terminating resistors as necessary. Also make sure you read and understand how to ground the link. Moxa, B&B and others all make these converters. You can probably find them at the usual Arduino vendors, Sparkfun and the like.

Normally you design the transceiver circuit so that the receive is disabled when the transmitter is enabled as this makes coding far simpler. For transceivers where you control this you normally tie the RX enable the TX enable together. They are usually opposite states so this works well and with RS232 to RS485 you use RTS to control them. For TTL out of a micro you simply use a GPIO pin to do the same.

There are a few automatic IC’s on the market and these do away with the need to handle this in your code, simplifying things greatly. You can then just write your code as if using 3 wire RS232 in half duplex mode.

For an off the shelf module, the KK SYSTEMS K3-ADE provides this capability. It also has RX always on for code that expects to see it’s own transmission.

Just as a matter of interest, what is your baud rate and distance needs?

GHI still has the RS458 module but it is on legacy status so will eventually disappear when stocks run out.

https://www.ghielectronics.com/catalog/product/479