-
Notifications
You must be signed in to change notification settings - Fork 0
Home
If any information is missing here, please update the wiki or create an issue.
Valar Motion is a family of tiny wireless stepper controllers built around the Trinamic TMC2209 driver. All three boards share the same driver, DC/DC converter, three buttons, USB-C port, and NEMA 17 mounting pattern — they differ in the microcontroller and, on the VAL3101, an onboard magnetic encoder.
| Board | MCU | Radios | Extra |
|---|---|---|---|
| VAL3000 | ESP32-C3 | Wi-Fi | — |
| VAL3100 | ESP32-C6 | Wi-Fi 6 / Thread / Zigbee / Matter / BLE | Status LED, endstop inputs, protected power input |
| VAL3101 | ESP32-C6 | Wi-Fi 6 / Thread / Zigbee / Matter / BLE | Everything on the VAL3100 + AS5600 encoder (closed-loop) |
The VAL3101 is not a separate PCB — it is the VAL3100 board with the AS5600 encoder populated and a diametric magnet on the motor shaft (see hardware/README.md).
Documentation
- Getting Started — flash, join Wi-Fi, first moves
- Web UI Reference — every control explained, with safe values
- StallGuard Tuning — sensorless stall detection setup
- OTA Updates — the GitHub update button and rollback safety
- Building Products — layer your own device on valar-core (how the Ropener and Glasscalibur do it)
- Troubleshooting
Quick links
- Flash prebuilt firmware from your browser using the latest release binaries
- Hardware guide — power, thermal, and mounting notes
- TMC2209 datasheet — please reference it whenever possible
- AS5600 datasheet (VAL3101 encoder)
- Trinamic book (PDF) — in-depth guide to Trinamic drivers
- KiCad sources:
hardware/val3000,hardware/val3100
VAL3000: power comes in on the 2.1 × 5.5 mm barrel jack (center positive).
VAL3100 / VAL3101: power comes in on the barrel jack or the 2-pin terminal block next to it (wired in parallel). The input is protected by a 2 A resettable fuse and reverse-polarity protection, so a backwards supply won't damage the board — though center-positive is still the correct polarity. For programming without a motor supply, just plug in USB-C: a dedicated regulator powers the logic side of the board (the motor will not move without the main supply).
The recommended supply is 12–24 V. The component limits are:
- The TMC2209 has a voltage range of 4.75–29 V
- The DC/DC switching regulator has a voltage range of 3.8–32 V
For stepper motors, higher voltage allows for more torque at higher speeds, as can be seen in Lin Engineering's torque curve calculator. A stepper motor can run at 5 V with maximum torque, but the speed must be kept very low.
Current draw is based on the IRUN setting of the TMC2209. These boards use 0.1 Ω (100 mΩ) current-sense resistors, which allow a maximum motor current of 1.92 A RMS (reference section 8, Selecting Sense Resistors, of the datasheet).
Using higher voltage will result in a lower current draw from the supply. At 24 V, the maximum draw will only be around 1 A at slower speeds.
Because the current setting is a Root Mean Square (RMS) value, multiply it by 1.4 to find the peak current: 1.92 × 1.4 ≈ 2.7 A. If you plan to use the maximum current at very high speed, be sure your power supply can deliver at least 2.7 A.
More current = more heat. While the TMC2209 can operate at 2 A, it will likely trigger the built-in over-temperature alarm and shut down. When it gets too hot, the motor will begin to stutter: it will move a bit, then pause, then move, then pause. Add additional cooling if required, such as a heatsink or fan.
It's recommended to run at 24 V with the current below 1 A, which keeps heat generation much lower.
| Function | ESP32-C3 GPIO |
|---|---|
| TMC2209 UART RX | 5 |
| TMC2209 UART TX | 6 |
| TMC2209 STEP (STEP/DIR mode only) | 10 |
| TMC2209 ENABLE | 8 |
| TMC2209 DIAG (StallGuard) | 1 |
| TMC2209 INDEX | 0 |
| Button 1 | 3 |
| Button 2 | 4 |
| Button 3 (Wi-Fi reset) | 7 |
Read directly from the VAL3100 schematic in hardware/val3100 and matching each board's wrapper in boards/.
| Function | ESP32-C6 GPIO |
|---|---|
| TMC2209 UART TX | 0 |
| TMC2209 UART RX | 1 |
| TMC2209 STEP (STEP/DIR mode only) | 16 |
| TMC2209 DIR (STEP/DIR mode only) | 17 |
| TMC2209 ENABLE | 5 |
| TMC2209 DIAG (StallGuard) | 6 |
| TMC2209 INDEX | 7 |
| Endstop 1 | 18 |
| Endstop 2 | 2 |
| Button 1 | 3 |
| Button 2 | 19 |
| Button 3 (Wi-Fi reset) | 4 |
| Status LED (active HIGH) | 23 |
| AS5600 encoder SDA (VAL3101) | 14 |
| AS5600 encoder SCL (VAL3101) | 15 |
| Spare 4-pin header | 8, 20, 21, 22 |
The three user buttons are hardware-debounced (RC filter), ESD-protected, and active LOW (pulled up to 3.3 V on the board). Note that spare-header GPIO 8 is an ESP32-C6 strapping pin — avoid holding it low at boot.
The AS5600 is a 12-bit contactless magnetic rotary position sensor (4096 counts per revolution). It sits exactly in the center of the NEMA 17 mounting-hole pattern on the back of the board, so when the board is mounted on the motor it reads the true angle of the motor shaft.
To use it:
- Attach a diametric magnet (magnetized across the diameter, not through the thickness) to the rear end of the motor shaft
- Mount the board on the back of the motor using the four M3 mounting holes (31 mm spacing)
The sensor is an AS5600-ASOT, read over I2C (SDA = GPIO 14, SCL = GPIO 15; pull-ups are already on the board) at address 0x36.
Every VAL3100 board already carries the AS5600 footprint and its I2C routing — on a plain VAL3100 the chip is simply left unpopulated. Solder an AS5600 on (plus the shaft magnet) and it becomes a VAL3101.
Because the encoder reports absolute shaft position, the VAL3101 can detect missed steps, verify moves, and know its position even after being moved by hand while powered off (within one revolution). Use it for closed-loop homing instead of StallGuard — the encoder always knows where the shaft is.
Two 2-pin screw terminals accept endstop/limit switches:
- Endstop 1 → GPIO 18
- Endstop 2 → GPIO 2
One pin of each terminal is GND; wire a normally-open switch between the two pins. There are no external pull-ups on these inputs, so enable the internal pull-up in firmware and treat the input as active LOW (reads LOW when the switch closes).
The fastest path: download the prebuilt *.factory.bin for your board from the latest release and flash it from your browser at web.esphome.io with a USB-C cable. To build from source instead, see the repo README.
Note: The USB-C port is connected directly to the ESP32 (USB CDC — there is no USB-to-UART bridge like the CP2102). When flashing a brand-new board for the first time, you may need to manually enter download mode: press and hold the BOOT button, then press and release the RESET button, then release the BOOT button. After one successful upload this happens automatically.
To use the Serial Monitor in Arduino, set Tools → USB CDC on Boot → Enabled.
There are two ways to drive the TMC2209, and the Valar Motion firmware uses the second:
- STEP/DIR interface
- Internal pulse generator
In short: it's recommended to use the internal pulse generator, otherwise the ESP32 cannot be used for any other function.
The ESP32 is connected to the STEP and DIR pins of the TMC2209 (see the pinout tables above). When using the STEP pin, a quick HIGH/LOW pulse is required to make the TMC2209 move one microstep. This pulsing uses the entire CPU cycle, therefore the ESP32 cannot be used for any other task — including Wi-Fi, as that will cause stuttering in the motor. On the VAL3000, two 0 Ω resistors connect the ESP32 to the STEP/DIR pins; remove them to free the pins (the large vias) for use as GPIO.
To use the pulse generator, simply set the velocity you would like to move at over the single-wire UART, such as driver.VACTUAL(500). To stop the motor, set the velocity to zero. Speed, current, microstepping, and StallGuard sensitivity are all tunable live.
To monitor position:
- VAL3000 / VAL3100: count pulses on the TMC2209's INDEX output, which triggers an interrupt the ESP32 registers and counts
- VAL3101: read the AS5600 encoder for the true absolute shaft angle — the recommended approach, since it also catches missed steps and stalls
The four M3 mounting holes are on the standard NEMA 17 31 mm bolt pattern, so the board bolts directly onto the back of the motor. 3D-print standoffs, remove two of the motor's M3 screws, and replace them with two screws about 7 mm longer than the ones you removed. On the VAL3101, don't forget the diametric magnet on the shaft.