Re: Old BMS Software Thread
Posted: Sat Oct 09, 2010 12:26 am
Well done looks good. I'll let you iron out the bugs before I try and follow your lead.
What is the difference in code size between two versions?
How much space does new code take?
Master now has about 2000 words free.
Edit
Just tweaked master code and included the updated SOC code which works using the ampseconds we have been discussing. SOC is now to 0.1% instead of .01% but should be more accurate. Still needs the one second timer.
Also included start up current sensor offset calibration routine. When BMS is turned on each time now it gets the current sensor ADC reading when zero amps is flowing. It then uses this as the zero point offset to more accurately detect current levels. So BMS should be switched on before main contactor/car etc. It displays the offset / zero point on BMS startup splash screen.
What is the difference in code size between two versions?
How much space does new code take?
Master now has about 2000 words free.
Edit
Just tweaked master code and included the updated SOC code which works using the ampseconds we have been discussing. SOC is now to 0.1% instead of .01% but should be more accurate. Still needs the one second timer.
Also included start up current sensor offset calibration routine. When BMS is turned on each time now it gets the current sensor ADC reading when zero amps is flowing. It then uses this as the zero point offset to more accurately detect current levels. So BMS should be switched on before main contactor/car etc. It displays the offset / zero point on BMS startup splash screen.