Multi-Channel USB to CAN / UART Converter — RoboMaster Control Interface
📝 AI Assistance Disclosure (click to expand)
This technical documentation has been proofread by Claude-Sonnet-4 for readability, grammar, and formatting consistency. All technical content, project details, circuit designs, and conclusions have been verified and approved by the author.
Interested in my personal writing style? Check out my Stories & Writing for 100% human-authored content.
🤖 Roborambler Club — Open Exchange Notice (click to expand)
This board is designed for Roborambler's RoboMaster robot control system. We welcome other teams to discuss, exchange ideas, and learn from this work.
Please do not copy or reproduce this design without permission.
Background
After discussions between the electrical and software sub-teams, we decided to migrate the robot's control architecture to Linux direct control — having the onboard computer running ROS drive the motors directly, bypassing the STM32 co-controller. This was a pragmatic trade-off given our limited software headcount: one fewer firmware layer to maintain.
This architectural shift created a new hardware need: a converter that plugs into the onboard computer's USB port and provides stable, high-speed, multi-channel CAN and UART interfaces.
System Architecture
At its core, this board is a USB hub with multi-channel converter modules attached to each downstream port.
Hub
The central hub IC is the FE2.1, which provides 7 high-speed USB 2.0 downstream ports. An EEPROM stores additional VID/PID information. The downstream ports are allocated to 4× USB-to-CAN modules and 3× USB-to-UART modules.
Power Management
The power section is more interesting than it first appears.
In Linux, USB device port numbers are determined entirely by power-up order. To guarantee consistent, repeatable port assignments across every boot cycle, each downstream port has its own hardware power-up sequencing switch — an RC network feeding a Schmitt trigger driving a MOSFET — so each channel comes up in a fixed, deterministic sequence.
The board also includes a 5 V → 3.3 V buck converter for the logic ICs, and proper USB-C input protection via an eFuse and TVS diodes.
USB-to-CAN Module
The USB-to-CAN design is based on the open-source candleLight project. Each module is simply an STM32F072 (which has a built-in USB interface) paired with a MAX3051 CAN transceiver. Very Clean.
USB-to-UART Module
Even simpler — a single CH340E per channel handles the full USB-to-UART conversion. Schematic omitted.
Layout & Bring-Up
Rev 1 — First Spin (5 × 6 cm)
All USB data lines were routed as controlled-impedance differential pairs. Board looked clean.
First power-on: only the first USB-to-UART channel — the one directly connected to the raw 5 V rail — was recognized by the host. The other six ports were dead.
A quick debug session found the culprit: a careless component-pick error. The high-side switch in the power sequencing circuit had been placed as an NMOS (AO3400) instead of a PMOS. And to make matters worse, since I had (unknowingly) matched the gate logic to an NMOS, I had also selected a non-inverting Schmitt trigger (74LVC17) — so the overall polarity was consistent, just completely wrong for a high-side switch.
No time for a respin. Small club, no reviewers. Just bypass the switches with 0 Ω resistors and move on.
With the bypass in place, all seven downstream rails came up. The host recognized 3× CH340 and 4× STM32 bootloaders.
After flashing the candleLight firmware onto the STM32s, all four CAN interfaces appeared in Device Manager.
CAN loopback test: paired channels in loopback and swept bitrate. All four channels ran simultaneously up to 9700 Kbps before packet loss — very close to the theoretical USB 2.0 / Classic CAN ceiling. Result: ✅
Rev 2 — Production Version (5 × 5 cm)
With the bug confirmed and root-caused, the redesign was straightforward:
- AO3400 → AO3401: swapped the NMOS for the correct PMOS in the high-side sequencing switch
- 74LVC17 → 74LVC14: replaced the non-inverting Schmitt trigger with the inverting variant to match PMOS gate logic
- Shrank board footprint from 5 × 6 cm → 5 × 5 cm
PCBs are currently out for fabrication. Looking forward to seeing them come back clean! 🚀





