# Questions on connecting and using the RS485 MAX14783E transirver

Using Arduino UNO, obtain various parameters from the ABB B21 112-200 electric energy meter, as well as send settings to it.

This meter has an RS485 interface (ModBus RTU) with terminals A, B, C

To connect, I will use the MAX14783EASA+T transirver.

The distance between the meter and the transirver is within 50cm.

There is no ready-made module with this transirver, so I will design my own.

My wiring diagram:

As a basis, I took the design of the MAX485.

The questions are:

1. Pull-up resistors are placed on line A, B to protect against floating contact. What determines the choice of the nominal value of these resistances? There are 20k resistors on the MAX485 board, although the line length is not known there. I found various options used: 560 Ohm, 1k, 20k. The datasheet indicates:

True Fail Safe The MAX14783E guarantees a logic-high receiver output when the receiver inputs are shorted or open, or when they are connected to a terminated transmission line with all drivers disabled. If the differential receiver input voltage (A–B) is greater than or equal to -10mV, RO is logic-high.

2. The lines RO, RE, DE, DI are pull-up by 10k resistors. This is a good decision?

I learned that RE and DE can be combined together and switch the transirver from read mode to send mode using a single contact of the microcontroller. Why is this done? To save contacts or increase reliability?

The MAX14783E has built-in hot-swappable circuitry. I would not want external pull-up resistors to somehow influence this.

3. Does the -7V + 12V range comply with the A-B voltage standard for the RS485 bus?

This transceiver is rated at -8V + 13V. In the counter passport I did not find the voltage range on the RS485 line.

1. Pull-ups on the A/B lines mostly do not depend on the bus length, they are there to provide a proper logic level for your RS-485 transceiver when there is no active driver on the bus, in case the bus is open, and in the short circuit event.

Most driver in the past had a differential threshold voltage level from $$\-200mV\$$ to $$\200mV\$$, so that when you have no active driver on the bus, your RS-485 receivers are in the indeterminate state. To prevent that you want $$\U_{AB}\$$ to be bigger than the positive threshold value, so in case of $$\+200mV\$$ to calculate pull-up/downs resistors value $$\R_{pud}\$$ on A/B you simply use resistor divider formula:

$$V_{AB} = V_{A} - V_{B} = V_{cc} * \left( \frac{R_{eq}+R_{pud}}{R_{eq}+2R_{pud}} - \frac{R_{pud}}{R_{eq}+2R_{pud}} \right) = V_{cc} * \left( \frac{R_{eq}}{R_{eq}+2R_{pud}} \right)$$

For $$\V_{cc} = 5V\$$, and $$\R_{eq} = 54\$$ (which assumes properly terminated line on both ends + some load) we have:

$$V_{AB} = 5 * \left( \frac{54}{54+2R_{pud}} \right)$$

Resulting into pull-up/down value $$\R_{pud}=648\$$ ohms. To give some margin, you want the value to be less than that, say $$\R_{pud}=560\$$, but not too low, otherwise you will have too high bus short-circuit current (which is very possible in RS-485 network), so it is always a trade off. The lower is your positive threshold value, the higher you can go with your pull-up/downs, if instead of $$\+200mV\$$ it is $$\+10mV\$$, you will get $$\R=13473\$$ ohms, which yields to the $$\12k\$$ that is commonly used, and so on. For MAX14783E you have a threshold voltage of $$\-10mV\$$ so in the most conditions you will be fine without additional pull-up/downs on the line. But considering the noise on the bus and that the input hysteresis is $$\10mV\$$ (and only typical value is given), adding external pull-up/downs can improve the robustness of your design.

1. It usually never hurts to add a pull-up to the UART Tx/Rx pins as the idle state of UART signals by default is logic one. Imagine you have no pull-up/down on your Rx pin and it's disconnected from the other device, now it is susceptible to any noise which might result in a state when you constantly receive garbage.

The same applies to DE/RE pins, if for instance you have a logic high on the DE pin, but your micro is not yet configured, then it will start driving the bus and might collapse a communication for certain amount of time (or even forever if it stucks in some erratic state).

In my RS-485 designs, I do add an external pull-up to MCU Rx (RS-485 transceiver RO pin), and a pull-down to DE/RE pin which I tie together most of the time.

2. The allowable common mode voltage for RS485 is indeed $$\-7V\$$ and $$\+12V\$$. So that on each line, A and B, you can have a signal within a range of $$\0-5V\$$ referenced to the transceiver ground, on top of that transceiver should be capable to withstand $$\\pm7V\$$ common mode voltage as a minimum to qualify as the RS-485 transceiver. Many transceivers on the market can provide much higher common mode noise withstanding ratings.

• Thank you for help! You have helped me a lot! – Delta Nov 27 '19 at 15:42