luna-cycle / vesc_bms_fw

The VESC BMS Firmware
GNU General Public License v3.0
0 stars 0 forks source link

Add precharge resistor logic #1

Open nitrousnrg opened 2 years ago

nitrousnrg commented 2 years ago

With @Pedro533 we have been working on a hardware solution that eliminates sparks upon connection.

This is the logic that we should implement behind it:

All this logic is luna_bms specific, so it should be handled in luna_bms.c and luna_bms.h

nitrousnrg commented 1 year ago

Update:

Math says that precharge current will never be above 350mA, so we can set the precharge current threshold to 300mA (15% margin).

Testing showed that disconnecting precharge resistors based on the resistor temperature monitoring does not work. Temp sensing is too slow and we only have less than 100msec to handle a short circuit, so we will have to use a timeout as primary short circuit countermeasure.

nitrousnrg commented 1 year ago

@diegosarli when the AFE detects a shortcircuit, the BMS retries the connection for a few times.

Those retries should be through the precharge resistor. If we just turn on the big mosfets we are producing a huge, avoidable current inrush.