Key Takeaways

  • UART is a framing and timing scheme on logic-level pins; RS485 is a differential electrical layer, not a competing data format.
  • A UART port plus a transceiver becomes an RS485 port. They are stacked layers, not alternatives.
  • Unbuffered TTL UART is reliable only over short cable; RS485 reaches roughly 1200 m per segment at low baud rates.
  • Reversing the A and B pair produces total silence, not garbled data. It is the fastest thing to check on a new bus.
  • Modbus RTU is a protocol that runs on top of either layer, and its frame timing is stricter than plain UART framing.

1. What Is UART?

UART is a hardware interface that sends and receives serial data asynchronously, without a shared clock, on two logic-level pins normally labelled TX and RX.

The absence of a clock line is the defining property. Both ends agree on a bit rate in advance and each side recovers timing from the start bit of every character. That makes the wiring trivial, and it also means any drift between the two clocks accumulates inside a character - which is why baud rate tolerance, not cable length, is the first thing to verify when characters arrive corrupted.

A UART is a peripheral, not a standardised connector or voltage level. The same UART block can drive a 3.3 V pin, a 5 V pin, an RS232 transceiver or an RS485 transceiver. Everything below the pin is a design decision.

Core characteristics

  • Asynchronous framing: each character is a start bit, 5 to 9 data bits, an optional parity bit and one or two stop bits. Both ends must be configured identically.
  • Single-ended logic levels: 3.3 V or 5 V referenced to a shared ground. No differential pair, no common-mode rejection.
  • Point-to-point by default: TX of one device crosses to RX of the other. Extra nodes require extra hardware.
  • No addressing and no arbitration: the protocol above the UART decides who speaks and when.
  • Near-universal availability: almost every microcontroller, SoC and radio module exposes at least one UART, which is why it remains the default configuration and debug interface.

2. How Does UART Work?

A UART link does not need a handshake to move a byte, but it does follow a fixed sequence for every character.

  1. Idle and start detection. The line rests high. The transmitter pulls it low for one bit period; that falling edge is the only synchronisation the receiver gets, so noise on an idle line can be mistaken for the start of a frame.
  2. Bit sampling at the agreed rate. The receiver samples each bit at its centre, typically with 16x oversampling. Clock error only matters cumulatively, which is why two ends within about 2 to 3 percent of each other usually work and anything beyond that fails intermittently rather than outright.
  3. Character assembly. Data bits are shifted in, parity is checked if enabled, and the stop bit confirms the frame ended where it should. A missing stop bit raises a framing error; a wrong parity bit raises a parity error.
  4. Flow control and buffering. RTS and CTS exist for hardware flow control, and DMA or FIFO buffering keeps the CPU out of the per-byte path. In practice RTS is more often repurposed as the direction control for an RS485 transceiver than used for its original purpose.
  5. Error reporting and overrun. If the application does not read the receive register before the next character completes, the overrun flag is set and that byte is lost. Silent overrun is a common cause of "the module works but drops the occasional packet".
  6. Handoff to the protocol layer. AT commands, a proprietary frame format or Modbus RTU all sit above the UART. The UART itself has no idea what the bytes mean.

3. What Is RS485?

RS485 is a differential, half-duplex serial bus standard - TIA/EIA-485 - that defines the electrical layer for multidrop industrial networks, allowing devices to exchange data reliably over long cable runs in electrically noisy environments.

RS485 does not define a data format. It defines what a logic 1 and a logic 0 look like on a twisted pair, how many devices may share the pair, and how the ends of the cable are terminated. The bytes themselves are still produced by a UART, usually running Modbus RTU on top.

Core characteristics

  • Differential A/B signalling: the receiver reads the voltage difference between two conductors. Common-mode noise affecting both wires equally is largely rejected, which is the property that carries the standard into industrial cabinets.
  • Multi-drop bus: up to 32 standard unit loads per segment, with 120 ohm termination at both physical ends of the trunk and short stubs.
  • Half-duplex with direction control: one driver is enabled at a time. The direction pin must switch fast enough that the first and last byte of a frame are not clipped.
  • Long reach at low speed: roughly 1200 m per segment at low baud rates on twisted pair. Distance and baud rate trade against each other, so a link that fails at 115200 bps often runs without errors at 9600 bps over the same cable.
  • No inherent security or addressing: RS485 carries bytes transparently. Node addressing, error checking and retries belong to the protocol above it.

