Skip to content

Commit f806222

Browse files
committed
Minor change
1 parent 918f69e commit f806222

5 files changed

Lines changed: 112 additions & 93 deletions

File tree

.project

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@
3434
<link>
3535
<name>core/core</name>
3636
<type>2</type>
37-
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.6.19/cores/arduino</locationURI>
37+
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.6.20/cores/arduino</locationURI>
3838
</link>
3939
<link>
4040
<name>core/variant</name>
4141
<type>2</type>
42-
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.6.19/variants/eightanaloginputs</locationURI>
42+
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.6.20/variants/eightanaloginputs</locationURI>
4343
</link>
4444
<link>
4545
<name>libraries/LiquidCrystal_I2C</name>
4646
<type>2</type>
47-
<locationURI>ECLIPSE_HOME/arduinoPlugin/libraries/LiquidCrystal_I2C/1.1.2</locationURI>
47+
<location>C:/Users/renzo/git/LiquidCrystal_I2C</location>
4848
</link>
4949
<link>
5050
<name>libraries/Thermistor_library</name>
@@ -54,7 +54,7 @@
5454
<link>
5555
<name>libraries/Wire</name>
5656
<type>2</type>
57-
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.6.19/libraries/Wire</locationURI>
57+
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.6.20/libraries/Wire</locationURI>
5858
</link>
5959
</linkedResources>
6060
</projectDescription>

.settings/org.eclipse.cdt.core.prefs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.DTS
166166
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.DTS/value=3600
167167
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.LOCAL/delimiter=;
168168
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.LOCAL/operation=replace
169-
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.LOCAL/value=1507934478
169+
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.LOCAL/value=1508945542
170170
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.UTC/delimiter=;
171171
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.UTC/operation=replace
172-
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.UTC/value=1507927278
172+
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.UTC/value=1508938342
173173
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.ZONE/delimiter=;
174174
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.ZONE/operation=replace
175175
environment/project/io.sloeber.core.toolChain.release.214820771/A.EXTRA.TIME.ZONE/value=3600
@@ -313,7 +313,7 @@ environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.IDE.VE
313313
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.IDE.VERSION/value=10802
314314
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.PLATFORM.PATH/delimiter=;
315315
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.PLATFORM.PATH/operation=replace
316-
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.PLATFORM.PATH/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.19
316+
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.PLATFORM.PATH/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.20
317317
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.TOOLS.ARDUINOOTA-1.1.1.PATH/delimiter=;
318318
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.TOOLS.ARDUINOOTA-1.1.1.PATH/operation=replace
319319
environment/project/io.sloeber.core.toolChain.release.214820771/A.RUNTIME.TOOLS.ARDUINOOTA-1.1.1.PATH/value=${eclipse_home}/arduinoPlugin/packages/arduino/tools/arduinoOTA/1.1.1
@@ -436,7 +436,7 @@ environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.
436436
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.PARAMS.VERBOSE/value=-v
437437
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.PATTERN/delimiter=;
438438
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.PATTERN/operation=replace
439-
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.PATTERN/value="${A.TOOLS.AVRDUDE.CMD.PATH}" "-C${A.TOOLS.AVRDUDE.CONFIG.PATH}" ${A.TOOLS.AVRDUDE.UPLOAD.VERBOSE} ${A.TOOLS.AVRDUDE.UPLOAD.VERIFY} -p${A.BUILD.MCU} -c${A.UPLOAD.PROTOCOL} -P${A.SERIAL.PORT} -b${A.UPLOAD.SPEED} -D "-Uflash\:w\:${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.hex\:i"
439+
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.PATTERN/value="${A.TOOLS.AVRDUDE.CMD.PATH}" "-C${A.TOOLS.AVRDUDE.CONFIG.PATH}" ${A.TOOLS.AVRDUDE.UPLOAD.VERBOSE} ${A.TOOLS.AVRDUDE.UPLOAD.VERIFY} -p${A.BUILD.MCU} -c${A.UPLOAD.PROTOCOL} "-P${A.SERIAL.PORT}" -b${A.UPLOAD.SPEED} -D "-Uflash\:w\:${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.hex\:i"
440440
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.VERIFY/delimiter=;
441441
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.VERIFY/operation=replace
442442
environment/project/io.sloeber.core.toolChain.release.214820771/A.TOOLS.AVRDUDE.UPLOAD.VERIFY/value=
@@ -472,13 +472,13 @@ environment/project/io.sloeber.core.toolChain.release.214820771/A.UPLOAD.TOOL/op
472472
environment/project/io.sloeber.core.toolChain.release.214820771/A.UPLOAD.TOOL/value=avrdude
473473
environment/project/io.sloeber.core.toolChain.release.214820771/A.VERSION/delimiter=;
474474
environment/project/io.sloeber.core.toolChain.release.214820771/A.VERSION/operation=replace
475-
environment/project/io.sloeber.core.toolChain.release.214820771/A.VERSION/value=1.6.19
475+
environment/project/io.sloeber.core.toolChain.release.214820771/A.VERSION/value=1.6.20
476476
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.ARCHITECTURE_ID/delimiter=;
477477
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.ARCHITECTURE_ID/operation=replace
478478
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.ARCHITECTURE_ID/value=avr
479479
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARDS_FILE/delimiter=;
480480
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARDS_FILE/operation=replace
481-
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARDS_FILE/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.19/boards.txt
481+
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARDS_FILE/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.20/boards.txt
482482
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARD_ID/delimiter=;
483483
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARD_ID/operation=replace
484484
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.BOARD_ID/value=nano
@@ -517,13 +517,13 @@ environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PACKAGE_I
517517
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PACKAGE_ID/value=arduino
518518
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PLATFORM_FILE/delimiter=;
519519
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PLATFORM_FILE/operation=replace
520-
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PLATFORM_FILE/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.19/platform.txt
520+
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PLATFORM_FILE/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.20/platform.txt
521521
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PROJECT_NAME/delimiter=;
522522
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PROJECT_NAME/operation=replace
523523
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.PROJECT_NAME/value=
524524
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SELECTED.PLATFORM/delimiter=;
525525
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SELECTED.PLATFORM/operation=replace
526-
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SELECTED.PLATFORM/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.19
526+
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SELECTED.PLATFORM/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.6.20
527527
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SIZE.SWITCH/delimiter=;
528528
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SIZE.SWITCH/operation=replace
529529
environment/project/io.sloeber.core.toolChain.release.214820771/JANTJE.SIZE.SWITCH/value=${A.RECIPE.SIZE.PATTERN}

README.md

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,84 @@
11
# 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-/).
418

519
## Wire schema ##
620

721
![Breadboard schema](https://github.com/xreef/BatteryCapacityTesterArduinoNANO/blob/master/Resources/BTester_bb.png)
822
![Schema](https://github.com/xreef/BatteryCapacityTesterArduinoNANO/blob/master/Resources/BTester_schem.png)
923

1024
## 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*
4765

4866
## 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)
5977

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.
6382

6483
![Breadboard](https://github.com/xreef/BatteryCapacityTesterArduinoNANO/blob/master/Resources/breadboard01.jpg)
6584
![lcd on discharging](https://github.com/xreef/BatteryCapacityTesterArduinoNANO/blob/master/Resources/lcdDischarging02.jpg)

Resources/BTester.fzz

118 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)