add fanchars

This commit is contained in:
2026-07-06 22:19:43 +02:00
parent 55cf03c015
commit 8182b9efd2
9 changed files with 296 additions and 439 deletions

View File

@@ -82,7 +82,22 @@ Verify access: `test -w /dev/ttyUSB0 && echo ok`
1. Flash firmware and open the serial monitor at 115200 baud.
2. Confirm `TCA9548A detected` and four valid sensor channels (`ch2``ch5`).
3. Tune **heat PI** (stored in EEPROM on autotune complete):
3. Find **stir fan** speed (chamber ~35°C, idle):
```
target 0
fanchars
```
Heats to max **60°C** at **30%, 100%, 60%, 80%** fan (cool to **40°C** avg between each). If the best is not at 30% or 100%, runs once at the midpoint of the two lowest spreads (~13 h). Or: `python3 scripts/fan_characterize.py`. When done:
```
fanchars save
```
Stored PWM is the minimum-stir floor while regulating (≥40°C avg).
4. Tune **heat PI** (stored in EEPROM on autotune complete):
```
target 0
@@ -92,25 +107,9 @@ Verify access: `test -w /dev/ttyUSB0 && echo ok`
Emergency cutoff is fixed at **70°C** — you can autotune at 5055°C with ABS in the chamber while hot corners stay below that.
4. Tune **mix PI** (spread → fan) while drying:
5. Optional: adjust **mix PI** at target if spread still drifts (`mixpi`, `pid save`). Stir fan from step 3 is usually enough to start drying.
```
target 55
log on
```
Watch `spread` in status. Adjust mix gains without reflash:
```
mixpi 40 2
pid save
```
Defaults: heat Kp/Ki from autotune; mix Kp=40 Ki=2 in firmware until tuned.
5. Optional: `stepresp 45 35` logs open-loop fan steps if you want to estimate mix gain before live tuning.
Send `help` over serial for all commands (`target`, `mixpi`, `fan test`, `log on/off`, `status`, `pid`, etc.).
Send `help` over serial for all commands (`target`, `fanchars`, `mixpi`, `fan test`, `log on/off`, `status`, `pid`, etc.).
## Raspberry Pi control