Skip to main content

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.
Raspberry Pi 5ImSwitch OS40-pin header5 V, UART, SPI7-pin cable12 V + CANHAT+power, safety, CAN masternode 1Panel boardcamera trigger, fan, LEDs, I2CConnector hubone bus in, eight outStepper backpack ×4TMC2209, endstops, encodernodes 10–13 (A, X, Y, Z)Laser interface4 × PWM behind an interlocknode 20Illumination boardRGB rings, white LEDnode 30Galvo interfaceDAC, ±10 V, triggersnode 40CAN GPIO boardE-stop, sensors, I2Cnode 60
The electronics of a FRAME. Click a board to open its page. Every board with a controller also has a USB port for flashing and for testing it without the bus.

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​

BoardWhat it doesControllerFirmware envNodeRev.
HAT+12 V input, 5 V for the Pi, switched bus power, emergency stop, CAN masterESP32-WROOM-32EUC2_canopen_master1F
HAT+ panel boardcamera trigger, fan, LED headers and I2C on the housingnone, driven by the HAT+––B
Stepper backpackone stepper motor with endstops and encoderXIAO ESP32-S3UC2_canopen_slave_motor10 to 13E
Laser interfacefour PWM channels behind a hardware interlockXIAO ESP32-S3UC2_canopen_slave_laser20A
Illumination boardfour RGB LED rings and a white power LEDXIAO ESP32-S3UC2_canopen_slave_led30F
Galvo interfacetwo-axis galvo signal, scan triggersXIAO ESP32-S3UC2_canopen_slave_galvo40B
CAN GPIO boarda few GPIOs, an ADC and I2C on the busXIAO ESP32-S3UC2_canopen_slave_gpio60A-2
Bus and wiring boardsconnector hubs, drag-cable terminal, motor and endstop splittersnone––
PS4 controller bridgegamepad on the busXIAO ESP32-S3UC2_canopen_bridge_ps4_usbhost5

Discovery boxes​

BoardWhat it doesControllerFirmware envRev.
Standalone boardfour steppers, three LED drivers, laser header, endstops, I2C, CAN port. Everything a box needs on one board.ESP32-WROOM-32UC2_canopen_standalone_v4, UC2_4H
USB star-LED driverone high-power LED from a USB-C supplynone–A
Galvo interfacethe same board as in the FRAME, used over USB in the galvo add-onXIAO ESP32-S3UC2_canopen_slave_galvoB
XIAO microscope boardLED, motor and servo outputs for the XIAO microscopeXIAO ESP32-S3uc2-esp32
ODMR boardelectronics of the qBOX ODMR experimentXIAO ESP32-S3 or C3ODMR server (also in the web flasher)

Targets and experiments​

BoardWhat it isRev.
Pinhole slideslide-sized PCB with three pinholes for stage calibration. Also our business card.A
Calibration platewell-plate sized target to map stage positions in ImSwitchE
Holography targetRGB point source of the HoloBoxC
Geodesic LED domeexperimental: flex PCB folded into a dome of 221 LEDs, generated by a scriptA

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​

ItemValue
ConnectorJST XH 4: 1 GND, 2 +12 V, 3 CAN_H, 4 CAN_L
ProtocolCANopen, 500 kbit/s, master = node 1
Termination120 Ω at the two physical ends only. Every board has a solder jumper for it, open by default.
USB serial921600 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​