ttl to RS485 converter without DE /RE

Hi,
recently I’ve used a ttl to RS485 module having DE and /RE pin for direction control.
An example is this: http://yourduino.com/docs/RS485-Arduino-Module3-512.jpg

Now I’m evaluating to use a ttl to RS485 module without DE and /RE, I think they have automatic direction control. Examples are here and here.

I’m using ModbusMaster library to communicate with some devices by using Modbus RTU over RS485 half duplex links.
A basic example is at: https://github.com/4-20ma/ModbusMaster/blob/master/examples/RS485_HalfDuplex/RS485_HalfDuplex.ino

If I will use the module with automatic direction control, what I need to do from hardware and software point of view ?
I mean, on hardware will be fine to connect TX, RX to Serial1 ? other than VCC and GND of course, and without adding other components.
Regarding software, will be fine to comment out every line of code that is managing DE and /RE ?

Thank in advance for your help!

I mean, on hardware will be fine to connect TX, RX to Serial1 ? other than VCC and GND of course, and without adding other components.

Yes.

Regarding software, will be fine to comment out every line of code that is managing DE and /RE ?

In general: yes.

On such boards DE/RE is simply connected to the TX line which results in the advantage that you don't have to care for the activating/deactivating the driver. But it has a huge disadvantage: As which this solution the LOW states of the a transmitting byte have to be established by passive resistors (otherwise you have a floating signal) you are limited in the speed you might reach and usually the reliability is also lower. The resistors are usually in place on systems with MCU controlled DE/RE but there they have to provide a stable state just for periods where no bus member is actively transmitting any data, so allowing higher transmission rates.

BTW: cheap RS-485 modules usually have several drawbacks. The most important is that they lack any documentation, in most cases not even schematics are available. And they cannot be configured, so they often have fixed termination resistors, idle state resistors or both. The problem is that idle state resistors should exist only once per bus and termination resistors must exist only at both ends of a bus. That means you often have to desolder some resistors to make those modules work.

Very useful answer!

pylon: ... you are limited in the speed you might reach and usually the reliability is also lower.

Usually I need slow speed, between 2400 and 9600 bps, I take more care about reliability of transmitted data. They are good enough for these requirements ? [/quote]

pylon: BTW: cheap RS-485 modules usually have several drawbacks. The most important is that they lack any documentation, in most cases not even schematics are available. And they cannot be configured, so they often have fixed termination resistors, idle state resistors or both. The problem is that idle state resistors should exist only once per bus and termination resistors must exist only at both ends of a bus. That means you often have to desolder some resistors to make those modules work.

Yes, these modules with automatic direction control are poor documented, so it's difficult to decide when they are applicable to a particular use case.

Instead the modules with RE and /DE is quite spread and enough documented, and so for the prebuilt shield you can find widely. Unfortunaly the former are to be used on a breadboard, while the shield often use Serial(0) hardware or let you to use generic pin with SoftwareSerial.

I'm still looking for a [u]realiable[/u] prebuilt TTL-RS485 module which can use Serial1/2/3, but does not require a breadboard. Any suggestion is welcome.

They are good enough for these requirements ?

I never tested the reliability at rates lower than 19200 baud. But the reliability is definitely lower if you don't use the RE/DE signal because the driver controls only one state. Unfortunately I didn't save the scope pictures of my tests but you saw the difference and it was quite impressive. That's why a threw away the adapters I bought for my project and replaced them by a version that explicitly controlled the DE/RE signal.

Unfortunaly the former are to be used on a breadboard, while the shield often use Serial(0) hardware or let you to use generic pin with SoftwareSerial.

I definitely recommend not to use SoftwareSerial in any project that might go productive. It's a horrible piece of software that blocks the complete MCU while communicating. I predict that you never get ModBus reliable if used over SoftwareSerial as it's quite timing critical. Always use a hardware serial interface. If you need the connection to the PC during the communication, use a Leonardo (which has USB built in, so the serial interface is free to use) or better a Mega2560 (which has 4 hardware serial interfaces).

I'm still looking for a realiable prebuilt TTL-RS485 module which can use Serial1/2/3, but does not require a breadboard. Any suggestion is welcome.

I'm not aware of a shield that allows the usage of the additional serial interfaces of a Mega2560. The linksprite shield allows to use the hardware serial interface of a Leonardo. This might work for you.