Hi All,
I am trying to build a dual volt meter 20x4 OLED using (20M2) that will monitor the main vehicle cranking battery and a lighter aux battery. Both batteries have a slightly different voltage value referenced to a SOC on %, thus I want to accurately map for an accurate result.
How can you correlate SOC % to a given voltage. I have tried a offset/LUT 100 to 5% in increments of 5 for main and aux batt, but I am struggling to bond the LUT value 100, 95,90,85 to 5% SOC with a given measured ADC value / converted voltage using READADC10?
At the moment the easy code uses if = and <, then, goto xxx: but so many lines of "if" commands is very inefficient....
Any hints?
Regards
Gerald
I am trying to build a dual volt meter 20x4 OLED using (20M2) that will monitor the main vehicle cranking battery and a lighter aux battery. Both batteries have a slightly different voltage value referenced to a SOC on %, thus I want to accurately map for an accurate result.
How can you correlate SOC % to a given voltage. I have tried a offset/LUT 100 to 5% in increments of 5 for main and aux batt, but I am struggling to bond the LUT value 100, 95,90,85 to 5% SOC with a given measured ADC value / converted voltage using READADC10?
At the moment the easy code uses if = and <, then, goto xxx: but so many lines of "if" commands is very inefficient....
Any hints?
Regards
Gerald