4. UART vs RS485: What Is the Difference?

UART and RS485 appear in the same sentence because they are stacked, not because they compete. A UART produces the bit stream; an RS485 transceiver decides how that bit stream is represented on the wire.

Dimension UART RS485
Signalling layer Single-ended logic levels (3.3 V or 5 V) referenced to a common ground Differential voltage between an A and B conductor pair; no absolute level to ground
Working mode Asynchronous full-duplex point-to-point, no clock line, no direction control Half-duplex shared bus; one driver at a time, direction controlled by DE/RE
Speed and distance Limited by cable capacitance and ground noise; reliable over board-level runs and short cables 9600 to 115200 bps typical, over roughly 1200 m per segment at the lower rates
Topology and node count Two endpoints; more nodes need a multiplexer or a separate port each Multi-drop trunk, up to 32 unit loads per segment
Noise immunity Poor on long cable; the signal is referenced to a ground that drifts between buildings Strong common-mode rejection; the reason it survives motor drives and contactors
Typical application MCU to radio module, debug console, GPS receiver, sensor on the same board PLCs, energy meters, drives and sensors on a plant floor, usually running Modbus RTU

The decision rule: keep the link as UART while both ends are inside the same enclosure; insert an RS485 transceiver the moment the cable leaves the cabinet, exceeds a couple of metres, or has to reach more than two devices.

5. UART and RS485 Configuration and Key Parameters

Both layers have to be configured, and they fail differently. The parameters below are the ones that actually break links in the field.

  • Baud rate: 9600, 19200, 38400 and 115200 bps cover most industrial devices. Both ends must match exactly. On RS485 the usable baud rate falls as cable length rises, and the symptom of exceeding it is intermittent rather than total failure.
  • Data bits, parity and stop bits: 8-N-1 is the default for nearly every Modbus RTU device. A mismatched parity setting usually shows up as a steady stream of framing errors rather than silence.
  • Flow control: normally none on an RS485 bus. RTS is commonly reassigned as the transceiver direction pin, and late switching truncates the last byte of each response - which looks exactly like a protocol or device fault.
  • Frame gap: Modbus RTU delimits frames with a silent interval. A converter that buffers or splits serial data can destroy that timing, so transparent forwarding matters more than raw throughput.
  • Termination and failsafe biasing: 120 ohm at both ends of the trunk, with short stubs. Without bias resistors an idle differential pair floats and the receiver can report random start bits.
  • Logic-level compatibility: a 3.3 V UART driving a 5 V input, or the reverse, is a reliability problem before it becomes a damage problem. Level-compatible designs avoid the question entirely.
  • Ground reference: the common-mode range of an RS485 receiver is wide but not unlimited. Where the two ends sit on different earth potentials, a third conductor or galvanic isolation is the correct answer.

6. When to Use UART and When Not To

Good fit for UART

  • Chip-to-board links inside one enclosure, where cable length is measured in centimetres.
  • Configuration and firmware interfaces - AT command ports, bootloaders, debug consoles.
  • Connecting a radio module to a host microcontroller with a handful of wires and no transceiver cost.
  • Any link where the peer count is exactly two and no addressing is required.

Good fit for RS485

  • Multidrop buses inside cabinets, plants and buildings, where several devices share one cable.
  • Cable runs of tens to hundreds of metres, especially where drives, contactors or welding equipment are nearby.
  • Modbus RTU networks, where the protocol and the electrical standard are designed for each other.
  • Retrofits, where existing instrument wiring must be reused.

Poor fit for UART alone

  • Any cable leaving the enclosure; the single-ended signal references a ground that no longer matches at the far end.
  • Noisy environments, where induced noise on a long unshielded run is indistinguishable from a start bit.
  • More than two nodes, unless an external multiplexer or bus switch is added.
  • Long-distance links, where raising baud rate is not an option and the data volume is low.

