I have added a new feature to my controller to work out the remaining battery capacity using Coulomb Counting. This normally requires sampling the battery current and adding up the results but I found out in testing that approximating the battery current by the phase current time the PWM ratio what pretty good. The assembly code implementation was rather simple and fast too (12 instructions) which was important since this runs at PWM frequency.
I had estimated my C corrected battery capacity at about 16Ah and in my 1st test I measured 16.2Ah till the LVC kicked in and after 12Km in a city environment without regen.
Ironically enough, it's the displaying of the state of charge on my goped which only have 3 LED that took the longest to code (70 instructions) and debug...
I had estimated my C corrected battery capacity at about 16Ah and in my 1st test I measured 16.2Ah till the LVC kicked in and after 12Km in a city environment without regen.
Ironically enough, it's the displaying of the state of charge on my goped which only have 3 LED that took the longest to code (70 instructions) and debug...