Welcome to ROS Robot Expansion Board repository
1.1Expansion Board Introduction_V4.0
Expansion Board V4.0 Introduction
Applicable hardware: YHBOOM YB-ERF01-V4.0
The expansion board is the low-level control board of the robot car. It carries an STM32 microcontroller that manages the various peripherals on the board. The mainboard or a computer sends commands through the micro USB serial port; the microcontroller receives and parses them, then drives the corresponding peripherals to perform actions.
On-board resources include: DC 12V / 5V power connectors, micro USB and SWD connectors, CAN / SBUS / I2C / serial servo connectors, a 6-axis attitude sensor, a magnetometer, 4 motor connectors, 4 PWM servo connectors, an RGB LED strip connector, an active buzzer, as well as buttons and indicator LEDs.
1.1 Component Layout on the Front of the Expansion Board

Figure 1-1 Component layout on the front of the expansion board (the numbers in the figure correspond one-to-one with the "No." column in the table below)
Power and Switches
| No. | Component | Description |
|---|---|---|
| 1 | T-type DC 12V power input connector | Main power input of the expansion board; connects to a DC 12V power supply or a 12V battery pack |
| 2 | DC 12V power output | Provides DC 12V power externally |
| 4 | Type-C connector | Provides DC 5V externally; supports the Raspberry Pi 5 power protocol and can output 5.1V/5A; power supply only, no communication |
| 5 | DC 5V output connector | Can power a Jetson Nano |
| 8 | DC 12V power output | Provides DC 12V power externally |
| 9 | DC 12V power switch | Main power switch |
Communication and Programming Connectors
| No. | Component | Description |
|---|---|---|
| 3 | micro USB data connector | Communicates with the host computer; can also be used to flash programs |
| 6 | I2C connector | Can connect external I2C devices such as an OLED screen (GND / VCC / SCL / SDA) |
| 13 | CAN connector | Connects CAN devices |
| 15 | SBUS connector | Connects an RC transmitter receiver for model aircraft (G / V / S) |
| 18 | Serial servo connector | Connects a serial-servo robotic arm |
| 23 | SWD debug connector | Connects the SW interface of an ST-Link or J-Link; used to debug the microcontroller or download firmware |
Sensors
| No. | Component | Description |
|---|---|---|
| 11 | 6-axis attitude sensor | Provides the current attitude of the expansion board |
| 12 | Magnetometer sensor | Provides raw magnetometer data |
Buttons, Indicators and Sound
| No. | Component | Description |
|---|---|---|
| 7 | Indicator LEDs | Data indicator LED and 6.8V voltage indicator LED |
| 10 | Button KEY1 | User function button; custom functions can be implemented by programming |
| 14 | RGB LED strip connector | Connects an RGB LED strip |
| 24 | Active buzzer | Used for beeping and alarms |
| 25 | Reset button RESET | Used to restart the program |
| 26 | BOOT0 button | Used to put the microcontroller into programming mode |
Motors and Servos
| No. | Component | Description |
|---|---|---|
| 16 | PWM servo voltage selection | Change the jumper position to select 6.8V or 5V to power the PWM servos |
| 17 | PWM servo connector | Can connect 6.8V or 5V PWM servos; first select the voltage matching the servo at ⑯ |
| 19 | Motor 1 connector (Motor 1) | Connects DC motor M1 |
| 20 | Motor 2 connector (Motor 2) | Connects DC motor M2 |
| 21 | Motor 3 connector (Motor 3) | Connects DC motor M3 |
| 22 | Motor 4 connector (Motor 4) | Connects DC motor M4 |
The specific wiring of the four motor connectors varies by vehicle model; refer to the corresponding course document.
1.2 Component Layout on the Back of the Expansion Board

Figure 1-2 Component layout on the back of the expansion board (the numbering on the back is independent of the front)
| No. | Component | Description |
|---|---|---|
| 1 | On-board microcontroller | Mainly responsible for controlling the peripherals on the expansion board, such as the buzzer and motor driver |
| 2 | Metal push-button switch PH2.0 connector | Can connect an external metal switch in parallel with the on-board power switch; the power is on as long as one of the two switches is turned on |
1.3 FAQ
Question 1: How do I control the expansion board? How do I communicate with it?
Answer: Taking the Jetson Nano as an example, commands are transmitted to the expansion board through the USB port as serial data; the expansion board integrates a microcontroller that receives and parses the serial data and then handles the specific command to execute.
Question 2: How is the robot powered? Does it need a separate power supply?
Answer: The car comes with a battery pack. Insert the battery pack into the T-type DC 12V power connector on the expansion board and turn on the main power switch. The expansion board integrates a voltage conversion chip that provides DC 5V power, which is delivered to the Jetson Nano through the DC 5V power cable (different mainboards can choose their own power connector).
Question 3: Which functions on the expansion board are managed by the microcontroller?
Answer: The parts managed by the microcontroller on the expansion board include: the robotic arm, active buzzer, attitude sensor, PWM servo gimbal, motors, RGB LED strip, KEY1 button, RESET button, SBUS interface, CAN interface, etc.
Question 4: How do I update the microcontroller firmware on the expansion board? Why is it necessary?
Answer: The microcontroller integrated on the expansion board is already flashed with firmware at the factory, so there is no need to update it unless necessary. If you do need to update it, refer to the firmware update tutorial.
Question 5: What is the difference between hardware versions V3.0 and V4.0 of the expansion board?
Answer: In hardware version V4.0, the IMU chip is upgraded to the QMI8658B, plus a QMC5883P magnetometer, forming a 9-axis sensor.