Page 1 of 1

Using battery voltage reading for battery indicator gauge

Posted: Mon Oct 25, 2021 6:09 pm
by m.art.y
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

Re: Using battery voltage reading for battery indicator gauge

Posted: Mon Oct 25, 2021 7:18 pm
by LRBen
x = voltage - 44

Re: Using battery voltage reading for battery indicator gauge

Posted: Tue Oct 26, 2021 5:37 pm
by m.art.y
LRBen wrote: Mon Oct 25, 2021 7:18 pmx = voltage - 44
Thanks. It works now 😊