wideband/firmware/wideband_config.h

57 lines
1.5 KiB
C
Raw Normal View History

2020-10-30 02:03:12 -07:00
#pragma once
2021-12-27 20:42:57 -08:00
#include "io_pins.h"
2022-01-28 11:21:38 -08:00
#include "wideband_board_config.h"
2020-10-30 02:03:12 -07:00
// *******************************
// Defaults
// *******************************
#ifndef EGT_CHANNELS
#define EGT_CHANNELS 0
#endif
2020-10-30 02:03:12 -07:00
// *******************************
// Nernst voltage & ESR sense
// *******************************
2021-06-03 20:50:39 -07:00
// Heater low pass filter
#define ESR_SENSE_ALPHA (0.002f)
2020-10-30 02:03:12 -07:00
// *******************************
// Pump current sense
// *******************************
#define PUMP_CURRENT_SENSE_GAIN (10)
// LSU sense resistor - 61.9 ohms
#define LSU_SENSE_R (61.9f)
2020-12-15 14:41:09 -08:00
// Pump low pass filter alpha
2021-06-03 20:50:39 -07:00
// sampling at 2.5khz, alpha of 0.01 gives about 50hz bandwidth
#define PUMP_FILTER_ALPHA (0.02f)
2020-12-15 14:41:09 -08:00
2020-10-30 02:03:12 -07:00
// *******************************
2020-10-31 16:59:35 -07:00
// Pump controller
2020-10-30 02:03:12 -07:00
// *******************************
2020-10-31 16:59:35 -07:00
#define NERNST_TARGET (0.45f)
2020-10-31 14:58:34 -07:00
// *******************************
// Heater controller config
// *******************************
#define HEATER_CONTROL_PERIOD 50
2020-12-10 22:08:00 -08:00
#define HEATER_PREHEAT_TIME 5
#define HEATER_WARMUP_TIMEOUT 60
2020-12-10 22:08:00 -08:00
#define HEATER_BATTERY_STAB_TIME 0.5f
// minimal battery voltage to start heating without CAN command
#define HEATER_BATTERY_ON_VOLTAGE 9.5
// mininal battery voltage to continue heating
#define HEATER_BATTETY_OFF_VOLTAGE 8.5
2024-06-25 23:40:39 -07:00
// *******************************
// Start driving the pump just before we're at target temperature
// minus this offset to avoid Vnerns voltage clamp near 0V
// *******************************
#define START_PUMP_TEMP_OFFSET (200.0)