Commit Graph

62 Commits

Author SHA1 Message Date
rusefillc 36d57e7d73
TS: report heater effective voltage (#225)
(cherry picked from commit c37180517d5522876a7efb7fcc17a3ca40ffee9f)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-17 14:10:38 -07:00
Matthew Kennedy 9d4fabeda7 Use temperature thresholds instead of ESR thresholds 2023-03-22 14:59:52 -07:00
Andrey G e9b942df31
heater_control: hanle no supply state (#219) 2023-03-21 11:20:19 -07:00
rusefillc b5ed6d3af7
heater_control: smarter PWM duty limiting for VBat measurement (#196)
Apply duty cycle limit only 2 cycles of 20 (per second). This
allows 100% duty PWM while heating sensor on low VBat.

(cherry picked from commit 28a01bd6c3dad0d0712a3b6412b9e87fe514555b)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-25 11:51:12 -08:00
rusefillc 4148ba1567
heater: do index to channels mapping in all cases (#189)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-05 12:39:21 -08:00
rusefillc f4bd1a4197
Smaller version of heater settings for other types of sensors (#183)
* heater settings for other types of sensors

* port: GetSensorType

* fancier C++ version

* fancier C++ version

* Why not a function

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-02-01 11:43:52 -08:00
Andrey G 1aa7c661f6
f1_rev and threads (#173)
* f1_rev3: high speed (strenght) for heater PWM output

* threads: set name for all thread

* f1_dual: enalbe CH_CFG_USE_REGISTRY so GDB can see thread

* f1_rev3: enalbe CH_CFG_USE_REGISTRY so GDB can see thread
2022-12-12 19:29:32 -08:00
Matthew Kennedy 1584b1ff4d save ram 2022-12-01 15:51:21 -08:00
Andrey G cddcd0d88c
Multichannel (#134)
* Multichannel AFR

* heater: fixes for multi channel mode

* f1_dual: fix configuration names

* pump_dac: fixes for multi-channel mode

* pwm: fixes for multichannel mode

* pump_control: reference instead of pointer

* sampling: reference instead of pointer

* heater_control: reference instead of pointer

* sampling: comment about heater/battery voltage

* f0_module: fixes for multi-channel update

* f1_rev2: fix for multichannel AFR

* hello rev 3

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-08-29 17:19:30 -07:00
rusefillc b298389fb5
Bat measurment (#113)
* board: f1_dual: add way to measure battery through Heater-

* heater_control: allow board to limit max heater duty

* board: f1_dual: use max sample for battery measurement, filter

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 00:07:13 -07:00
Andrey G d3e460a9a6
Uart debug (#64)
* heater: export state and description

* pump_dac: save and export Ipump

* float interpolation helpers

* Show heater state, heater duty, temperature and fault over uart

* uart: more stack for thread
2022-05-11 01:41:07 -07:00
Matthew Kennedy 2a2b438fc6 static 2022-04-06 17:23:18 -07:00
Andrey G bc0686c826
Smarter state machine to use internal vbatt when CAN not connected (#57)
* Smarter state machine to use internal vbatt when CAN not connected

* Style
2022-04-06 14:07:39 -07:00
Matthew Kennedy 66b891bf79 heater controller pulls from CAN world instead of push 2022-04-06 01:22:09 -07:00
Matthew Kennedy a376b54b55 report duty as float 2022-01-26 10:56:58 -08:00
rusefillc 3a5dc0208e
static (#49)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-01-25 19:11:57 -08:00
Matthew Kennedy 6557809da2 send heater duty 2022-01-04 11:16:46 -08:00
Matthew Kennedy 2bda28226a extract fault 2022-01-01 21:10:55 -08:00
Matthew Kennedy 8cb60d5b18 pal heater device 2021-12-27 20:42:57 -08:00
Matthew Kennedy f675c63279 comment 2021-11-04 15:07:47 -07:00
Matthew Kennedy 0a117089b8 uppercase functions 2021-11-03 23:02:11 -07:00
Matthew Kennedy 10cbc928b0 make reality match the comment 2021-07-16 10:36:05 -07:00
Matthew Kennedy 18cc209f72 listen to heater enable bit 2021-07-15 21:50:22 -07:00
Matthew Kennedy 24cdee9c28 correct preheat duty 2021-07-15 21:48:24 -07:00
Matthew Kennedy e501510e80 less D 2021-07-12 23:49:55 -07:00
Matthew Kennedy 1119d79856 heater tweaks 2021-07-12 23:45:35 -07:00
Matthew Kennedy 21a3ae4939 overvolt protect 2021-07-12 22:44:42 -07:00
Matthew Kennedy 24fe166799 pid tuning, overvolt protect 2021-07-12 22:40:47 -07:00
Matthew Kennedy 00ba70522b heater control 2021-07-12 15:46:10 -07:00
Matthew Kennedy 9ff5df55fd name 2021-07-12 15:33:10 -07:00
Matthew Kennedy 7176ecb6c8 duty cycle math 2021-07-12 15:32:45 -07:00
Matthew Kennedy d645855adb get battery voltage from CAN 2021-07-12 15:31:02 -07:00
Matthew Kennedy a0f1b27c4d start on heater voltage control 2021-07-12 15:24:20 -07:00
Matthew Kennedy d3f90f2054 heater fiddling 2021-07-09 23:15:24 -07:00
Matthew Kennedy c12f4b7e43 dterm science 2021-07-09 11:22:33 -07:00
Matthew Kennedy b44fe3b98c add D term 2021-07-09 11:16:46 -07:00
Matthew Kennedy 26e46dd77a relax heater PI 2021-07-08 22:23:01 -07:00
Matthew Kennedy f9d94f1695 wait to start heater 2021-06-03 21:03:41 -07:00
Matthew Kennedy f4c3dfd74d clarify heater ramp math 2021-04-26 17:40:06 -07:00
Matthew Kennedy 31288634a0 correct ramp 2021-03-17 23:40:07 -07:00
Matthew Kennedy bf8bfb627a unused 2021-02-25 22:48:24 -08:00
Matthew Kennedy a972b99882 adjust control loop gains 2021-01-30 16:08:16 -08:00
Matthew Kennedy cce888559e relax heater control a bit 2021-01-15 21:51:14 -08:00
Matthew Kennedy 6e9c259c8f adjust wamup ramp to match datasheet 2020-12-25 22:46:07 -08:00
Matthew Kennedy 495819659d heater too 2020-12-15 15:00:11 -08:00
Matthew Kennedy e3ebe524e4 fast warmup 2020-12-13 17:24:33 -08:00
Matthew Kennedy 770283accd simpify 2020-12-11 16:50:06 -08:00
Matthew Kennedy 5c9acd4c66 detect underheat fault 2020-12-11 15:46:03 -08:00
Matthew Kennedy 94828339f9 clamp pid 2020-12-11 15:24:56 -08:00
Matthew Kennedy a8bdedaef6 actually stop if overheated 2020-12-11 15:10:04 -08:00