Hiemal
0
- Joined
- Dec 27, 2011
- Messages
- 1,443
- Points
- 63
Hi guys.
First time really fiddling around with coding and arduino-ing. I had a teensy 3.1 (a type of fancy uC that I was gonna use for something else) that I figured I could put to use, rather than let it collect dust needlessly.
Anyway. I spent quite a lot of time researching and doing some reading on coding and how to calculate mAh.
And eventually came up with a program that allows an arduino (or equivalent in my case!) to give pretty accurate capacity readings for li-ions (and even NiCd/NiMns too).
Way it works is pretty simple. Basically, there's a relay, a resistor and a voltage divider.
The resistor is the load; this is what allows the program to read voltage, and consequently, current. Ohm's law baby!!
Because my teensy cannot handle anything over 3.3 volts in its inputs, you have to use a resistive voltage divider. I just chose something simple, 0.5 the voltage, and you compensate for it by telling the arduino to multiply its sensor reading by two.
Now, you have the current and the voltage. Great!
During this time the arduino has been keeping track of time from the start of the test. This is what allows us to get the mAh, by taking the current value and multiplying it by the number of "hours" that have passed. Once the battery has reached 2.7 volts, the test stops, and you get your mAh reading out.
The other neat thing about it is I also added in a serial output; meaning the arduino will print data to my computer!
And here's a picture of the actual circuit n' stuff so far. Note this not the final product, obviously!!
Which brings me to another point...
would anyone be interested in buying these as like, kits or something? I could use the supplemental income.
First time really fiddling around with coding and arduino-ing. I had a teensy 3.1 (a type of fancy uC that I was gonna use for something else) that I figured I could put to use, rather than let it collect dust needlessly.
Anyway. I spent quite a lot of time researching and doing some reading on coding and how to calculate mAh.
And eventually came up with a program that allows an arduino (or equivalent in my case!) to give pretty accurate capacity readings for li-ions (and even NiCd/NiMns too).
Way it works is pretty simple. Basically, there's a relay, a resistor and a voltage divider.
The resistor is the load; this is what allows the program to read voltage, and consequently, current. Ohm's law baby!!
Because my teensy cannot handle anything over 3.3 volts in its inputs, you have to use a resistive voltage divider. I just chose something simple, 0.5 the voltage, and you compensate for it by telling the arduino to multiply its sensor reading by two.
Now, you have the current and the voltage. Great!
During this time the arduino has been keeping track of time from the start of the test. This is what allows us to get the mAh, by taking the current value and multiplying it by the number of "hours" that have passed. Once the battery has reached 2.7 volts, the test stops, and you get your mAh reading out.
The other neat thing about it is I also added in a serial output; meaning the arduino will print data to my computer!
And here's a picture of the actual circuit n' stuff so far. Note this not the final product, obviously!!
Which brings me to another point...
would anyone be interested in buying these as like, kits or something? I could use the supplemental income.