Ignore:
Timestamp:
May 24, 2023, 1:47:09 PM (2 years ago)
Author:
f.jahn
Message:

12V variant is working good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/firmware/CubeMX/Inc/main.h

    r4 r7  
    5959/* USER CODE BEGIN EFP */
    6060
     61#ifdef VARIANT_24V
    6162#define DISABLE_SHORTCUT_DETECTION_DURING_SWITCH_OFF
     63#endif
    6264
    6365#ifdef DISABLE_SHORTCUT_DETECTION_DURING_SWITCH_OFF
     
    141143/* USER CODE BEGIN Private defines */
    142144
    143 #define INVERTER_CAP_PRECHARGE
    144 
    145145#ifdef DEBUG
    146146        #define DEVICE_TYPE_ID                                          201
     
    148148        #ifdef VARIANT_24V
    149149                #define DEVICE_TYPE_ID                                  202
     150                #define INVERTER_CAP_PRECHARGE
    150151        #else
    151152                #define DEVICE_TYPE_ID                                  201
     
    183184#ifdef VARIANT_24V
    184185        #define CONTROL_CURRENT_A                                       380             // [A] long-term current limit of the device.
    185         #define SHORTCUT_CURRENT_mV                                     2000    // [mV] Some big value to pass test sequence
    186         #define INRUSH_CURRENT_mV                                       1100    // [mV] Some big value to pass test sequence
    187         #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV     100             // [mV] - must be measured on the board
     186        #define SHORTCUT_CURRENT_mV                                     1100    // [mV] Some big value to pass test sequence
     187        #define INRUSH_CURRENT_mV                                       550             // [mV] Some big value to pass test sequence
     188        #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV     200             // [mV] - must be measured on the board
    188189#else
    189190        #define CONTROL_CURRENT_A                                       500             // [A] long-term current limit of the device.
     
    202203#define CURRENT_INTEGRAL_FREQ                                   320000U         // (7.5cycles + 12.5cycles)*1channels + (3.5cycles + 12.5cycles)*5channels = 20 + 80 = 100cycles @ 32MHz = 320 kHz
    203204#ifdef VARIANT_24V
    204         #define CURRENT_INTEGRATION_PERIOD                      575                     // µs
     205        #define CURRENT_INTEGRATION_PERIOD                      1500            // µs
    205206#else
    206207        #define CURRENT_INTEGRATION_PERIOD                      1700            // µs
     
    286287#define COMMAND_TURN_OVERLOAD_DETECTION_ON              30405
    287288
    288 #define U_BAT_CALC_PERIOD                                       5       // ms
     289//#define U_BAT_CALC_PERIOD                                     5       // ms
    289290#ifdef VARIANT_24V
    290291#define U_BAT_CRITICAL_VOLTAGE                          20000 // mV     (If voltage on battery is lower than 10V, then there is a probability that MOSFETs will not open/close properly)
    291292#define U_BAT_RECOVERY_VOLTAGE                          24000 // mV     (If voltage on battery is higher than 12V, then it is fully recovered from possible previous discharge)
    292293#else
    293 #define U_BAT_CRITICAL_VOLTAGE                          10000 // mV     (If voltage on battery is lower than 10V, then there is a probability that MOSFETs will not open/close properly)
    294 #define U_BAT_RECOVERY_VOLTAGE                          12000 // mV     (If voltage on battery is higher than 12V, then it is fully recovered from possible previous discharge)
     294#define U_BAT_CRITICAL_VOLTAGE_mV                       10000 // mV     (If voltage on battery is lower than 10V, then there is a probability that MOSFETs will not open/close properly)
     295#define U_BAT_RECOVERY_VOLTAGE_mV                       12000 // mV     (If voltage on battery is higher than 12V, then it is fully recovered from possible previous discharge)
     296#define ADC_BAT_CRITICAL_VOLTAGE                                ((((U_BAT_CRITICAL_VOLTAGE_mV / 1000) * R22) * (ADC_MAX_VALUE + 1)) / ((R23 + R22) * (ADC_VREF / 1000)))
    295297#endif
    296298
Note: See TracChangeset for help on using the changeset viewer.