-
-
Notifications
You must be signed in to change notification settings - Fork 0
Motor Setup
This page covers tuning the motor's motion and its two obstruction‑detection
systems. All settings are in the web UI
(http://glasscalibur-XXXXXX.local) and persist across reboots.
No calibration run required. Unlike the old firmware, there is no "Auto Tune" routine and no 5‑cycle learning pass. Glasscalibur knows its exact position from the two limit switches at each end of travel — every time the carriage reaches an end, it re‑zeroes against that switch, so position never drifts. You only need to set the values below to taste.
| Setting | What it does | Tips |
|---|---|---|
| max_speed | Top motor speed (steps/s). | Faster = louder. Lower it if the motor is too noisy or stalls. |
| acceleration | How quickly it ramps to speed. | Lower for a gentler start; keep moderate so moves don't feel sluggish. |
| irun | Run current, 1–31. | Use the lowest value that reliably moves your window. Higher current = more torque and more heat. |
Start with the defaults, then nudge irun up only if the window struggles to
move. The motor has an automatic over‑temperature cutoff at 80 °C (watch
Motor Temperature in Diagnostics), so keeping current modest also keeps it
cool.
Glasscalibur protects against jams, locked windows, and trapped objects/limbs with two independent detectors. Either one stops the motor and saves the position when it trips. Both ship disabled so you can tune them safely before trusting them.
The TMC2209 driver measures the motor's mechanical load electrically and flags a stall when the load spikes — e.g. the window hits an obstruction or is locked.
To tune it:
- Make sure the window is unlocked and clear.
- In StallGuard / Stall Detection, watch the SG_RESULT Sensor while the cover moves under normal load. Note the typical value.
- Set SGTHRS to roughly half of that normal
SG_RESULTreading. Lower SGTHRS = less sensitive; higher = more sensitive. - TCOOLTHRS sets the speed above which StallGuard is active — leave the default unless you change speeds dramatically.
- Turn on StallGuard Enabled and test by gently resisting the window by hand. It should stop.
If it stops too easily, lower SGTHRS; if it never stops, raise it.
A backstop that uses the on‑board accelerometer: a jammed stepper shakes the whole device, and this detector watches for that vibration. It's independent of StallGuard, so it catches stalls StallGuard might miss.
To tune it:
- In Diagnostics, watch Accel X/Y/Z during a normal move versus a deliberately stalled one (hold the window) to get a feel for the difference.
- Set Vibration Threshold (in g) comfortably between "smooth running" and "stalled."
- Vibration Stall Samples is how many consecutive noisy readings (≈200 ms each) are needed before it trips — raise it to avoid false trips from a single bump, lower it for a faster reaction.
- Turn on Vibration Stall Detection and test.
The Diagnostics group tracks how many times each detector has tripped (StallGuard Trips, Vibration Stall Trips) over the life of the device, each with a reset button — handy for spotting a window that needs lubrication or a threshold that's set too tight.
Glasscalibur
Build & install
Set up & control
Integrate & maintain