2020-10-30 02:03:12 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Fundamental board constants
|
|
|
|
#define VCC_VOLTS (3.3f)
|
|
|
|
#define HALF_VCC (VCC_VOLTS / 2)
|
|
|
|
#define ADC_MAX_COUNT (4095)
|
2020-11-03 01:52:19 -08:00
|
|
|
#define ADC_OVERSAMPLE 24
|
2020-10-30 02:03:12 -07:00
|
|
|
|
|
|
|
// *******************************
|
|
|
|
// Nernst voltage & ESR sense
|
|
|
|
// *******************************
|
|
|
|
#define NERNST_INPUT_GAIN (1 / 2.7f)
|
|
|
|
|
|
|
|
// Nernst AC injection resistor value
|
|
|
|
#define ESR_SUPPLY_R (22000)
|
|
|
|
|
|
|
|
// *******************************
|
|
|
|
// Pump current sense
|
|
|
|
// *******************************
|
|
|
|
|
|
|
|
#define PUMP_CURRENT_SENSE_GAIN (10)
|
|
|
|
|
|
|
|
// LSU sense resistor - 61.9 ohms
|
|
|
|
#define LSU_SENSE_R (61.9f)
|
|
|
|
|
|
|
|
// *******************************
|
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
|
|
|
|
#define HEATER_TARGET_ESR 300
|