Today's entry is an update in the progress made so far, which is "close, but not quite there yet". I've received a lot of fantastic suggestions, and I have to give credit where it's due:
@SomeOne: For providing the lead to the patent, which led to the now-famous Table 3 with the operational parameters binary codes;
@Mike Clay: For suggesting converting the codes into binary or hex and looking for patterns;
@Tim Nowaczyk: For having the 'nads to ask Braun's customer service if he could get the lookup codes directly. Hey, the worst they could do was say "no" and that's exactly what they did!
@Hargobind Khalsa: For three key observations: That the leftmost 5 digits of the codes don't appear to exceed 65536, or 2^16; That given this, the codes break down in 13 bits + 3 bits checksum; That the last digit of the code seems to conform as a standard barcode/UPC check digit.
@Brandon Siegel: For observing that the volume code "1101" for 250ml appears consistently for the Columbian, Crema and Cleaner programs when the bits are read in little-endian (right to left).
@Andreas Happel: For providing 1) codes for Twinings Tea and Cafe Crema Vollmudig that can be "mocked" to get more measurement data; 2) his own empirical data on them; 3) observations that European T-DISCs have a slightly different encoding with a leading zero which may affect decoding the internal algorithms or lookups.
The Story So Far...
For those following along at home, here's a quick overview of the mini-breakthroughs that the above contributors, especially Brandon Siegel, have made possible:
- Of the six digits decoded from the barcodes, the first five are significant, while the last is a standard UPC/barcode check digit;
- Converting the five significant digits to binary provides 16 bits, which suggests 13 bits for data (per Table 3) and 3 bits as an internal checksum;
- A "landmark" value for a beverage volume of 250ml (dec 13 or 1101 base-2), which should be seen in the Columbian, Crema and Cleaner programs, appears in a consistent location starting with the 7th bit when the binary is read in little-endian format;
So, if we take the codes for the Three Amigos (Columbian, Crema, Cleaner):
64226
44738
07879
... and convert them to little-endian binary:
0100011101011111
0100001101110101
1110001101111000
the code for dispensing 250ml is readily apparent. This is a fairly significant coincidence which suggests that bits 7,8,9,10 are responsible for controlling the water pump. However, this gets dashed to pieces when we look at the binary for the Latte and Cappucino discs which should dispense 148ml and 118ml respectively - which don't align to any values in Table 3 without some rounding and coercion.
In this range, Table 3 only accounts for 110ml, 130ml, and 150ml (0110, 0111 and 1000) - looking at the binary for the Latte and Cappucino discs at bits 7-10 we see:
1110111000011111 - 150ml
1110111111101111 - 300ml
The Latte program could be considered correct if we round-up the 5oz I originally observed (it's 147.8ml), but the Cappucino program is completely wrong - it's more than the original beverage!
Conclusions
So far, the code is proving resilient to applying a consistent, rational pattern as suggested in the patent. In turn, this suggests a couple of theories:
- The table is completely wrong or needs adjusting
- The values in the code have some interplay that may look up against another table, or perhaps adjust values, that can impose some consistency - perhaps the three "checksum" bits are involved?
As always, I'm ever-grateful for the input - I'm now investigating setting up a wiki to track this project so that I can aggregate the findings without having a string of blog posts! I need to get back to my original articles in short order...!