Skip to content

Commit bfe25c5

Browse files
committed
initial version
0 parents  commit bfe25c5

File tree

8 files changed

+914
-0
lines changed

8 files changed

+914
-0
lines changed

.cproject

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
3+
<storageModule moduleId="org.eclipse.cdt.core.settings">
4+
<cconfiguration id="de.innot.avreclipse.configuration.app.release.1661013684">
5+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="de.innot.avreclipse.configuration.app.release.1661013684" moduleId="org.eclipse.cdt.core.settings" name="Release">
6+
<externalSettings/>
7+
<extensions>
8+
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
9+
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
10+
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
11+
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
12+
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
13+
</extensions>
14+
</storageModule>
15+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
16+
<configuration artifactName="${ProjName}" buildArtefactType="de.innot.avreclipse.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=de.innot.avreclipse.buildArtefactType.app,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" description="" id="de.innot.avreclipse.configuration.app.release.1661013684" name="Release" parent="de.innot.avreclipse.configuration.app.release">
17+
<folderInfo id="de.innot.avreclipse.configuration.app.release.1661013684." name="/" resourcePath="">
18+
<toolChain id="de.innot.avreclipse.toolchain.winavr.app.release.337246503" name="AVR-GCC Toolchain" resourceTypeBasedDiscovery="false" superClass="de.innot.avreclipse.toolchain.winavr.app.release">
19+
<option id="de.innot.avreclipse.toolchain.options.toolchain.objcopy.flash.app.release.1791940151" name="Generate HEX file for Flash memory" superClass="de.innot.avreclipse.toolchain.options.toolchain.objcopy.flash.app.release"/>
20+
<option id="de.innot.avreclipse.toolchain.options.toolchain.objcopy.eeprom.app.release.1437207615" name="Generate HEX file for EEPROM" superClass="de.innot.avreclipse.toolchain.options.toolchain.objcopy.eeprom.app.release" value="false" valueType="boolean"/>
21+
<option id="de.innot.avreclipse.toolchain.options.toolchain.objdump.app.release.357654205" name="Generate Extended Listing (Source + generated Assembler)" superClass="de.innot.avreclipse.toolchain.options.toolchain.objdump.app.release"/>
22+
<option id="de.innot.avreclipse.toolchain.options.toolchain.size.app.release.1871197005" name="Print Size" superClass="de.innot.avreclipse.toolchain.options.toolchain.size.app.release"/>
23+
<option id="de.innot.avreclipse.toolchain.options.toolchain.avrdude.app.release.1995671909" name="AVRDude" superClass="de.innot.avreclipse.toolchain.options.toolchain.avrdude.app.release"/>
24+
<targetPlatform id="de.innot.avreclipse.targetplatform.winavr.app.release.1258308891" name="AVR Cross-Target" superClass="de.innot.avreclipse.targetplatform.winavr.app.release"/>
25+
<builder buildPath="${workspace_loc:}/${ProjName}/Release" id="de.innot.avreclipse.target.builder.winavr.app.release.1604293556" keepEnvironmentInBuildfile="false" name="AVR GNU Make Builder" superClass="de.innot.avreclipse.target.builder.winavr.app.release"/>
26+
<tool id="de.innot.avreclipse.tool.assembler.winavr.app.release.46340294" name="AVR Assembler" superClass="de.innot.avreclipse.tool.assembler.winavr.app.release">
27+
<option id="de.innot.avreclipse.assembler.option.debug.level.1333531448" name="Generate Debugging Info" superClass="de.innot.avreclipse.assembler.option.debug.level" value="de.innot.avreclipse.assembler.option.debug.level.none" valueType="enumerated"/>
28+
<inputType id="de.innot.avreclipse.tool.assembler.input.1801625326" superClass="de.innot.avreclipse.tool.assembler.input"/>
29+
</tool>
30+
<tool id="de.innot.avreclipse.tool.compiler.winavr.app.release.1372071518" name="AVR Compiler" superClass="de.innot.avreclipse.tool.compiler.winavr.app.release">
31+
<option id="de.innot.avreclipse.compiler.option.debug.level.1640693399" name="Generate Debugging Info" superClass="de.innot.avreclipse.compiler.option.debug.level" value="de.innot.avreclipse.compiler.option.debug.level.g3" valueType="enumerated"/>
32+
<option id="de.innot.avreclipse.compiler.option.optimize.33375696" name="Optimization Level" superClass="de.innot.avreclipse.compiler.option.optimize" value="de.innot.avreclipse.compiler.optimize.size" valueType="enumerated"/>
33+
<option id="de.innot.avreclipse.compiler.option.incpath.1717064685" name="Include Paths (-I)" superClass="de.innot.avreclipse.compiler.option.incpath" valueType="includePath">
34+
<listOptionValue builtIn="false" value="E:/Elektro/arduino/hardware/arduino/avr/variants/standard"/>
35+
<listOptionValue builtIn="false" value="E:/Elektro/arduino/hardware/arduino/avr/cores/arduino"/>
36+
</option>
37+
<option id="de.innot.avreclipse.compiler.option.def.528223329" name="Define Syms (-D)" superClass="de.innot.avreclipse.compiler.option.def"/>
38+
<inputType id="de.innot.avreclipse.compiler.winavr.input.2038006680" name="C Source Files" superClass="de.innot.avreclipse.compiler.winavr.input"/>
39+
</tool>
40+
<tool id="de.innot.avreclipse.tool.cppcompiler.app.release.1845316012" name="AVR C++ Compiler" superClass="de.innot.avreclipse.tool.cppcompiler.app.release">
41+
<option id="de.innot.avreclipse.cppcompiler.option.debug.level.1171274398" name="Generate Debugging Info" superClass="de.innot.avreclipse.cppcompiler.option.debug.level" value="de.innot.avreclipse.cppcompiler.option.debug.level.g3" valueType="enumerated"/>
42+
<option id="de.innot.avreclipse.cppcompiler.option.optimize.39578510" name="Optimization Level" superClass="de.innot.avreclipse.cppcompiler.option.optimize" value="de.innot.avreclipse.cppcompiler.optimize.size" valueType="enumerated"/>
43+
<option id="de.innot.avreclipse.cppcompiler.option.incpath.752692776" name="Include Paths (-I)" superClass="de.innot.avreclipse.cppcompiler.option.incpath" valueType="includePath">
44+
<listOptionValue builtIn="false" value="E:/Elektro/arduino/hardware/arduino/avr/variants/standard"/>
45+
<listOptionValue builtIn="false" value="E:/Elektro/arduino/hardware/arduino/avr/cores/arduino"/>
46+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
47+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/lib/SoftI2CMaster}&quot;"/>
48+
</option>
49+
<option id="de.innot.avreclipse.cppcompiler.option.def.1867196469" name="Define Syms (-D)" superClass="de.innot.avreclipse.cppcompiler.option.def"/>
50+
<option id="de.innot.avreclipse.cppcompiler.option.optimize.other.247153119" name="Other Optimization Flags" superClass="de.innot.avreclipse.cppcompiler.option.optimize.other" value="-ffunction-sections -fdata-sections" valueType="string"/>
51+
<option id="de.innot.avreclipse.cppcompiler.option.optimize.packstruct.477407436" name="Pack structs (-fpack-struct)" superClass="de.innot.avreclipse.cppcompiler.option.optimize.packstruct" value="false" valueType="boolean"/>
52+
<option id="de.innot.avreclipse.cppcompiler.option.optimize.shortenums.1764657050" name="Short enums (-fshort-enums)" superClass="de.innot.avreclipse.cppcompiler.option.optimize.shortenums" value="false" valueType="boolean"/>
53+
<inputType id="de.innot.avreclipse.cppcompiler.input.1320840307" superClass="de.innot.avreclipse.cppcompiler.input"/>
54+
</tool>
55+
<tool id="de.innot.avreclipse.tool.linker.winavr.app.release.1098932434" name="AVR C Linker" superClass="de.innot.avreclipse.tool.linker.winavr.app.release"/>
56+
<tool id="de.innot.avreclipse.tool.cpplinker.app.release.698797395" name="AVR C++ Linker" superClass="de.innot.avreclipse.tool.cpplinker.app.release">
57+
<option id="de.innot.avreclipse.cpplinker.option.libs.2014114297" name="Libraries (-l)" superClass="de.innot.avreclipse.cpplinker.option.libs" valueType="libs">
58+
<listOptionValue builtIn="false" value="UnoCore"/>
59+
</option>
60+
<option id="de.innot.avreclipse.cpplinker.option.libpath.462019446" name="Libraries Path (-L)" superClass="de.innot.avreclipse.cpplinker.option.libpath" valueType="stringList">
61+
<listOptionValue builtIn="false" value="&quot;${workspace_loc}/corelib&quot;"/>
62+
</option>
63+
<option id="de.innot.avreclipse.cpplinker.option.otherlinkargs.1717523034" name="Other Arguments" superClass="de.innot.avreclipse.cpplinker.option.otherlinkargs" value="-Wl,--gc-sections -mrelax" valueType="string"/>
64+
<inputType id="de.innot.avreclipse.tool.cpplinker.input.429552073" name="OBJ Files" superClass="de.innot.avreclipse.tool.cpplinker.input">
65+
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
66+
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
67+
</inputType>
68+
</tool>
69+
<tool id="de.innot.avreclipse.tool.archiver.winavr.base.1449436773" name="AVR Archiver" superClass="de.innot.avreclipse.tool.archiver.winavr.base"/>
70+
<tool command="avr-objdump" id="de.innot.avreclipse.tool.objdump.winavr.app.release.1610106695" name="AVR Create Extended Listing" superClass="de.innot.avreclipse.tool.objdump.winavr.app.release"/>
71+
<tool command="avr-objcopy" id="de.innot.avreclipse.tool.objcopy.flash.winavr.app.release.852459936" name="AVR Create Flash image" superClass="de.innot.avreclipse.tool.objcopy.flash.winavr.app.release"/>
72+
<tool id="de.innot.avreclipse.tool.objcopy.eeprom.winavr.app.release.874539195" name="AVR Create EEPROM image" superClass="de.innot.avreclipse.tool.objcopy.eeprom.winavr.app.release"/>
73+
<tool command="avr-size" id="de.innot.avreclipse.tool.size.winavr.app.release.1306176526" name="Print Size" superClass="de.innot.avreclipse.tool.size.winavr.app.release"/>
74+
<tool id="de.innot.avreclipse.tool.avrdude.app.release.440173151" name="AVRDude" superClass="de.innot.avreclipse.tool.avrdude.app.release"/>
75+
</toolChain>
76+
</folderInfo>
77+
</configuration>
78+
</storageModule>
79+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
80+
</cconfiguration>
81+
</storageModule>
82+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
83+
<storageModule moduleId="refreshScope"/>
84+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
85+
<project id="${ProjName}.null.1261896103" name="AVR Cross Target Application"/>
86+
</storageModule>
87+
<storageModule moduleId="scannerConfiguration">
88+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
89+
<scannerConfigBuildInfo instanceId="de.innot.avreclipse.configuration.app.release.1661013684">
90+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="de.innot.avreclipse.core.AVRGCCManagedMakePerProjectProfileC"/>
91+
</scannerConfigBuildInfo>
92+
<scannerConfigBuildInfo instanceId="de.innot.avreclipse.configuration.app.release.1661013684;de.innot.avreclipse.configuration.app.release.1661013684.;de.innot.avreclipse.tool.compiler.winavr.app.release.1372071518;de.innot.avreclipse.compiler.winavr.input.2038006680">
93+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="de.innot.avreclipse.core.AVRGCCManagedMakePerProjectProfileC"/>
94+
</scannerConfigBuildInfo>
95+
<scannerConfigBuildInfo instanceId="de.innot.avreclipse.configuration.app.release.1661013684;de.innot.avreclipse.configuration.app.release.1661013684.;de.innot.avreclipse.tool.cppcompiler.app.release.1845316012;de.innot.avreclipse.cppcompiler.input.1320840307">
96+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="de.innot.avreclipse.core.AVRGCCManagedMakePerProjectProfileCPP"/>
97+
</scannerConfigBuildInfo>
98+
</storageModule>
99+
</cproject>

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/Release/
2+
/.settings/

