|
1 | 1 | # Battery Capacity Tester Arduino NANO # |
2 | | - Another Battery capacity tester. |
3 | | - Create from an idea of http://www.instructables.com/id/DIY-Arduino-Battery-Capacity-Tester-V10-/. |
| 2 | +Another Battery capacity tester. |
| 3 | +With this device you can check the 18650 battery capacity. For safe I added with thermistor the temperature of power resistance and battery to prevent explosion. |
| 4 | +I'm doing some change from original project and now It's quite fine: |
| 5 | +v01 |
| 6 | + - VCC of Arduino now It's automatically calculated; |
| 7 | + - Voltage on screen now It's correct; |
| 8 | + - Added variable to change setting in more confortable way. |
| 9 | + - Added percentage of discharging |
| 10 | + - Added temperature of battery and power resistor |
| 11 | + |
| 12 | +In project you can find fritzing, schema, photo and other. |
| 13 | + |
| 14 | +*I use generic character display, and I build the i2c controller and use It with my custom library, but if you want You can take a normal i2c controller (less than 1€) with standard library, the code remain the same.* |
| 15 | +*All code of display is in draw function so you can change that without change other.* |
| 16 | + |
| 17 | +Created from an idea of [OpenGreenEnergy](http://www.instructables.com/id/DIY-Arduino-Battery-Capacity-Tester-V10-/). |
4 | 18 |
|
5 | 19 | ## Wire schema ## |
6 | 20 |
|
7 | 21 |  |
8 | 22 |  |
9 | 23 |
|
10 | 24 | ## Assembly list ## |
11 | | - Label Part Type Properties |
12 | | - 10K Trimmer potentiometer TRIMPOT package trimpot_pth_s3_lock_3386P; variant variant 2 |
13 | | - 18650 Battery lipo |
14 | | - 2N2222 NPN-Transistor tipo NPN (EBC); package TO92 [THT]; part number 2N2222 |
15 | | - Beeper Piezo Speaker |
16 | | - Display LCD screen tipo Character; pins 16 |
17 | | - For battery Screw terminal - 2 pins package THT; hole size 1.0mm,0.508mm; pins 2; pin spacing 0.1in (2.54mm) |
18 | | - For power resistor Screw terminal - 2 pins package THT; hole size 1.0mm,0.508mm; pins 2; pin spacing 0.1in (2.54mm) |
19 | | - i2c controller PCF8574 tipo PCF8574; package DIP16 [THT] |
20 | | - IRF744N Basic FET N-Channel tipo n-channel; package TO220 [THT] |
21 | | - MF58 Temperature Sensor (Thermistor) tipo thermistor; package THT; resistance at 25° 10kΩ; thermistor type NTC |
22 | | - MF58 Temperature Sensor (Thermistor) tipo thermistor; package THT; resistance at 25° 10kΩ; thermistor type NTC |
23 | | - Microcontroller Arduino Pro Mini clone (compatible Nano) tipo Arduino Pro Mini (Clone comp Nano); variant variant 1 |
24 | | - Power resistor 10kΩ Resistor |
25 | | - R1 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
26 | | - R2 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
27 | | - R3 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
28 | | - R4 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
29 | | - R10 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
30 | | - R11 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
31 | | - |
32 | | -## Shopping List ## |
33 | | - |
34 | | - Amount Part Type Properties |
35 | | - 1 TRIMPOT package trimpot_pth_s3_lock_3386P; variant variant 2 |
36 | | - 1 LIPO 18650 variant |
37 | | - 1 NPN-Transistor tipo NPN (EBC); package TO92 [THT]; part number 2N2222 |
38 | | - 1 Piezo Speaker |
39 | | - 1 LCD screen tipo Character; pins 16 |
40 | | - 2 Screw terminal - 2 pins package THT; hole size 1.0mm,0.508mm; pins 2; pin spacing 0.1in (2.54mm) |
41 | | - 1 PCF8574 tipo PCF8574; package DIP16 [THT] |
42 | | - 1 Basic FET N-Channel tipo n-channel; package TO220 [THT] |
43 | | - 2 Temperature Sensor (Thermistor) tipo thermistor; package THT; resistance at 25° 10kΩ; thermistor type NTC |
44 | | - 1 Arduino Pro Mini clone (compatible Nano)tipo Arduino Pro Mini (Clone comp Nano); variant variant 1 |
45 | | - 1 10kΩ Resistor Power resistor |
46 | | - 6 10kΩ Resistor package THT; tolerance ±5%; resistenza 10kΩ; bands 4; pin spacing 400 mil |
| 25 | +| Label | Part Type | Properties | |
| 26 | +| --- | --- | --- | |
| 27 | +| **(LCD bb)** Display* | LCD screen | pins 16; tipo Character | |
| 28 | +| **(LCD bb)** i2c controller* | PCF8574 | tipo PCF8574; package DIP16 [THT] | |
| 29 | +| **(LCD bb)** 10K Trimmer potentiometer* | TRIMPOT | variant variant 2; package trimpot_pth_s3_lock_3386P | |
| 30 | +| **(LCD bb)** 2N2222* | NPN-Transistor | tipo NPN (EBC); package TO92 [THT]; part number 2N2222 | |
| 31 | +| 18650 Battery | LIPO-1000mAh | variant 1000mAh; package lipo-1000 | |
| 32 | +| Beeper | Piezo Speaker | |
| 33 | +| For battery | Screw terminal - 2 pins | pin spacing 0.1in (2.54mm); pins 2; hole size 1.0mm,0.508mm; package THT | |
| 34 | +| For power resistor | Screw terminal - 2 pins | pin spacing 0.1in (2.54mm); pins 2; hole size 1.0mm,0.508mm; package THT | |
| 35 | +| IRF744N | Basic FET N-Channel | tipo n-channel; package TO220 [THT] | |
| 36 | +| MF58 | Temperature Sensor (Thermistor) | resistance at 25° 10kΩ; tipo thermistor; package THT; thermistor type NTC | |
| 37 | +| MF58 | Temperature Sensor (Thermistor) | resistance at 25° 10kΩ; tipo thermistor; package THT; thermistor type NTC | |
| 38 | +| Microcontroller | Arduino Pro Mini clone (compatible Nano) | variant variant 1; tipo Arduino Pro Mini (Clone comp Nano) | |
| 39 | +| Power resistor | 10kΩ Resistor | pin spacing 400 mil; bands 5; resistenza 10kΩ; tolerance ±5%; package THT; part number Power resistor | |
| 40 | +| Resistance of battery volt. 1/2 | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 41 | +| Resistance of battery volt. 2/2 | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 42 | +| Resistance of power res. volt. 1/2 | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 43 | +| Resistance of power res. volt. 2/2 | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 44 | +| Thermistor battery resistance | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 45 | +| Thermistor power res. resistance | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 46 | + |
| 47 | +## Shopping List |
| 48 | + |
| 49 | +| Amount | Part Type | Properties | |
| 50 | +| --- | --- | --- | |
| 51 | +| 1* | LCD screen | pins 16; tipo Character | |
| 52 | +| 1* | PCF8574 | tipo PCF8574; package DIP16 [THT] | |
| 53 | +| 1* | TRIMPOT | variant variant 2; package trimpot_pth_s3_lock_3386P | |
| 54 | +| 1* | NPN-Transistor | tipo NPN (EBC); package TO92 [THT]; part number 2N2222 | |
| 55 | +| 1 | LIPO-1000mAh | variant 1000mAh; package lipo-1000 | |
| 56 | +| 1 | Piezo Speaker | |
| 57 | +| 2 | Screw terminal - 2 pins | pin spacing 0.1in (2.54mm); pins 2; hole size 1.0mm,0.508mm; package THT | |
| 58 | +| 1 | Basic FET N-Channel | tipo n-channel; package TO220 [THT] | |
| 59 | +| 2 | Temperature Sensor (Thermistor) | resistance at 25° 10kΩ; tipo thermistor; package THT; thermistor type NTC | |
| 60 | +| 1 | Arduino Pro Mini clone (compatible Nano) | variant variant 1; tipo Arduino Pro Mini (Clone comp Nano) | |
| 61 | +| 1 | 10kΩ Resistor | pin spacing 400 mil; bands 5; resistenza 10kΩ; tolerance ±5%; package THT; part number Power resistor | |
| 62 | +| 6 | 10kΩ Resistor | pin spacing 400 mil; bands 4; resistenza 10kΩ; tolerance ±5%; package THT | |
| 63 | + |
| 64 | +*\* Only if you want assembly LCD i2c character controller* |
47 | 65 |
|
48 | 66 | ## Realization ## |
49 | | - To measuring voltage we use the principle of Voltage divider |
50 | | - https://en.wikipedia.org/wiki/Voltage_divider |
51 | | - https://startingelectronics.org/articles/arduino/measuring-voltage-with-arduino/ |
52 | | - in simple word this code |
53 | | - batVolt = (sample1 / (1023.0 - ((batResValueGnd / (batResValueVolt + batResValueGnd)) * 1023.0))) * vcc; |
54 | | - that measure battery voltage is: |
55 | | - batResValueGnd / (batResValueVolt + batResValueGnd) --> this is the multipler factor of the reading voltage because I inserted 2 resistance of batResValueVolt and batResValueGnd ohom value after and before the analog read wire; |
56 | | - sample1 --> is the average analog readings; |
57 | | - vcc --> reference arduino voltage; |
58 | | - 1023.0 --> is the reference maximun value of analog read (arduino analog read go from 0 to 1023) |
| 67 | +To measuring voltage we use the principle of Voltage divider, more information on: |
| 68 | +[Wikipedia](https://en.wikipedia.org/wiki/Voltage_divider) or [Blog](https://startingelectronics.org/articles/arduino/measuring-voltage-with-arduino/), in simple word this code |
| 69 | +```cpp |
| 70 | +batVolt = (sample1 / (1023.0 - ((batResValueGnd / (batResValueVolt + batResValueGnd)) * 1023.0))) * vcc; |
| 71 | +``` |
| 72 | +measure battery voltage, |
| 73 | +`batResValueGnd / (batResValueVolt + batResValueGnd)` this is the multipler factor of the reading voltage, I inserted 2 resistance of `batResValueVolt` and `batResValueGnd` ohom after and before the analog read wire; |
| 74 | +`sample1 -->` is the average analog readings; |
| 75 | +`vcc -->` reference arduino voltage; |
| 76 | +`1023.0 -->` is the reference maximun value of analog read (arduino analog read go from 0 to 1023) |
59 | 77 |
|
60 | | - The principle is that we measure the voltage afther and before the power resistor and so we can calculate millihampere that consumes the battery. |
61 | | - The MOSFET is used to stard and stop battery drain from power resistor. |
62 | | - I'm pretty scary, so I inserted 2 thermistors to monitorage battery and power resistor temperature. |
| 78 | +The principle is that we measure the voltage afther and before the power resistor and so we can calculate milliampere that consumes the battery. |
| 79 | + |
| 80 | +The MOSFET is used to stard and stop battery drain from power resistor. |
| 81 | +I'm pretty scary, so I inserted 2 thermistors to monitorage battery and power resistor temperature. |
63 | 82 |
|
64 | 83 |  |
65 | 84 |  |
|
0 commit comments