Using battery voltage reading for battery indicator gauge
Posted: Mon Oct 25, 2021 6:09 pm
Hi, has anybody tried to use voltage of the battery to calculate and represent battery SOC level? I know it might not be very accurate but it should be better than nothing. I have got battery voltage reported on CAN and I have got a battery level gauge that receives CAN and displays % and it goes from 0 to 100 % decimal directly converted to hexadecimal where 0x64 =100%. Now I can't figure out how to calculate the reported voltage into % in a way that 144 V = 100 % and 44 V = 0%. I want to include the calculation in arduino code. Anybody has any ideas for a calculation algorithm? Thanks