Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update battery characteristics for more accurate battery level estima… #603

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ROMFS/px4fmu_common/init.d/airframes/4400_ssrc_fog_x
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ param set-default UAVCAN_EC_FUNC4 104
param set-default MPC_XY_VEL_P_ACC 2.4

# Battery parameters
# Ref: tattu 6500mah 4s
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_CHARGED 4.2
param set-default BAT1_V_EMPTY 3.6
param set-default BAT1_V_DIV 18.1
param set-default BAT1_R_INTERNAL -1.0
param set-default BAT1_V_LOAD_DROP 0.3000
param set-default BAT1_R_INTERNAL 0.0011
param set-default BAT1_V_EMPTY 3.5000
param set-default BAT1_SOURCE 0
param set-default BAT1_CAPACITY 6000


param set-default BAT2_N_CELLS 4
param set-default BAT2_V_CHARGED 4.2
param set-default BAT2_V_EMPTY 3.6
param set-default BAT2_V_DIV 18.1
param set-default BAT2_R_INTERNAL -1.0
param set-default BAT2_V_LOAD_DROP 0.3000
param set-default BAT2_R_INTERNAL 0.0011
param set-default BAT2_V_EMPTY 3.5000
param set-default BAT2_SOURCE 0
param set-default BAT2_CAPACITY 6000

# Enable LL40LS in i2c
param set-default SENS_EN_LL40LS 2
Expand Down
23 changes: 19 additions & 4 deletions ROMFS/px4fmu_common/init.d/airframes/4401_ssrc_fog_x_tmotor
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,25 @@ param set-default HIL_ACT_FUNC4 104
param set-default MPC_XY_VEL_P_ACC 2.4

# Battery parameters
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_CHARGED 4.2
param set-default BAT1_V_EMPTY 3.6
# Ref: t-drone 22000mah 6s Lion
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_CHARGED 4.1
param set-default BAT1_V_EMPTY 3.2
param set-default BAT1_V_DIV 18.1
param set-default BAT1_SOURCE 0
# Rough guess 50 mOhm
param set-default BAT1_R_INTERNAL 0.0050
param set-default BAT1_CAPACITY 22000

# Ref: t-drone 22000mah 6s Lion
param set-default BAT2_N_CELLS 6
param set-default BAT2_V_CHARGED 4.1
param set-default BAT2_V_EMPTY 3.2
param set-default BAT2_V_DIV 18.1
param set-default BAT2_SOURCE 0
# Rough guess 50 mOhm
param set-default BAT2_R_INTERNAL 0.0050
param set-default BAT2_CAPACITY 22000

# Enable LL40LS in i2c
param set-default SENS_EN_LL40LS 2
Expand Down Expand Up @@ -90,4 +105,4 @@ param set-default GPS_SAT_INFO 1
param set-default COM_RC_OVERRIDE 0

# Change current sense shunt resistor value
param set-default INA226_SHUNT 0.00025
param set-default INA226_SHUNT 0.0005
21 changes: 15 additions & 6 deletions ROMFS/px4fmu_common/init.d/airframes/4420_ssrc_arwing
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,23 @@ param set-default FW_AIRSPD_STALL 12.0
param set-default FW_AIRSPD_TRIM 18.0

# Battery parameters
# Ref: tattu 6500mah 4s
param set-default BAT1_N_CELLS 4
param set-default BAT1_R_INTERNAL 0.0050
param set-default BAT1_V_EMPTY 3.6000
param set-default BAT1_V_LOAD_DROP 0.1000
param set-default BAT1_V_CHARGED 4.2
param set-default BAT1_V_DIV 18.1
param set-default BAT1_R_INTERNAL 0.0011
param set-default BAT1_V_EMPTY 3.5000
param set-default BAT1_SOURCE 0
param set-default BAT1_CAPACITY 1800

param set-default BAT2_R_INTERNAL 0.0050
param set-default BAT2_V_EMPTY 3.6000
param set-default BAT2_V_LOAD_DROP 0.1000

param set-default BAT2_N_CELLS 4
param set-default BAT2_V_CHARGED 4.2
param set-default BAT2_V_DIV 18.1
param set-default BAT2_R_INTERNAL 0.0011
param set-default BAT2_V_EMPTY 3.5000
param set-default BAT2_SOURCE 0
param set-default BAT2_CAPACITY 1800

# Disable internal magnetometer
param set CAL_MAG0_PRIO 0
Expand Down
24 changes: 21 additions & 3 deletions ROMFS/px4fmu_common/init.d/airframes/4430_ssrc_strivermini
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,25 @@ param set-default FW_AIRSPD_STALL 12.0
param set-default FW_AIRSPD_TRIM 18.0

# Battery parameters
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_CHARGED 4.2
param set-default BAT1_V_EMPTY 3.6
# Ref: t-drone 22000mah 6s Lion
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_CHARGED 4.1
param set-default BAT1_V_EMPTY 3.2
param set-default BAT1_V_DIV 18.1
param set-default BAT1_SOURCE 0
# Rough guess 50 mOhm
param set-default BAT1_R_INTERNAL 0.0050
param set-default BAT1_CAPACITY 22000

# Ref: t-drone 22000mah 6s Lion
param set-default BAT2_N_CELLS 6
param set-default BAT2_V_CHARGED 4.1
param set-default BAT2_V_EMPTY 3.2
param set-default BAT2_V_DIV 18.1
param set-default BAT2_SOURCE 0
# Rough guess 50 mOhm
param set-default BAT2_R_INTERNAL 0.0050
param set-default BAT2_CAPACITY 22000

# Disable internal magnetometer
param set CAL_MAG0_PRIO 0
Expand Down Expand Up @@ -124,3 +139,6 @@ param set-default VT_FW_MIN_ALT 5
# QuadChute angle limits
param set-default VT_FW_QC_P 35
param set-default VT_FW_QC_R 60

# Change current sense shunt resistor value
param set-default INA226_SHUNT 0.0005