Electronics
This section documents the circuit boards we currently build for the FRAME and the Discovery boxes: what each one does, its pinout, which firmware runs on it and where the design files are. It is written for people who want to repair, extend or re-use the electronics.
Two ideas explain most of the design:
- One firmware. Every board with a microcontroller runs uc2-esp32, built with a different pin map. A board understands the same JSON commands whether you talk to it over USB or reach it through the bus.
- One cable. In a FRAME, a four-wire cable carries 12 V and CAN from board to board. Each function (a motor, the lasers, the illumination) sits on its own small board with its own controller, close to the thing it drives.
The Raspberry Pi runs ImSwitch and talks serial JSON to the ESP32 on the HAT+. The HAT+ is the CANopen master: it knows which satellite owns which motor or laser and forwards each command there. The Pi can also reach the bus directly through its own CAN controller on the HAT+. Protocol, commands and Python clients are documented in Serial & CANopen interface.
Boards
FRAME, on the CAN bus
| Board | What it does | Controller | Firmware env | Node | Rev. |
|---|---|---|---|---|---|
| HAT+ | 12 V input, 5 V for the Pi, switched bus power, emergency stop, CAN master | ESP32-WROOM-32E | UC2_canopen_master | 1 | F |
| HAT+ panel board | camera trigger, fan, LED headers and I2C on the housing | none, driven by the HAT+ | – | – | B |
| Stepper backpack | one stepper motor with endstops and encoder | XIAO ESP32-S3 | UC2_canopen_slave_motor | 10 to 13 | E |
| Laser interface | four PWM channels behind a hardware interlock | XIAO ESP32-S3 | UC2_canopen_slave_laser | 20 | A |
| Illumination board | four RGB LED rings and a white power LED | XIAO ESP32-S3 | UC2_canopen_slave_led | 30 | F |
| Galvo interface | two-axis galvo signal, scan triggers | XIAO ESP32-S3 | UC2_canopen_slave_galvo | 40 | B |
| CAN GPIO board | a few GPIOs, an ADC and I2C on the bus | XIAO ESP32-S3 | UC2_canopen_slave_gpio | 60 | A-2 |
| Bus and wiring boards | connector hubs, drag-cable terminal, motor and endstop splitters | none | – | – | |
| PS4 controller bridge | gamepad on the bus | XIAO ESP32-S3 | UC2_canopen_bridge_ps4_usbhost | 5 |
Discovery boxes
| Board | What it does | Controller | Firmware env | Rev. |
|---|---|---|---|---|
| Standalone board | four steppers, three LED drivers, laser header, endstops, I2C, CAN port. Everything a box needs on one board. | ESP32-WROOM-32 | UC2_canopen_standalone_v4, UC2_4 | H |
| USB star-LED driver | one high-power LED from a USB-C supply | none | – | A |
| Galvo interface | the same board as in the FRAME, used over USB in the galvo add-on | XIAO ESP32-S3 | UC2_canopen_slave_galvo | B |
| XIAO microscope board | LED, motor and servo outputs for the XIAO microscope | XIAO ESP32-S3 | uc2-esp32 | |
| ODMR board | electronics of the qBOX ODMR experiment | XIAO ESP32-S3 or C3 | ODMR server (also in the web flasher) |
Targets and experiments
| Board | What it is | Rev. |
|---|---|---|
| Pinhole slide | slide-sized PCB with three pinholes for stage calibration. Also our business card. | A |
| Calibration plate | well-plate sized target to map stage positions in ImSwitch | E |
| Holography target | RGB point source of the HoloBox | C |
| Geodesic LED dome | experimental: flex PCB folded into a dome of 221 LEDs, generated by a script | A |
Only boards that are finished and in use are listed. Work in progress (piezo driver) and retired designs stay in the hardware repository until they are ready. Older generations of the standalone board (v2, v3) and the first HAT+ (v1) are kept for owners of those boards.
What every board page contains
- a rendering and a top view with the silkscreen, to find connectors
- connector and controller pinouts, taken from the PCB files of the stated revision
- solder jumpers
- the firmware environment, a link to its pin map and a command to test the board
Flashing
All boards are flashed from the browser at youseetoo.github.io. The procedure, the board names used there and what to do when it fails: Flashing the firmware.
The bus in one table
| Item | Value |
|---|---|
| Connector | JST XH 4: 1 GND, 2 +12 V, 3 CAN_H, 4 CAN_L |
| Protocol | CANopen, 500 kbit/s, master = node 1 |
| Termination | 120 Ω at the two physical ends only. Every board has a solder jumper for it, open by default. |
| USB serial | 921600 baud on the HAT+, 115200 on the standalone board, USB-CDC (any baud rate) on XIAO boards |
Background and wiring rules: CAN bus and power. Node IDs and routing: Boards, roles & node IDs.
Design files, shop, help
- Design files: openUC2/FRAME-electronics-hardware. KiCad projects, schematics as PDF, iBOMs and production files.
- Firmware: youseetoo/uc2-esp32, release binaries in uc2-esp32-binaries.
- Buy assembled boards: shop.openuc2.com. If a board is not listed, ask.
- Questions, bug reports, your own boards: openuc2.discourse.group.