Welcome to MicroROS V2 Robot Car repository
3. Introduction to MicroROS V2 Control Board
MicroROS-V2 Controller Board Introduction
The MicroROS-V2 controller board is a ROS 2 robot controller based on the ESP32-S3-WROOM-1U-N4R2 module. The current version features onboard dual-channel encoder motor drivers, dual-channel PWM servo interfaces, a QMI8658B six-axis IMU, a buzzer, and status LEDs, and provides interfaces for the lidar, WiFi image transmission module, OLED, USB Host gamepad, and serial flashing/debugging.
Onboard Resources

| Onboard resource | Description |
|---|---|
| Battery interface | Connects a 12V battery to power the controller board and the robot. |
| Charging interface | Connects the charging power supply to charge the battery. |
| Power switch | Controls the power on/off of the entire board. |
| Reset button | Resets the ESP32-S3 main controller. |
| Left/right motor interfaces | Connect two DC motors with Hall encoders; the interfaces carry both motor drive and encoder signals. |
| Servo pan-tilt interface | Provides S1 and S2, two channels of PWM servo control signals, as well as power. |
| Lidar interface | Connects the T-mini Plus lidar, communicating via UART1. |
| WiFi image transmission module interface | Connects the companion image transmission/camera module, communicating via UART2. |
| OLED interface | Connects the I2C OLED display, using an independent I2C1 bus. |
| USB Host gamepad interface | Connects the USB gamepad receiver; the data lines use the ESP32-S3 native USB D-/D+. |
| Type-C flashing/debugging interface | Used for firmware flashing, parameter configuration, and UART0 serial debugging. |
| Custom button | KEY1 user button, active low, whose function can be defined by the firmware. |
| Buzzer | Onboard passive buzzer for status and low-voltage alarms. |
| Status LEDs | Onboard blue and green MCU status LEDs. |
| Six-axis IMU | Onboard QMI8658B accelerometer and gyroscope. |
| ESP32-S3 module | The main controller of the board, responsible for motors, sensors, communication, and micro-ROS functionality. |
GPIO Pin Assignment

In the following, the directions of TX and RX are defined relative to the ESP32-S3 main controller. For example, UART1 TX means data is sent from the ESP32-S3 to the lidar; when wiring, it should be connected to the lidar's RX.
Motors and Encoders
| Interface/Function | Schematic net name | ESP32-S3 GPIO | MCU direction |
|---|---|---|---|
| Left motor M1 drive A | M1A | GPIO13 | Output |
| Left motor M1 drive B | M1B | GPIO14 | Output |
| Left motor M1 encoder A | H1A | GPIO5 | Input |
| Left motor M1 encoder B | H1B | GPIO4 | Input |
| Right motor M2 drive A | M2A | GPIO11 | Output |
| Right motor M2 drive B | M2B | GPIO12 | Output |
| Right motor M2 encoder A | H2A | GPIO7 | Input |
| Right motor M2 encoder B | H2B | GPIO6 | Input |
Servos, Display, and IMU
| Interface/Function | Schematic net name | ESP32-S3 GPIO | Description |
|---|---|---|---|
| Servo S1 | S1 | GPIO8 | PWM output; used by the firmware for the horizontal (pan) direction |
| Servo S2 | S2 | GPIO16 | PWM output; used by the firmware for the pitch direction |
| OLED data | SDA | GPIO1 | I2C1 SDA |
| OLED clock | SCL | GPIO2 | I2C1 SCL |
| IMU data | I2C-SDA | GPIO40 | I2C0 SDA |
| IMU clock | I2C-SCL | GPIO39 | I2C0 SCL |
| IMU interrupt | INT | GPIO41 | IMU interrupt input |
OLED and IMU use two independent I2C buses and must not be wired to the same set of SDA/SCL pins.
Serial Port and USB
| Interface/Function | Schematic net name | ESP32-S3 GPIO | Connection |
|---|---|---|---|
| Lidar UART1 TX | TXD1 | GPIO17 | ESP32-S3 TX -> lidar RX |
| Lidar UART1 RX | RXD1 | GPIO18 | ESP32-S3 RX <- lidar TX |
| WiFi image transmission UART2 TX | TXD2 | GPIO36 | ESP32-S3 TX -> image transmission module RX |
| WiFi image transmission UART2 RX | RXD2 | GPIO35 | ESP32-S3 RX <- image transmission module TX |
| Flashing/debugging UART0 TX | TXD0 | GPIO43 | ESP32-S3 TX -> USB-to-serial RX |
| Flashing/debugging UART0 RX | RXD0 | GPIO44 | ESP32-S3 RX <- USB-to-serial TX |
| USB Host D- | D1- | GPIO19 | Native USB data line D- |
| USB Host D+ | D1+ | GPIO20 | Native USB data line D+ |
Buttons, Detection, and Status Output
| Interface/Function | Schematic net name | ESP32-S3 GPIO | Description |
|---|---|---|---|
| Battery voltage detection | BAT | GPIO3 | ADC input |
| Custom button | KEY1 | GPIO42 | Digital input, active low |
| Download/BOOT control | IO0 | GPIO0 | Boot configuration pin |
| Buzzer | Buzzer | GPIO47 | PWM output, drives the passive buzzer |
| Blue status LED | LED1 | GPIO48 | Digital output, lights up on high level |
| Green status LED | LED2 | GPIO45 | Digital output, lights up on high level |
Wiring Notes
- The logic level of the ESP32-S3 GPIOs is 3.3V, and the GPIOs are not 5V tolerant; do not connect the 5V power pin of an interface directly to a GPIO signal pin.
- UART must be cross-connected: connect this board's
TXto the peripheral'sRX, and this board'sRXto the peripheral'sTX, and make sure the two ends share a common ground. - The numbering of motors M1/M2 follows the schematic net names; the left/right orientation depends on the current firmware configuration. When adjusting the mechanical mounting orientation, do not swap the encoder A/B definitions.
- GPIO0 is the boot configuration pin; during startup or reset, do not hold it externally low for a long time, otherwise the board may enter download mode.
- Before connecting or disconnecting motors, servos, the lidar, and image transmission modules, it is recommended to turn off the controller board power first.