From 1119d79856deb38630a447b13448654d52080698 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Mon, 12 Jul 2021 23:45:35 -0700 Subject: [PATCH] heater tweaks --- firmware/heater_control.cpp | 8 ++++---- firmware/wideband_config.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/heater_control.cpp b/firmware/heater_control.cpp index b8e15c8..44e4ba8 100644 --- a/firmware/heater_control.cpp +++ b/firmware/heater_control.cpp @@ -92,7 +92,7 @@ static float GetVoltageForState(HeaterState state, float heaterEsr) { case HeaterState::Preheat: return 0.04f; case HeaterState::WarmupRamp: - if (rampVoltage < 12) + if (rampVoltage < 10) { // 0.3 volt per second, divided by battery voltage and update rate constexpr float rampRateVoltPerSecond = 0.3f; @@ -135,9 +135,9 @@ static void HeaterThread(void*) state = GetNextState(state, heaterEsr); float heaterVoltage = GetVoltageForState(state, heaterEsr); - // Limit to 13 volts - if (heaterVoltage > 13) { - heaterVoltage = 13; + // Limit to 11 volts + if (heaterVoltage > 11) { + heaterVoltage = 11; } // duty = (V_eff / V_batt) ^ 2 diff --git a/firmware/wideband_config.h b/firmware/wideband_config.h index e8adcc0..59dc3d6 100644 --- a/firmware/wideband_config.h +++ b/firmware/wideband_config.h @@ -44,7 +44,7 @@ #define HEATER_PREHEAT_TIME 5000 #define HEATER_WARMUP_TIMEOUT 30000 -#define HEATER_CLOSED_LOOP_THRESHOLD_ESR 800 +#define HEATER_CLOSED_LOOP_THRESHOLD_ESR 400 #define HEATER_TARGET_ESR 300 #define HEATER_OVERHEAT_ESR 150 -#define HEATER_UNDERHEAT_ESR 1200 +#define HEATER_UNDERHEAT_ESR 600