isabellesimova / HoverboardFirmware

50 stars 24 forks source link

How to change mininum battery? Have some ideas (want to run 8S) #12

Open TomekBrz opened 5 years ago

TomekBrz commented 5 years ago

Please let me know if there's a better forum for my question..Hope posting here is OK.

I happen to have a couple of 8s 30Ah lipo batteries, so I wanted to see about running them instead of stock. I realize my max speed is affected but I'm not as concerned about that.

In main.c, I found in check_power, the following line:

" if (get_battery_volt() < 32) {"
Which defines the low battery error. So that's a LVC of 32/10 = 3.2V, for my 8S battery I'm ok with a more conservative LVC of 3.55, so 28.4V.

If I then change that line to <28.4V, or if I change 32 with LOW_VOLTAGE_CUTOFF and add to constants.h "#define LOW_VOLTAGE_CUTOFF 28" would that be the right protocol? Irrc I can't use a float with a define, so I'd be stuck with a rounded number for the LVC, but that's not too bad. I don't really know what would be recommended way to approach this.

I am not familiar with the codebase to know if there would be further unintended consequences to changing the LVC. I know from hardware if I go too low there will could be various systems that start browning out or something like that.