Hi there! I started off this topic based on ideas and other info I collected in this thread:
So, anyways, I came up with an idea to use arduino nano and a simple ‘‘voltage divider’’ - consisting of 2 resistors for bringing the voltage down. I assume I can be lucky that I still use 6s system, so my max voltage will be only 24.6v (4.1v x 6cells). Not 4.2v, because im not using lipos and I charge li-ions only till 4.1v.
I derive this 0.025v precision because I’ve heard you can only use 1024 bit precision when measuring through analog pin. This way, I assume, I need to divide 25v / 1024 = 0.0244 v
The following idea is as follows: 1008 bit will serve as 100%
(24.6v = 25v - 24.6 = 0.4v )
(0.4v / 0.0244 = 16.393 bits)
1024 - 16.4 = ~1008 bits
The lowest point will be around 3.45v per cell or 20.7v for total pack voltage! In bits, this should correspond to 848 bits. (1024 - 176).
As I can see from this, a big range of bits dont get used up this way, so I might as well use just a single cell group voltage to determine the left percentage of the battery!
This way I wont have to do the math so much and I will achieve even better accuracy, even better, it should be possible to use for higher voltages too! Of course, the pitfall is that it relies on just one parallel group of batteries, to determine the whole pack’s voltage…
But as I also have a wattmeter installed, I think I wont need a backup plan/voltage meter for total pack’s voltage…
Ok so I hope that my logic is correct, the hardest part will be to program the lcd… I will look up some tutorials and will post some more info + some code, once I have researched a bit more
On a side note, I also considered it would be cool, if there was a chance to make a arduino based coulometer / wattmeter, which collects ah/wh stats and of course, measures current!
Though, the simple models which are available, seems to be able to measure only up to 3A of power… way too low for something useful + they use resistors and perhaps dissipate heat as they measure it!
It was said in the manual of MAX471, that it is possible to use ‘‘external sense resistors’’.
But im not entirely sure will it be a reliable method of measuring current + what are the limits + cost factor, too!
Before that, I still need to make my simple percentage display unit, so wish me luck to finish it and make something useful out of this!
Some little background info on voltage measuring for arduino: http://henrysbench.capnfatz.com/henrys-bench/arduino-voltage-measurements/arduino-25v-voltage-sensor-module-user-manual/