added piggyback PCB for ACU-DCDC, calibrated VSense
This commit is contained in:
@ -11,16 +11,16 @@
|
||||
#include "stm32f3xx_hal.h"
|
||||
|
||||
// convert ADC quants to V
|
||||
#define ADC_V_FACTOR ((3.3f / 4095) * (3.3f / 3.14f)) // 3.3V / 12bit
|
||||
#define ADC_V_FACTOR (3.3f / 4095) // 3.3V / 12bit
|
||||
// scale to LV by divider to mV
|
||||
#define LV_SENSE_FACTOR (1e3 * (ADC_V_FACTOR * ((12.f + 1.8f) / 1.8f))) // scaled with voltage divider
|
||||
#define LV_SENSE_FACTOR (1e3 * (ADC_V_FACTOR * ((12.f + 1.8f) / 1.8f)) * 1.054f) // scaled with voltage divider and measured deviation
|
||||
|
||||
// convert ADC quants to I_S in mA
|
||||
#define CURR_SENSE_IS_FACTOR_9A (ADC_V_FACTOR / 1.2f) // 3.3V / 12bit / 1.2kOhm
|
||||
#define CURR_SENSE_IS_FACTOR_4_5A (ADC_V_FACTOR / 1.f)
|
||||
#define CURR_SENSE_IS_FACTOR_1A (ADC_V_FACTOR / 4.f)
|
||||
#define CURR_SENSE_IS_FACTOR_4_5A (ADC_V_FACTOR / 1.f) // 3.3V / 12bit / 1kOhm
|
||||
#define CURR_SENSE_IS_FACTOR_1A (ADC_V_FACTOR / 4.f) // 3.3V / 12bit / 4kOhm
|
||||
// convert ADC quants to I_L in mA
|
||||
#define CURR_SENSE_FACTOR_1A (300 * CURR_SENSE_IS_FACTOR_1A) // typical current sense ratio (datasheet PROFET)
|
||||
#define CURR_SENSE_FACTOR_1A (300 * CURR_SENSE_IS_FACTOR_1A) // typical current sense ratio, (k_ILIS in datasheet of PROFET)
|
||||
#define CURR_SENSE_FACTOR_4_5A (1500 * CURR_SENSE_IS_FACTOR_4_5A)
|
||||
#define CURR_SENSE_FACTOR_9A (3900 * CURR_SENSE_IS_FACTOR_9A)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user