Skip to the content
2 layers76.7 × 76.5 mmIobox2, the printed circuit board in 3D

ESP32 MicroSquirt I/O box — CAN bridge that turns MS2/Extra's realtime broadcast into fan/IAC/generic outputs, with a GC9A01 round gauge, 29-bit CAN responder, and 0x710 dash broadcast. Firmware (PlatformIO), KiCad PCB, Windows diag app.

Size
76.7 × 76.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
32
Nets
34
Pads
117
Tracks, vias
205, 0
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
12 Sep 2026
Updated
11 Aug 2026

Overview

Iobox2 is an open-source printed circuit board by grtwall, from the grtwall/esp32_microsquirt_iobox repository on GitHub. It is a 2-layer board of 76.7 × 76.5 mm with 32 parts on 34 nets, routed with 205 tracks and 0 vias.

It is built around the IRLZ44N and ULN2002A. Its parts include 10 resistors, 2 diodes, 2 connectors and 1 fuse. It belongs with the ESP32 boards of this library.

Main components

2

README

README.md

ESP32 MicroSquirt I/O box

DIY clone of the official MicroSquirt "I/O-box" — an ESP32 + SN65HVD230 that listens to the MS2/Extra MicroSquirt CAN realtime broadcast (base ID 0x5F0, 500 kbps) and drives fan, idle control (IAC) and 6 generic low-side outputs, with the same fail-safe the real I/O-box uses (outputs off when CAN goes silent).

