Pinecil v2 tune via PID (#1827)

* Start PWM after adc irq fully done

* Filter len 4

* Use comparitor 2 on timer for wrap around

* Update IRQ.cpp

* Tip measurements are uint16_t

Update BSP.cpp

Update BSP.cpp

* WiP PID

move pid tuning to config

Update PIDThread.cpp

* Handle PWM Timer gitchy comparitor

* Tuning

* Dampen with Kd

* Cleaning up

* Use TemperatureType_t for getTipTemp()

* Add small rolling average to user GUI temp to reduce flicker

* Trigger PID when adc is skipped (will use old values)
This commit is contained in:
Ben V. Brown
2023-10-21 08:21:08 +11:00
committed by GitHub
parent 9c7ad43a76
commit c308fe8cc2
16 changed files with 271 additions and 178 deletions

View File

@@ -160,10 +160,16 @@
#define HALL_SI7210
#define DEBUG_UART_OUTPUT
#define HAS_POWER_DEBUG_MENU
#define HARDWARE_MAX_WATTAGE_X10 750
#define BLE_ENABLED
#define NEEDS_VBUS_PROBE 0
#define CANT_DIRECT_READ_SETTINGS
#define HARDWARE_MAX_WATTAGE_X10 750
#define BLE_ENABLED // We have a BLE stack
#define NEEDS_VBUS_PROBE 0 // No vbus probe, its not connected in pcb
#define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache
#define TIP_CONTROL_PID // We use PID rather than integrator
#define TIP_PID_KP 45 // Reasonable compromise for most tips so far
#define TIP_PID_KI 9 // About as high for stability across tips
#define TIP_PID_KD 200 // Helps dampen smaller tips; ~= nothing for larger tips
#define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display
#endif /* Pinecilv2 */
#define FLASH_PAGE_SIZE (1024) // Read pages