.project

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>SBMInfo</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.eclipse.cdt.core.ccnature</nature>
24+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26+
<nature>de.innot.avreclipse.core.avrnature</nature>
27+
</natures>
28+
<linkedResources>
29+
<link>
30+
<name>src/lib/SoftI2CMaster</name>
31+
<type>2</type>
32+
<location>E:/WORKSPACE_ARDUINO/lib/SoftI2CMaster</location>
33+
</link>
34+
</linkedResources>
35+
</projectDescription>

README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SMB - Smart Battery Module (Laptop Battery Pack) Info
2+
3+
Gibt die Daten des SMB Controllers aus.
4+
5+
Basiert auf https://github.com/PowerCartel/PackProbe von Power Cartel http://powercartel.com/projects/packprobe/. Hier gibt es auch weitere wertvolle Informationen.
6+
7+
Benötigt SoftI2CMaster Library für I2C / SMBus / https://github.com/felias-fogg/SoftI2CMaster/archive/master.zip
8+
9+
## Finden der Anschlüsse.
10+
Nach dem Booten sucht das Programm nach einem angeschlossenen I2C Device.
11+
Man kann also alle möglichen Pinkombinationen von Clock und Data am Battery Pack ausprobieren.
12+
Bei der Richtigen hört das Blinken der Led auf und es kommt sofort die Ausgabe "Found I2C device attached at address: ox0B" und direkt danach werden die Daten ausgegeben.
13+
14+
Bei den Laptop Battery Packs war Plus und Masse immer außen.
15+
Wenn mehr als 5 Kontakte vorhanden waren, waren sie wie folgt belegt:
16+
- Masse und Plus doppelt. z.B. + | + | Thermo | Data | Clock | - | -
17+
- Ein Enable (nur im Laptop mit Masse verbunden) und eine Signal Anschluss (nur im Battery Pack mit Masse verbunden). z.B. + | + | Clock | Data | Signal | Enable | Thermo | - | -
18+
19+
Die Clock und Data Eingänge waren bei meinen Packs die Anschlüsse mit einem Widerstand von ca. 300 k bis 1 MOhm nach Masse.
20+
Der Thermo Sensor Anschluss war uneinheitlich, mal nicht messabar beschaltet, mal 1 MOhm, mal 1,6 Volt, mal 10 kOhm nach Masse.
21+
22+
Zur Verbindung mit den Kontakten habe ich normales 1,5 qmm Kupferkabel aus der Hausinstallation genommen, dessen eines Ende ich mit einem Hammer etwas plattgeklopft hab. Stecknadeln oder Breadboard Wires gehen auch.
23+
24+
Die Daten werden nur einmalig nach dem Reset ausgegeben, nur die veränderlichen Werte wie Spannung / Strom / Temperatur / Ladung werden alle 3 Sekunden auf Veränderungen gecheckt.
25+
26+
Tested with bq20z70, bq20z451, bq2084, bq80201DBT, bq40z50.
27+
28+
Einen Schaltplan zu den Batterie Modulen gibt es im Datenblatt zum TI bq29311 auf Seite 9.
29+
30+
![Breadboard](https://github.com/ArminJo/Smart-Battery-Module-Info_For_Arduino/blob/master/img/Breadboard.jpg)
31+
32+
###Beispieloutput:
33+
I2C initalized sucessfully
34+
Found attached I2C device at 0xB
35+
36+
*** STATIC INFO ***
37+
```
38+
Chemistry: LION
39+
Manufacturer Name: DP
40+
Manufacturer Data:   K24005SDI 
41+
Device Name: bq20z451
42+
Serial Number: 11518
43+
Manufacture Date (YYYY-MM-DD): 2009-8-27
44+
Design Capacity (mAh): 5450
45+
Design Voltage: 10.950
46+
Specification Info: 49
47+
Cycle Count: 255
48+
Max Error of charge calculation (%): 1
49+
RemainingTimeAlarm (min): 10
50+
Remaining Capacity Alarm: 300
51+
Battery Mode (BIN): 0b110000000000001
52+
- Internal Charge Controller Supported
53+
- Battery OK
54+
- Disable AlarmWarning broadcast to Host and Smart Battery Charger
55+
- Disable broadcasts of ChargingVoltage and ChargingCurrent to Smart Battery Charger
56+
57+
*** MANUFACTURER INFO ***
58+
ManufacturerAccess: 304 / 0x130
59+
Device Type: 1105 / 0x451
60+
Hardware Version: 0xA6
61+
Firmware Version: 0.3
62+
Manufacturer Status (BIN): 0b10001111
63+
- FET Status 2
64+
- State: 0b1111
65+
Battery Pack removed
66+
67+
*** TEST INFO ***
68+
Average Current (mA): 1
69+
AtRateTimeToFull: 65535
70+
AtRateTimeToEmpty: 65535
71+
AtRateOK: 1
72+
73+
*** DYNAMIC INFO ***
74+
Full Charge Capacity (mAh): 2845
75+
Remaining Capacity (mAh): 2720
76+
Relative Charge(%): 96
77+
Absolute Charge(%): 50
78+
Minutes remaining for full charge: 7500
79+
Battery Status (BIN): 0b100100011100000
80+
- TERMINATE_CHARGE_ALARM
81+
- TERMINATE_DISCHARGE_ALARM
82+
- Initialized
83+
- Discharging
84+
- Fully Charged
85+
Voltage: 12.253
86+
Current (mA): 0
87+
Temperature (C): 24.85
88+
State of Health: 4084
89+
Cell 1 Voltage: 4.084
90+
Cell 2 Voltage: 4.085
91+
Cell 3 Voltage: 4.084
92+
93+
*** CHANGED VALUES ***
94+
```

img/Breadboard.jpg

182 KB
Loading

src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/lib/

0 commit comments

Comments
 (0)