Because MS2/Extra has no I/O-box slave protocol (that's an MS3-only feature), this box is an autonomous "smart slave": it computes its own output logic from the broadcast data. It also implements the full Megasquirt 29-bit expansion protocol as a responder (so an MS2/Extra master can drive its outputs/ADC directly), and broadcasts a small 0x710 frame for the in-dash HMI.

Works with any MS2/Extra 3.4.x MicroSquirt V3 — no fuel/spark tune changes needed, only CAN broadcast settings.

status

Features

  • Fan — CLT hysteresis (on ≥ 200 °F / off ≤ 190 °F default, adjustable) or manual override, driven through a ULN2003A channel (default O6/GPIO23).
  • IAC — 30 Hz PWM on GPIO32 → IRLZ44N → 3-wire rotary ISCV. Three modes: Auto (CLT warm-up table + RPM trim), Follow (mirror the ECU's own iacstep → fully TunerStudio-tunable closed-loop idle), or Manual.
  • O1–O6 — generic low-side outputs (ULN2003A): manual, CLT-temp or RPM trigger. O1 defaults to a 7000 rpm shift light.
  • Inputs drive outputs — A1–A4 analog (0-5 V, 0.15 V hysteresis) can force any output or the fan (I/O-box parity).
  • 29-bit CAN responder — MS2/Extra remote-port protocol: MSG_REQ/MSG_CMD on table 7; remote idle PWM, remote on/off outputs, remote boost, ADC readback.
  • 0x710 dash broadcast — A1–A4 threshold latches for the in-dash HMI (indicator/high-beam/brake icons). 10 Hz, always on.
  • GC9A01A round gauge — 1.28" 240×240 idle-control display: big IAC duty %, RPM / target RPM / CLT / idle mode, fan + CAN status line.
  • Fail-safe — all outputs off after 500 ms without CAN (matches the real I/O-box); IAC falls back to the ~1000-1200 rpm valve default.
  • Persistent config — all settings stored in NVS; loadable/settable over serial or via the included Windows diagnostic app.

Repo layout

text
esp32_microsquirt_iobox/
├── firmware/            PlatformIO ESP32 firmware — iobox2 (round display)
├── firmware-v3/         PlatformIO ESP32 firmware — iobox3 (configurable pins, display opt-in)
├── pcb/                 KiCad 8 PCB design (iobox2: schematic, board, project)
├── diag/                iobox_diag.py — Windows test/configure app (Python + Tkinter)
└── docs/
    ├── OPERATION.md     How the box works + how to use it (modes, commands, display)
    ├── PROTOCOL.md      CAN protocol reference (0x5F0 broadcast, 0x710, 29-bit responder)
    ├── BUILD.md         Full point-to-point build/wiring guide
    └── PARTS.md         Parts list with rough prices

Two firmware variants

firmware/ (iobox2)firmware-v3/ (iobox3)
BoardESP32 DevKit + breakout, GC9A01A round displayBare ESP32-WROOM-32 module board, 7" dash on CAN is the HMI
IAC pin32 (compile-time)runtime-configurable (P command / diag app Pins tab)
OutputsO1-O6 = 25,26,27,14,13,23 (compile-time)O1-O7 = 13,12,14,27,26,25,33 default, runtime-configurable
Round displayyesopt-in (P TFT 1; GPIO19 conflicts with IAC)
Switchesnone (removed)none
Use P?no (fixed pins)yes

Both share the same core (CAN broadcast decode, fan, IAC, outputs, engine profile warnings, 29-bit responder, 0x710 dash broadcast). iobox2 = one build for that board; iobox3 = one firmware, pin map set once per board via the diag app.

Quick start

  1. Build hardware — see docs/BUILD.md (wiring) and docs/PARTS.md (parts). The KiCad design in pcb/ is the iobox2 board; the point-to-point build guide is an alternative for module wiring without a PCB. iobox3 is the bare-module 3×3 board — see firmware-v3/README.md.

  2. Flash firmware (pick the folder matching your board):

    sh
    cd firmware        # iobox2  — or:  cd firmware-v3  for iobox3
    pio run                 # build
    pio run --target upload # flash over USB
    pio device monitor -b 115200

    Requires PlatformIO (ESP32 Arduino framework). At the serial prompt type ? for a live status dump. On iobox3, type P to see the pin map (set it once from the diag app's Pins tab if your board is wired differently).

  3. Configure the MicroSquirt (one time) in TunerStudio → CAN Realtime Data Broadcasting: On, base ID 1520, rate 20 Hz, enable groups 00 (rpm), 02 (baro/map/mat/clt), 03 (tps/batt/afr), and optionally 06 (iacstep) for Follow mode. Details in docs/OPERATION.md.

  4. Use the Windows app (diag/iobox_diag.py) to set fan thresholds, IAC mode, output triggers, input mappings, the 29-bit responder and (iobox3) the pin map from a GUI.

Hardware snapshot

GPIOFunctionDrives
5 / 4CAN TX / RXSN65HVD230 (MicroSquirt pins 2/3, CANH/CANL)
32IAC PWM (30 Hz)ISCV via IRLZ44N
25,26,27,14,13,23O1–O6ULN2003A (O6 = fan by default, Y<k> to change)
2Status LEDonboard (CAN heartbeat / fail-safe blink)
36,39,34,35A1–A4 analog 0-5 V10k/20k divider (or PCB 12 V→3.3 V dividers)
15,21,22,19GC9A01A round displaySCLK / MOSI / CS / DC

All outputs are low-side (ground-switching), like the real MS I/O-box. Never feed 12 V into the ESP32 or SN65HVD230 — a 12 V→5 V buck is mandatory.

Serial command cheat sheet

CommandEffect
?status dump
F205 / F1 / F0fan auto @205 °F / manual on / off
E190fan off hysteresis 190 °F
I35 / I / I FIAC manual 35% / auto / follow-ECU
T900idle target 900 rpm (auto mode)
S7000shift light @7000 rpm
O3 R3500 / O4 1O3 above 3500 rpm / O4 on
A1 O2 3.5 / A2 F 2.0analog threshold → output/fan
Y6fan on ULN channel 6
R1 / R0 / RB529-bit responder on/off / box ID
W1 / W0engine profile monitoring on/off
W idle 650 1000idle RPM band (warning below/above, <20% TPS)
W clt 230 / W mat 160max coolant / intake °F
W batt 11.0 16.0 / W map 280battery band / max MAP kPa
W afr 10.0 16.5AFR window (below=RICH, above=LEAN)
W hold 3000 / W warnout 3warn latch ms / blink O3 as check-engine lamp
P IAC 19 / P O3 27iobox3 only — set IAC / output pin
P RESETiobox3 only — restore default pin map
Sfull command list

CAN at a glance

  • ECU → box: 11-bit IDs 0x5F0–0x5F8 (group N at ID 1520+N), big-endian, 8 bytes/group, 20 Hz. rpm@6, baro/map/mat/clt@16-22 (×0.1), tps/batt/afr@24-28 (×0.1), iacstep@54 (×0.392 = duty %).
  • Box → dash: 0x710, byte0 = A1–A4 latches, byte1 = reserved, byte2 = counter.
  • Master → box: 29-bit extended MSG_REQ/MSG_CMD (MS2/Extra remote ports).

Full byte maps and the 29-bit responder spec: docs/PROTOCOL.md.

Project context

Built for a 7A-GTE (7A block + 4A-GE head) MicroSquirt V3 car: the I/O box frees the ECU's FIDLE (moving boost control off it), adds proper PWM idle via the ISCV, handles the radiator fan, and feeds warning-lamp states (indicators, high beam, brake) to a 7" ESP32-S3 in-dash HMI. This box is one of several open-source modules in the Carputer-project ecosystem.

License

Firmware, PCB and tooling in this repo are released for personal/DIY use. See each file header for notes.

Parts

32
QtyValueFootprintReferences
9RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R2, R3, R4, R5, R6, R7, R8, R9
21N5404Diode_THT:D_DO-201AD_P15.24mm_HorizontalD1, D2
2Conn_01x08Connector_Wago:Wago_734-138_1x08_P3.50mm_VerticalJ1, J2
112v inConnector_Wago:Wago_734-132_1x02_P3.50mm_Vertical12vin1
112v-5vConnector_Wago:Wago_734-134_1x04_P3.50mm_Vertical12TO5v1
15vConnector_Wago:Wago_734-134_1x04_P3.50mm_Vertical5v
15voutConnector_Wago:Wago_734-134_1x04_P3.50mm_Vertical5vout1
1CAPCapacitor_THT:CP_Radial_D4.0mm_P1.50mmCAP1
1CARConnector_Wago:Wago_734-135_1x05_P3.50mm_Verticaltocar1
1ESP32Connector_Wago:Wago_734-138_1x08_P3.50mm_Verticaltoesp32
1FuseFuse:Fuseholder_Keystone_3555-2F1
1IACConnector_Wago:Wago_734-133_1x03_P3.50mm_VerticalIDLE1
1IRLZ44NPackage_TO_SOT_THT:TO-220-3_Verticalmosfet1
1RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR10
1ULN2002AULN2003A:DIL16uln1
1canbusConnector_Wago:Wago_734-136_1x06_P3.50mm_Verticalmodule1
1cappCapacitor_THT:CP_Radial_D4.0mm_P1.50mmpower1
1gndConnector_Wago:Wago_734-133_1x03_P3.50mm_Verticalgnd1
1ledLED_THT:LED_SideEmitter_Rectangular_W4.5mm_H1.6mmREFpower
1lrResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontalled
1sensorConnector_Wago:Wago_734-135_1x05_P3.50mm_Verticaltosensor1

The 31 most common of 32 parts.

Similar boards

  • 2 layers120 × 48 mmPCB auto doser, the printed circuit board in 3D

    PCB auto doser

    gabriel-247/auto-doser-aqurium

    Project custom aquarium auto-doser berbasis ESP8266/Wemos dan mobile app.

    33 parts
  • 2 layers142.5 × 99.1 mmSensormodule final, the printed circuit board in 3D

    Sensormodule final

    grtwall/carputer-pcb

    Combined ESP32 sensor + body controller PCB — KiCad project, Gerbers, schematics, BOM

    70 parts
  • 2 layers304.8 × 170.8 mm00Key, the printed circuit board in 3D

    00Key

    ZeroZeroOne-dev/00Key

    00Key a 75% keyboard

    268 parts241GPL-3.0
  • 2 layers94 × 79 mm5 - Lizard Car, the printed circuit board in 3D

    5 - Lizard Car

    TRD-B/Lizard

    3D printed RC race car with custom electronics

    54 parts129CC-BY-4.0
  • 2 layersMorpheus kicad, the printed circuit board in 3D

    Morpheus kicad

    pscrespo/Morpheus-STM32

    A small 3D printer controller board for use with a "blue pill" STM32F1 generic board. Inspired on http://reprap.org/wiki/SinapTec

    66 parts80GPL-3.0
  • 2 layers157.5 × 97.8 mmEsp32PrinterController, the printed circuit board in 3D

    Esp32PrinterController

    MitchBradley/Esp32PrinterController

    PCB design for 3D printer controller using ESP32 processor

    101 parts16MIT
  • 2 layers99.1 × 99.1 mmFlipDotDriver, the printed circuit board in 3D

    FlipDotDriver

    bitluni/FlippyFlip

    49 parts14

Questions

How big is the Iobox2 PCB?

It measures 76.7 × 76.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Iobox2 use?

32 parts, built around the IRLZ44N and ULN2002A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Iobox2 KiCad files?

From the grtwall/esp32_microsquirt_iobox repository on GitHub, at the commit this page was made from: the board is pcb/iobox2.kicad_pcb and its schematic pcb/iobox2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Iobox2 design in my own project?

Its repository states no licence, so its author keeps all rights: ask grtwall before reusing the design.