Two firmwares ship for the same board. Pick one per node. Do not mix GCSP and CANopen on the same CAN bus.
| Sketch | Version | Protocol | Use |
|---|---|---|---|
GrafitoCANStepper_C3 | 1.12 | GCSP v1 | Python (grafito-canstepper), G-code, multi-node machines |
GrafitoCANStepper_C3_CANopen | 2.1 | CiA 301 / 402 | PLC import (EDS / DCF) |
GCSP v1 — production firmware 1.12
Current production node firmware (S-curve closed loop, encoder LUT, measured precision defaults). Download or preview the full sketch (hosted on this docs site — no private repository access required).
ESP32-C3 GCSP v1 production firmware (fw 1.12 — S-curve + LUT + precision defaults).
// Loading firmware preview…What 1.12 provides
| Area | Notes |
|---|---|
| Motion | Open-loop FastAccelStepper; closed-loop S-curve + Ka (fw ≥1.11) |
| Encoder | MT6701 SSI + optional 200-step LUT (fw ≥1.10) |
| Driver | TMC2209 over UART; OTPW/OT, shorts, StallGuard (fw ≥1.4) |
| Bus | TWAI CAN 1 Mbps, USB serial bridge |
| HOME / IO8 | INPUT_PULLUP; STATUS byte 7 diagnostics (fw ≥1.5) |
| Safety | E-stop latch, fault codes, bus-off recovery |
| Boot (1.9+) | Coils off; enable_on_boot=0; hold ≤5; run capped at 40; standstill freewheel |
| Endstop (1.8+) | Hard defaults every boot: enable=1, active-high=1, action=stop |
| Defaults (1.12) | cl_max_accel=1440, Kp=10, Kd=0.35, Ka=0.04 (bench median |err| 0.13°) |
Full flash procedure (Arduino IDE + arduino-cli, GCSP and CANopen, node
IDs, boot banners, upload failures): Flashing firmware.
Short version: ESP32C3 Dev Module, USB CDC On Boot: Enabled. Libraries: FastAccelStepper, TMC2209 (janelia-arduino). Apply Vin 5–24 V (typically 24 V) before upload — USB-C is data only. See Hardware → Power.
arduino-cli compile --upload -p /dev/ttyACM0 \
--fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
path/to/GrafitoCANStepper_C3Healthy serial banner:
# GrafitoCANStepper fw 1.12 proto 1
# HOME pin GPIO8 INPUT_PULLUP raw=HIGH (strapping: keep HIGH at power-on)
# HOME: INPUT_PULLUP + endstop enable=1 active_high=1 action=stop (fw 1.12)
# LUT: valid=1 enabled=1 peak_INL=2.116 deg
# POWER: enable_on_boot=0 hold<=5 run<=40 standstill=freewheel (fw 1.9)
# MT6701 SSI mode=3 encoder-loss-filter=25ms
# CAN started (1 Mbps)Host API: node.get_driver_status() — see Python library
and Protocol DRIVER.
Motors stay disabled until node.enable() (1.9 does not auto-enable).
Firmware history (GCSP)
| FW | Behaviour |
|---|---|
| ≤1.0 | Pure PI/D chase; default cl_max_speed 30 deg/s |
| 1.1 | Braking-envelope cap (no planned cruise) |
| 1.2 | Trapezoid + velocity feedforward + tracking PID |
| 1.4 | TMC2209 DRIVER telemetry (OTPW/OT, shorts); faults 4/5 |
| 1.5 | STATUS byte 7 — GPIO8 / HOME raw + logical diagnostics |
| 1.7 | HOME raw boot lines; endstop bring-up diagnostics |
| 1.8 | Endstop hard defaults every boot (enable, active-high, stop) |
| 1.9 | Low-power boot: no auto-enable, hold/run caps, freewheel standstill |
| 1.10 | 200-step MT6701 encoder LUT |
| 1.11 | 7-segment S-curve + acceleration feedforward (pid_ka) |
| 1.12 | Precision factory defaults from hardware bench (accel 1440, Kp/Kd/Ka) |
CANopen / CiA 402 — firmware 2.1 (PLC)
Optional SKU for TwinCAT, Codesys, or another CANopen master. Firmware 2.1
uses the same closed-loop motion as GCSP 1.12 (7-segment S-curve, Ka
feedforward, 200-step encoder LUT, accel 1440 °/s², Kp/Kd/Ka = 10 / 0.35 /
0.04). Full page: CANopen / CiA 402.
CANopen CiA 402 sketch (fw 2.1 — S-curve + LUT + GCSP 1.12 defaults). Also download canopen_stack.h from the CANopen page.
// Loading firmware preview…| File | Use |
|---|---|
| GrafitoCANStepper_C3_CANopen.ino | CANopen sketch (fw 2.1) |
| canopen_stack.h | Required header — flash the folder, not the .ino alone |
| GrafitoCANStepper.eds | CiA 306 EDS — fw 2.1 template (replace any 2.0 file) |
| GrafitoCANStepper_Node1.dcf | DCF instance, node 1, 1 Mbps, fw 2.1 |
| GrafitoCANStepper_Node2.dcf | DCF instance, node 2, 1 Mbps (flash CO_FACTORY_NODE_ID=2) |
| object_dictionary.json | Object dictionary (JSON) |
| object_dictionary.csv | Object dictionary (CSV) |
| Grafito_CANStepper_EDS_Configuration_Guide.pdf | PLC / EDS configuration guide (PDF) |
Optional: Wi‑Fi SoftAP test portal
For a phone browser bench UI (SoftAP hotspot + enable/move/endstop), see
Wi‑Fi test portal. That sketch is separate and overwrites
production GCSP until you re-flash GrafitoCANStepper_C3.
Related
- Flashing firmware — Arduino IDE and arduino-cli, both sketches
- CANopen / CiA 402 — EDS, DCF, object dictionary, PLC sequence
- Wi‑Fi test portal — SoftAP + web UI (optional)
- Quickstart — first flash and GCSP motion
- Hardware — pins, power, heatsink / cooling
- Protocol — GCSP wire format and DRIVER bit layout
- Troubleshooting — OTPW / OT, 1.9 motors-off at boot