Skip to content
Open
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
Binary file added Firmware/.vs/BMSLadder/v14/.atsuo
Binary file not shown.
7 changes: 4 additions & 3 deletions Firmware/CellManagement.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
#include "HardwareDefines.h"

#define OVERVOLTAGE_THRESHOLD_MILLIVOLTS 4150
#define BALANCE_THRESHOLD_MILLIVOLTS 4050
#define BALANCE_THRESHOLD_MILLIVOLTS 4100
#define UNDERVOLTAGE_THRESHOLD_MILLIVOLTS 2800

/*
Power consumption with this code as pushed:
Under Voltage @ 2.6V -> 2uA Average
Running @ 3V -> 2.5uA Average
Running @ 4V -> 2.6uA Average
Balancing @ 4.1V -> Approximately 700mA with current settings
Over voltage @ 4.3V -> Approximately 700mA with current settings
Balancing @ 4.1V -> Approximately 120mA with current settings
Over voltage @ 4.15V -> Approximately 700mA with current settings
*/

inline void BalanceOn(bool highCurrent)
{
TCA0_SINGLE_CMP0 = 128; //12.5% duty cycle on the balance FET, period around 80ms
if (highCurrent)
{
TCA0_SINGLE_CMP0 = 768; //75% duty cycle on the balance FET, period around 80ms
Expand Down
Binary file modified Firmware/Debug/BMSLadder.elf
Binary file not shown.
67 changes: 34 additions & 33 deletions Firmware/Debug/BMSLadder.hex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:1000100019C018C017C016C015C014C013C012C034
:1000200011C010C00FC00EC00DC00CC00BC00AC064
:1000300009C008C011241FBECFEFCDBFDFE3DEBF74
:10004000DFD04DC1DDCFE0E0F6E081E5828381E0E5
:10004000E9D05BC1DDCFE0E0F6E081E5828381E0CD
:1000500080830895E0EAF0E080E1808382E081839C
:100060000895E0E0F6E08081816080830895E0E01B
:10007000F6E080818E7F80830895E0E0F6E086835D
Expand All @@ -11,38 +11,39 @@
:1000A000F6DFE0E0F6E02385216023870895CF9214
:1000B000DF92EF92FF92CEDFC6DFD3DF8DE1ECDF80
:1000C0008DE1EADF9C0140E050E060E070E381E117
:1000D00090E0C7D069017A01CADFC701B601FF907D
:1000D00090E0D5D069017A01CADFC701B601FF906F
:1000E000EF90DF90CF900895CF93DF93EC01DFDFA7
:1000F000688379838A839B83663320E17207810555
:10010000910568F080E093E08093280A9093290A93
:10011000E0E0FAE080818160808383E01FC0623D7F
:100120007F408105910538F0E0E0FAE08081816050
:10013000808382E013C0E0E0FAE080818E7F8083DC
:100140001092020A88819981AA81BB81803F9A40DE
:10015000A105B10510F081E001C080E0DF91CF91F1
:10016000089584E08093100488E48093000480E480
:1001700080930504089580E094E08093260A90938C
:10018000270A80E890E08093280A9093290A83E167
:100190008093010A8CE08093000A1092020A08956D
:1001A00085E0809350008895089581E08093500009
:1001B000889508958091400083FF03C084E0809378
:1001C0000104089518C0A89580E480930604EFE127
:1001D000F3E03197F1F700C0000080930504992304
:1001E00049F0FFEF21EE34E0F15020403040E1F7DC
:1001F00000C00000892F9FEF980F8111E4CF089570
:10020000CF93DF9300D000D0CDB7DEB7A895A9DF9C
:10021000B2DFD0DFCE01019667DF823069F0833034
:1002200019F08130A9F40FC084E08093050480E4C4
:1002300080930604BADF0CC084E08093050482E05A
:10024000C1DFB3DF05C084E08093060481E0BADF3C
:10025000A7DF80E090E02496CDBFDEBFDF91CF9195
:100260000895052E97FB16F400940FD057FD05D086
:1002700014D007FC02D046F408C050954095309544
:1002800021953F4F4F4F5F4F089590958095709502
:1002900061957F4F8F4F9F4F0895A1E21A2EAA1BA1
:1002A000BB1BFD010DC0AA1FBB1FEE1FFF1FA21726
:1002B000B307E407F50720F0A21BB30BE40BF50B23
:1002C000661F771F881F991F1A9469F760957095AC
:1002D000809590959B01AC01BD01CF010895F894E4
:0202E000FFCF4E
:10010000910588F0E8E2FAE080E890E0808391834E
:1001100080E093E080839183E0E0FAE08081816079
:10012000808383E025C0643070418105910568F0CB
:1001300080E890E08093280A9093290AE0E0FAE0B2
:1001400080818160808382E013C0E0E0FAE08081FA
:100150008E7F80831092020A88819981AA81BB8157
:10016000803F9A40A105B10510F081E001C080E018
:10017000DF91CF91089584E08093100488E4809308
:10018000000480E480930504089580E094E0809367
:10019000260A9093270A80E890E08093280A90939B
:1001A000290A83E18093010A8CE08093000A10926F
:1001B000020A089585E0809350008895089581E0B3
:1001C00080935000889508958091400083FF03C07C
:1001D00084E080930104089518C0A89580E480937A
:1001E0000604EFE1F3E03197F1F700C000008093DF
:1001F0000504992349F0FFEF21EE34E0F15020404F
:100200003040E1F700C00000892F9FEF980F811167
:10021000E4CF0895CF93DF9300D000D0CDB7DEB701
:10022000A895A9DFB2DFD0DFCE0101965DDF813076
:10023000A1F0C8F0823051F08330C1F484E08093A3
:10024000050480E480930604BADF10C084E0809344
:10025000060482E0C1DFB3DF09C084E080930604B6
:1002600081E0BADF03C084E080930504A3DF80E06F
:1002700090E02496CDBFDEBFDF91CF910895052E8B
:1002800097FB16F400940FD057FD05D014D007FC4F
:1002900002D046F408C050954095309521953F4FC7
:1002A0004F4F5F4F089590958095709561957F4F62
:1002B0008F4F9F4F0895A1E21A2EAA1BBB1BFD0171
:1002C0000DC0AA1FBB1FEE1FFF1FA217B307E40735
:1002D000F50720F0A21BB30BE40BF50B661F771F8D
:1002E000881F991F1A9469F760957095809590956D
:0E02F0009B01AC01BD01CF010895F894FFCF32
:00000001FF
Loading