diff --git a/Custom-Bluetooth-Scale.md b/Custom-Bluetooth-Scale.md
index 86617be..a3ba105 100644
--- a/Custom-Bluetooth-Scale.md
+++ b/Custom-Bluetooth-Scale.md
@@ -1,7 +1,7 @@
@@ -9,14 +9,14 @@
-
-
+
+
Figure A: Final result of the hacked bathroom scale (front)
|
-
-
+
+
Figure B: Final result of the hacked bathroom scale (back)
|
@@ -31,21 +31,21 @@ Nowadays all smartphones supports Bluetooth 4.x and not Bluetooth 3.x anymore, s
-
-
+
+
Figure 7.1: HM-10 Bluetooth 4.x module (front)
|
-
-
+
+
Figure 7.2: HM-10 Bluetooth 4.x module (back)
|
-Luckily, we don't need to change anything because we can use the same pins as for the HC-05. For the HM-10 configuration we can also use the same Arduino sketch and parameters like in the chapter [Connecting a HC-05 Bluetooth module](Custom-Bluetooth-Scale/_edit#connecting-a-hc-05-bluetooth-module-to-a-tablet) (only change "both NL & CR" back to "no line ending"). It is even slightly easier because we don't have to pull high a KEY pin anymore. You can find the AT commands in the [HM-10 manual](../blob/master/doc/custom_scale/hm_10/HM_10_Manual.pdf). For example to change the Bluetooth device name to `openScale` send the AT command `AT+NAMEopenScale` to the HM-10 module.
+Luckily, we don't need to change anything because we can use the same pins as for the HC-05. For the HM-10 configuration we can also use the same Arduino sketch and parameters like in the chapter [Connecting a HC-05 Bluetooth module](Custom-Bluetooth-Scale/_edit#connecting-a-hc-05-bluetooth-module-to-a-tablet) (only change "both NL & CR" back to "no line ending"). It is even slightly easier because we don't have to pull high a KEY pin anymore. You can find the AT commands in the [HM-10 manual](../blob/master/docs/custom_scale/hm_10/HM_10_Manual.pdf). For example to change the Bluetooth device name to `openScale` send the AT command `AT+NAMEopenScale` to the HM-10 module.
## Reducing the power consumption
@@ -121,11 +121,11 @@ To minimize the power consumption a bit more I soldered out the power LED on the
| Active | 48mA |
| Sleep | 0.035mA |
-So in the end I could power supply the Arduino for around 3 years with the 4 AAA batteries (960mAh). To power down all external modules, like the Bluetooth, EEPROM, RTC module, while the Arduino is in sleeping mode I used an external [BC546 NPN Transistor](../raw/master/doc/bc546_transistor/bc546_datasheetpdf) as a switch. I connected the transistor as in figure 6.1 or figure 2.4.
+So in the end I could power supply the Arduino for around 3 years with the 4 AAA batteries (960mAh). To power down all external modules, like the Bluetooth, EEPROM, RTC module, while the Arduino is in sleeping mode I used an external [BC546 NPN Transistor](../raw/master/docs/bc546_transistor/bc546_datasheetpdf) as a switch. I connected the transistor as in figure 6.1 or figure 2.4.
-
-
+
+
Figure 6.1: Schematic of the BC546 NPN Transistor
@@ -198,26 +198,26 @@ Note in figure 2.4 that I power supply the bathroom scale with the 4 AAA batteri
## Adding external I²C EEPROM
-For temporally storing the measured values, even if the power supply is disconnected, I used an external [512 Kbit I²C EEPROM 24LC512](../raw/master/doc/eeprom_24lc512/24lc512_datasheet.pdf), see figure 5.2-5.3.
+For temporally storing the measured values, even if the power supply is disconnected, I used an external [512 Kbit I²C EEPROM 24LC512](../raw/master/docs/eeprom_24lc512/24lc512_datasheet.pdf), see figure 5.2-5.3.
-
-
+
+
Figure 5.1: Schematic of the 24LC512 I²C EEPROM
|
-
-
+
+
Figure 5.2: I²C EEPROM module (front)
|
-
-
+
+
Figure 5.3: I²C EEPROM module (back)
|
@@ -379,14 +379,14 @@ This time I bought a different [I²C RTC module](http://www.roboter-bausatz.de/3
-
-
+
+
Figure 4.1: I²C RTC module (front)
|
-
-
+
+
Figure 4.2: I²C RTC module (back)
|
@@ -441,14 +441,14 @@ For a wireless connection from my scale to my Nexus 10 tablet I am using a HC-05
-
-
+
+
Figure 3.1: HC-05 Bluetooth module (front)
|
-
-
+
+
Figure 3.2: HC-05 Bluetooth module (back)
|
@@ -486,7 +486,7 @@ For changing the default parameters I had to send AT commands to the Bluetooth m
| RXD | 8 |
| KEY | 6 |
-The KEY pin has to be pulled high to enter AT mode of the HC-05 Bluetooth module. Sometimes the KEY pin is not on the breakout board. If that the case you have to solder a wire directly to pin 34 on the HC-05 module, see the [HC-05 Manual](../raw/master/doc/hc_05/HC_05_Manual.pdf) for more details. The default baud rate in AT command mode is 38400 bits/s. Use the following sketch to configure the HC-05 Bluetooth module:
+The KEY pin has to be pulled high to enter AT mode of the HC-05 Bluetooth module. Sometimes the KEY pin is not on the breakout board. If that the case you have to solder a wire directly to pin 34 on the HC-05 module, see the [HC-05 Manual](../raw/master/docs/hc_05/HC_05_Manual.pdf) for more details. The default baud rate in AT command mode is 38400 bits/s. Use the following sketch to configure the HC-05 Bluetooth module:
```C
#include
@@ -520,7 +520,7 @@ void loop()
}
```
-If you successfully in the AT mode the HC-05 Bluetooth module LED blinks every 2 seconds. Open the Serial Monitor in the Arduino IDE under Tools->Serial Monitor. Change "no line ending " to "both NL & CR" found just beside the baud rate. Now you can send a test command with `AT` if everything works fine you should receive a `OK`. Following is a short summary of the most important AT commands of the available [HC-05 AT Commands](../raw/master/doc/hc_05/HC_05_AT_Commands.pdf):
+If you successfully in the AT mode the HC-05 Bluetooth module LED blinks every 2 seconds. Open the Serial Monitor in the Arduino IDE under Tools->Serial Monitor. Change "no line ending " to "both NL & CR" found just beside the baud rate. Now you can send a test command with `AT` if everything works fine you should receive a `OK`. Following is a short summary of the most important AT commands of the available [HC-05 AT Commands](../raw/master/docs/hc_05/HC_05_AT_Commands.pdf):
| AT command | Response | Parameter | Comment |
|:----------:|:--------:|:---------:|:-------:|
@@ -542,20 +542,20 @@ In the previous step we had successful reverse engineered the scale's display. T
-
-
+
+
Figure 2.1: Arduino Pro Mini board
|
-
-
+
+
Figure 2.2: CP2102 USB to Serial converter (front)
|
-
-
+
+
Figure 2.3: CP2102 USB to Serial converter (back)
|
@@ -577,8 +577,8 @@ Note that I used 3.3V (see pin 3V3 on figure 2.3) from the CP2102 converter boar
I connected the scale's display connector to the Arduino Pro Mini as the following schematic:
-
-
+
+
Figure 2.4: Schematic overview of the openScale project
@@ -903,8 +903,8 @@ Note to save memory usage the measured values are stored as integers and not as
First of all I had to find a suitable bathroom scale that I wanted to reverse engineer. I was searching for a cheap bathroom scale that can analyse not only my weight but also my body fat, water and muscle. The scale design should be clear and the display of the scale should have some kind of a simple seven segment display (I hoped that a simple display would be easier to reverse engineer). The [Sanitas SBF12 scale](http://www.sanitas-online.de/web/en/products/weight/SBF12.php) that I found in a department store seemed to be right for my purpose. So I bought one for only 20€ (around 25$), see figure 1.1.
-
-
+
+
Figure 1.1: Sanitas SBF 12 scale
@@ -914,20 +914,20 @@ To gain access to the inside of the scale I had to unscrew only a few screws on
-
-
+
+
Figure 1.2: Scale overview
|
-
-
+
+
Figure 1.3: Back side of the circuit board
|
-
-
+
+
Figure 1.4: Front side of the circuit board
|
@@ -943,20 +943,20 @@ The first step was to connect all pins with wires that are routed to the display
-
-
+
+
Figure 1.5: Connected wires unordered
|
-
-
+
+
Figure 1.6: Connected wires ordered
|
-
-
+
+
Figure 1.7: Back side of the scale wired
|
@@ -965,20 +965,20 @@ The first step was to connect all pins with wires that are routed to the display
-
-
+
+
Figure 1.8: Front side of the scale wired
|
-
-
+
+
Figure 1.9: Attached notes to the wires
|
-
-
+
+
Figure 1.10: Pin layout of the display connector
|
@@ -988,8 +988,8 @@ The first step was to connect all pins with wires that are routed to the display
Next step is to analyse the signals that are controlling the display. I had the opportunity to use a 16 digital channels oscilloscope ([Agilent Technologies MSO7014B](http://www.keysight.com/en/pd-1788165-pn-MSO7014B/mixed-signal-oscilloscope-100-mhz-4-analog-plus-16-digital-channels)) for this step, see figure 1.11. Alternative you can use a microcontroller like [Arduino](http://www.arduino.cc/) to read the signals.
-
-
+
+
Figure 1.11: The 16 digital channels oscilloscope for analysing the signals
@@ -1022,20 +1022,20 @@ The question for the reverse engineering process was how the signals would respo
-
-
+
+
Figure 1.12: signals of value "P-01"
|
-
-
+
+
Figure 1.13: signals of value "P-02"
|
-
-
+
+
Figure 1.14: signals of value "P-03"
|
@@ -1044,20 +1044,20 @@ The question for the reverse engineering process was how the signals would respo
-
-
+
+
Figure 1.15: signals of value "P-04"
|
-
-
+
+
Figure 1.16: signals of value "P-05"
|
-
-
+
+
Figure 1.17: signals of value "P-06"
|
@@ -1066,20 +1066,20 @@ The question for the reverse engineering process was how the signals would respo
-
-
+
+
Figure 1.18: signals of value "P-07"
|
-
-
+
+
Figure 1.19: signals of value "P-08"
|
-
-
+
+
Figure 1.20: signals of value "P-09"
|
@@ -1088,20 +1088,20 @@ The question for the reverse engineering process was how the signals would respo
-
-
+
+
Figure 1.21: signals of value "0.0 kg"
|
-
-
+
+
Figure 1.22: signals while displaying the person symbol, see signal on D8 and D9
|
-
-
+
+
Figure 1.23: signals while displaying the person and age symbol, see signal D8 and D9
|
@@ -1113,8 +1113,8 @@ For decoding the 8 Bit word I compared the recorded signals. I first chose two n
-
-
+
+
Figure 1.24: seven segment display
|