Publicado 2026-11-27
When working on robots or smart gimbals, one common issue is the difference between the communication interfaces used by the controller and the servos.
However, many bus servos use a single-wire half-duplex communication interface. Commands sent by the controller and feedback data returned by the servo share the same DATA_Bus signal line.
Connecting these two interfaces directly is not a good idea. One possible approach is to connect TXD and RXD together and then connect them to the servo data line. But when the controller sends data, the same data will also appear at its own RXD input. If the servo starts sending data at the same time, both sides may drive the bus simultaneously, causing signal conflicts.
The conversion circuit itself is actually quite simple. When designing your own controller board, you don't necessarily need an additional serial converter module. Two single-channel tri-state buffer ICs can handle the transmit and receive switching.
With full-duplex UART communication, transmitting and receiving use separate signal lines. The controller sends data through TXD and receives data through RXD. Both operations can take place independently.
Half-duplex communication works differently. Both transmission and reception share the same DATA_Bus line. The controller needs to use the bus when sending commands, then release it so the servo can return its data.
U6: SN74LVC1G126DBVR — used in the transmit path, with an active-high output enable.
U1: SN74LVC1G125 — used in the receive path, with an active-low output enable.
Let's start with the transmit circuit, U6.
The SN74LVC1G126 has an OE pin at pin 1, an input A at pin 2, and an output Y at pin 4. When OE is high, the signal passes from A to Y. When OE is low, the Y output enters a high-impedance state.
Now let's look at the receive circuit, U1.
The SN74LVC1G125 has a similar pin arrangement, but its OE input is active-low. When OE is low, the signal passes from A to Y. When OE is high, the output enters a high-impedance state.
Its A input connects to DATA_Bus, and its Y output connects to the ESP32-S3 RXD pin.
U6 enables the transmit path. Data sent from the ESP32-S3 TXD pin passes through U6 and reaches DATA_Bus. At the same time, U1 disables its output, preventing the transmitted data from being fed back into the controller's RXD input.
U6 disables its output and releases DATA_Bus, while U1 enables the receive path. Data returned by the servo passes through U1 and reaches the ESP32-S3 RXD pin.
In this way, the DIR signal switches between transmission and reception, preventing both buffer outputs from actively driving the bus at the same time.
| Señal | Pin / Connection | Función |
| TXD | ESP32-S3 IO4 → U6 pin 2 | UART data transmission |
| RXD | U1 pin 4 → ESP32-S3 IO5 | UART data reception |
| DIR | ESP32-S3 IO6 → U6 and U1 pin 1 | Transmit and receive direction control |
| DATA_Bus | U6 pin 4, U1 pin 2 and servo connectors | Shared servo communication line |
| VBAT_SW | Servo connector pin 2 | Servo power supply |
| Tierra | Servo connector pin 1 | Power and signal ground |
R9 is a 4.7kΩ resistor connected between 3.3V and DATA_Bus as a pull-up resistor.
Its purpose is to provide a defined HIGH level when no device is actively driving the bus. Without a pull-up, the bus may remain in a high-impedance state and become more susceptible to electrical interference.
Another detail worth considering during PCB design is the DIR signal. I recommend considering a 10kΩ pull-down resistor on this line. When the ESP32-S3 is powering up or being reset, its GPIO pins may not yet be configured for normal operation. An external pull-down can help keep the circuit in receive mode by default and reduce the chance of unwanted transmission during startup.
The RXD line may also need a pull-up resistor, depending on the actual circuit, or its internal pull-up can be enabled in software. During transmission, U1's output is in a high-impedance state, so RXD may otherwise be affected by interference.
There is also a practical detail regarding the servo connectors. H1 to H4 are connected in parallel and share the same VBAT_SW, GND and DATA_Bus lines. This makes wiring more convenient, especially when servos are installed at different joints of a robot.
After completing the hardware connections, there is another detail to pay attention to in the software.
Sometimes the servo responds normally to position commands, but when reading its position or other feedback data, packets may occasionally be lost. In some cases, even the first byte of the returned data is incorrect.
This is not necessarily a wiring problem. The DIR signal may simply be switching too early.
Serial1.write()ouart_write_bytes() usually places the data into the transmission buffer. It does not necessarily mean that the last byte has already been transmitted from the TXD pin.If DIR is immediately pulled LOW, U6 will disable its output. The last byte may still be waiting in the UART hardware to finish transmission. The servo then receives an incomplete data packet.
// 1. Switch to transmit mode digitalWrite(DIR_PIN, HIGH); // 2. Send the data packet Serial1.write(tx_buf, len); // 3. Wait until UART transmission is complete Serial1.flush(); // ESP-IDF can use uart_wait_tx_done() // 4. Release the bus and switch to receive mode digitalWrite(DIR_PIN, LOW);
One thing to keep in mind is that the exact behavior of flush() depends on the Arduino core version being used. The important point is to make sure the UART hardware has finished sending the last byte, rather than simply clearing the software buffer.
After switching to receive mode, the program should also use an appropriate timeout based on the servo's response time instead of waiting indefinitely.
When using a microcontroller to control bus servos, converting a full-duplex UART interface to a single-wire half-duplex bus does not always require a dedicated converter module.
As shown in this design, two tri-state buffer ICs, the SN74LVC1G126 and SN74LVC1G125, can be used to control the transmit and receive paths separately. A DIR signal then handles the direction switching.
If you are designing your own bus servo controller board, this circuit can serve as a practical hardware reference. The circuit itself is not particularly complicated, but several details deserve attention, including the output-enable logic, bus pull-up, default state during power-up and UART transmission timing.
Getting these details right makes it easier to integrate the communication interface into your own robot controller.
Bus servos integrate an onboard MCU with an accessible register table. Depending on the model, you can rewrite PID parameters to match heavy linkages, cap maximum torque or current limits, set acceleration profiles, and configure temperature or stall protection thresholds.
Comparison | servomotor | Bus Servo |
Interfaz de control | PWM pulse signal (500–2500 µs) | Half-duplex serial bus (UART/TTL or RS-485) with ID addressing |
Wiring and pin usage | One dedicated PWM pin and cable per servo | Shared bus lines via daisy-chain or hub; saves controller I/O |
Status feedback | None built in; requires external sensors | Reads back position, current, voltage, and temperature |
Parameter adjustment | Hardcoded in internal circuit/firmware | Register read/write for PID gains, current limits, and protections |
System debugging | Probe signal directly with an oscilloscope | Check baud rates, ID conflicts, packet timeouts, and register values |
You do not always need a bus servo. For RC aircraft control surfaces, simple pan-tilt mounts, or small desktop mechanisms with a handful of axes and stable loads, PWM servos are cheaper, faster to wire up, and trivial to debug with an oscilloscope. If your MCU has spare timer pins and you don't need telemetry, keep it simple.
Update Time:2026-11-27
Comuníquese con el especialista en productos de Kpower para recomendarle un motor o caja de cambios adecuado para su producto.