Commit Graph

4 Commits

Author SHA1 Message Date
devdesk
87a05fc80a Replace absolute stall threshold with delta-based detection
- Use exponential moving average (EMA) to track normal running current
- Detect stall when current spikes above average by STALL_DELTA_THRESHOLD (2.0A)
- Add stabilization period (500ms) after motor start to let EMA settle
- Stall confirmation requires spike to persist for STALL_CONFIRM_MS (100ms)
- EMA stops updating during stall to prevent threshold creep
- Removes dependency on absolute current threshold that varied with speed
2026-02-05 18:20:26 +02:00
devdesk
7a6617f9c0 Add stall-based pingpong return mode and calibration improvements
- Add MIN_PWM_PERCENT (20%) to ensure motor starts reliably
- Add CURRENT_CALIBRATION factor (0.33) for accurate current readings
- Add stall-based return option for pingpong mode (returns on stall instead of time)
- Update stall detection: 7A threshold, 1000ms confirm time
- Add DISABLE_STALL_DETECT config option
- Keep last speed setting when motor stops (UI improvement)
- Update webserver UI with 'Return on stall only' checkbox
2026-02-05 17:50:22 +02:00
devdesk
e2fe9aa495 Update stall detection params and expand documentation
- Adjust stall current threshold to 4A and detection time to 2500ms
- Add comprehensive README with hardware specs, wiring diagrams
- Include current sensing circuit documentation and math
- Improve motor and webserver implementations
2026-02-05 16:59:47 +02:00
devdesk
6ccbc7faf5 feat: add ESP32 BTS7960 motor controller with web interface
- Implement MotorController class with PWM speed control (0-100%)
- Add bidirectional control (forward/reverse) via LEDC PWM at 20kHz
- Include optional current sensing and stall detection
- Create responsive web UI with speed slider and direction buttons
- Configure WiFi with static IP (10.81.2.185)
- Use built-in WebServer library for ESP32 Arduino 3.x compatibility
2026-02-05 15:08:47 +02:00