Using battery voltage reading for battery indicator gauge
-
- Posts: 556
- Joined: Sat Jun 06, 2020 6:54 pm
- Location: UK
- Has thanked: 24 times
- Been thanked: 17 times
Using battery voltage reading for battery indicator gauge
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