Poor fit for RS485

  • Full-duplex streaming between two points; the half-duplex bus has to turn around between frames.
  • Star or mesh wiring, which creates stubs and reflections that termination cannot fix.
  • Very short board-level links, where a transceiver adds cost and a direction-control failure mode for no benefit.
  • Safety-critical interlocks, where a wired point-to-point loop with positive feedback is still the responsible choice.

7. Real-World Applications

In industrial automation, energy monitoring and building management, the standard pattern is a UART inside the enclosure and RS485 once the cable leaves it. A controller talks to a radio module over UART TTL, and the same controller talks to meters and drives over an RS485 trunk running Modbus RTU. The protocol stack does not change; only the electrical layer does.

Ebyte module families follow exactly that split. On the UART side, the E22-400T22D-V2 is a wireless serial port module with UART TTL level output that is compatible with both 3.3 V and 5 V IO port voltage, which removes the level-shifting question on mixed-voltage boards, and the E220-400T30S pairs a UART interface with a 30 dBm output on 433 and 470 MHz. On the RS485 side, the E95-DTU(433L20-485)-V8 is an RS485 LoRa radio station with Modbus support and a 3000 m working range at 20 dBm, while the E220-400R30D brings RS485 to the same 30 dBm power class with a 10 km figure. For mixed installations, the E150-400T30S integrates Modbus RTU with a UART interface and four digital inputs and outputs, which covers the common case of a radio link that also has to read a couple of dry contacts.

One physical detail is consistently underestimated. Board-level performance tells you very little about installed performance: twisted pair, correct termination at both ends, short stubs and a defined ground reference account for more field failures than the choice of module does. On radio-equipped links the same logic applies to the antenna and its feed line - the datasheet range assumes an installation that most cabinets do not provide.

8. FAQ: UART and RS485 in Practice

Q1: Is UART the same as RS485?

No. UART is the framing and timing scheme; RS485 is the electrical layer that carries the resulting bits. A UART port outputs logic levels referenced to ground, while RS485 outputs a differential voltage on a twisted pair. Add a transceiver and the same UART becomes an RS485 port, so the two are layers of one design rather than alternatives.

Q2: How far can a UART cable run without an RS485 transceiver?

Tens of centimetres on a board, and a few metres at best on screened cable at low baud rates. Beyond that, ground potential differences and induced noise corrupt the single-ended signal. The practical cutoff is not a fixed number but the point where the cable leaves the enclosure.

Q3: Why is my RS485 Modbus device not responding through a UART-to-RS485 link?

Check the direction control first, because late switching truncates the final byte and the device never sees a valid frame. Then confirm baud rate, parity and stop bits, verify the A and B pair is not reversed, and increase the master timeout, since the radio or converter adds a round trip of latency the default timeout may not allow.

Q4: What happens if A and B are reversed?

You get silence on most transceivers, not garbled data, because the receiver sees an inverted differential signal and rejects every frame. That makes a reversed pair a fast hypothesis to eliminate: swap the two conductors and retest before investigating anything else.

Q5: Do I need a termination resistor, and where does it go?

Yes, on both physical ends of the trunk, using 120 ohm. Missing termination shows up as errors that appear only at higher baud rates or longer cable. Do not fit termination at every node, and keep stubs short, because extra terminators load the bus and reduce the drive margin.

Q6: Can UART be used with multiple devices?

Not directly. UART is point-to-point, so a multi-node network needs either one port per device, an external multiplexer, or a proper bus layer such as RS485. Multidrop over RS485 works because the electrical standard defines how several drivers share one pair and turn off when idle.

9. Practical Checklist Before You Wire Anything

  1. Decide by cable, not by data rate. As long as the link stays inside the enclosure, UART is enough. The moment it leaves, move to a differential layer.
  2. Match the three serial parameters before blaming hardware. Baud rate, parity and stop bits - in that order, on both ends, read from the device manual rather than the configuration file.
  3. Terminate both physical ends, once. 120 ohm at each end of the trunk, nothing at the intermediate nodes.
  4. Give the direction pin a timing budget. If the transceiver switches late, the last byte of every response is lost, and the fault will present as a protocol error rather than a wiring error.
  5. Verify the physical layer on site. Twisted pair, defined ground reference, short stubs and an antenna with a clear view - the datasheet figures assume all of them.