You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/ArminJo/Smart-Battery-Module-Info_For_Arduino/commits/master)
[](https://github.com/ArminJo/Smart-Battery-Module-Info_For_Arduino/commits/master)

17
+
<br/>
18
+
<br/>
19
+
[](https://stand-with-ukraine.pp.ua)
20
+
21
+
</div>
22
+
23
+
#### If you find this program useful, please give it a star.
24
+
25
+
<br/>
26
+
11
27
12
28
# Disclaimer
13
29
**I do not know how to enter full access mode, clear permanent failure or unlock any controller IC.** Unfortunately according to most datasheets, you need an unlock key.
14
30
See also this [article from 2011](https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf).
15
31
Extract: *Macbook batteries ship with a default unseal password (0x36720414). This was found by reverse engineering a Macbook battery update. On Macbook batteries, the full access mode password is also hardcoded and default (0xffffffff).*
16
32
17
-
## Compile with the Arduino IDE
33
+
<br/>
34
+
35
+
# Compile with the Arduino IDE
18
36
Download and extract the repository. In the Arduino IDE open the sketch with File -> Open... and select the SBMInfo folder.
19
37
20
-
## Identifying the right connection
38
+
<br/>
39
+
40
+
# Identifying the right connection
21
41
Valuable information about battery pinout can also be found [here](https://www.laptopu.ro/community/laptop-battery-pinout/) or [here](https://powercartel.com/projects/packprobe/battery-connection/).<br/>
22
42
The minimal connector layout is: | GROUND | THERMISTOR (103AT) | CLOCK | DATA | VCC (11 or 14 volt) | (clock and data my be switched).
23
43
- The **thermistor** connection has 10 kΩ to ground at 25 degree celsius.
@@ -50,11 +70,15 @@ An example schematic for a SBM module can be found in the datasheet of TI bq2931
The charge control pin (9) is high as long as relative charge is below 95%. It can be used to control a NPN transistor, which collector controls a high side P FET.<br/>
55
77
The discharge control pin (10) is high as long as relative charge is above 5% and voltage, if available, is below 3300 mV. It can be used to control a logic level FET directly.<br/>
56
78
The switch off values can be changed [here](https://github.com/ArminJo/Smart-Battery-Module-Info_For_Arduino/blob/master/SBMInfo/SBMInfo.ino#L42)
57
79
80
+
<br/>
81
+
58
82
# LCD display content
59
83
### LCD Display before device connected
60
84
1. line: "SBMInfo" | Version | VCC voltage
@@ -79,18 +103,20 @@ The switch off values can be changed [here](https://github.com/ArminJo/Smart-Bat
79
103
|-|-|
80
104
|||
81
105
82
-
## German Documentation
106
+
<br/>
107
+
108
+
# Deutsche Documentation
83
109
Gibt die Daten des SMB Controllers aus.
84
110
Basiert auf https://github.com/PowerCartel/PackProbe von Power Cartel http://powercartel.com/projects/packprobe/. Hier gibt es auch weitere wertvolle Informationen.
85
111
86
-
## Finden der Anschlüsse.
87
-
In der Version 4.0 ist eine Spannungs und Widerstandsmessung mittels 4 Widerständen integriert, um die I2C Pins zu identifizieren.
88
-
Die Clock und Data Eingänge waren bei meinen Packs die Anschlüsse mit einem Widerstand von ca. 300 k bis 1 MΩ nach Masse.
112
+
## Finden der Anschlüsse.
113
+
In der Version 4.0 ist eine Spannungs und Widerstandsmessung mittels 4 Widerständen integriert, um die I2C Pins zu identifizieren.
114
+
Die Clock und Data Eingänge waren bei meinen Packs die Anschlüsse mit einem Widerstand von ca. 300 k bis 1 MΩ nach Masse.
89
115
Nach dem Booten sucht das Programm nach einem angeschlossenen I2C Device.
90
-
Man kann also alle möglichen Pinkombinationen von Clock und Data am Battery Pack ausprobieren.
91
-
Bei der Richtigen hört das Blinken der Led auf und es kommt sofort die Ausgabe `Found I2C device attached at address: 0x0B` und direkt danach werden die Daten ausgegeben.
116
+
Man kann also alle möglichen Pinkombinationen von Clock und Data am Battery Pack ausprobieren.
117
+
Bei der Richtigen hört das Blinken der Led auf und es kommt sofort die Ausgabe `Found I2C device attached at address: 0x0B` und direkt danach werden die Daten ausgegeben.
92
118
93
-
Bei den Laptop Battery Packs war Plus und Masse immer außen.
119
+
Bei den Laptop Battery Packs war Plus und Masse immer außen.
94
120
Wenn mehr als 5 Kontakte vorhanden waren, waren sie wie folgt belegt:
95
121
- Masse und Plus doppelt. z.B. + | + | Thermistor | Data | Clock | - | -
96
122
- Ein Enable (nur im Laptop mit Masse verbunden) und eine Signal Anschluss (nur im Battery Pack mit Masse verbunden). z.B. VCC | VCC | CLOCK | DATA | Signal | Enable | THERMISTOR | GROUND | GROUND |
@@ -99,19 +125,22 @@ Der Thermo-Sensor Anschluss war uneinheitlich, mal nicht messbar beschaltet, mal
99
125
100
126
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.
101
127
102
-
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.
128
+
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.
103
129
104
130
Tested with bq20z70, bq20z451, bq2084, bq80201DBT, bq40z50.
105
131
106
132
Einen Schaltplan zu den Batterie Modulen gibt es im Datenblatt zum TI bq29311 auf Seite 9.
107
133
108
-
### Sample output:
134
+
<br/>
135
+
136
+
# Sample output:
109
137
Sample outputs can be found in folder [extras](https://github.com/ArminJo/Smart-Battery-Module-Info_For_Arduino/tree/master/extras).
110
138
111
139
```
112
140
START ../src/SBMInfo.cpp
113
-
Version 4.0 from Oct 12 2021
114
-
No LiPo supply detected -> fast display timing
141
+
Version 4.3 from Nov 23 2023
142
+
Configured to set charge control pin 9 to low above 95 %
143
+
Configured to stop discharge control pin 10 to low below 5 % or 3300 mV
115
144
Found attached I2C device at 0xB
116
145
117
146
Battery mode 0x6081 | 0b110000010000001
@@ -163,7 +192,11 @@ Battery status 0xC0 | 0b11000000
163
192
80 Initialized
164
193
40 Discharging
165
194
166
-
Pack config and status 0x6B | 0b11010110000
195
+
Pack config and status 0x8230 | 0b1000001000110000
196
+
- Pack not inserted
197
+
- Voltage > EDV2
198
+
- Pack sealed
199
+
- Discharge is qualified for capacity learning
167
200
168
201
169
202
*** DYNAMIC NON STANDARD INFO ***
@@ -193,15 +226,21 @@ Minutes remaining until empty 4 h 7 min
193
226
Average minutes remaining until empty: 16 h 11 min
0 commit comments