The Next Home of Chris Chapman's Free Thoughts on Agile, .NET, SharePoint, what-have-you, whatnot. 
# Wednesday, November 28, 2007
Update:  See Part 2 of my investigation.

Tassimo_machineLike many techno-geeks, one of my favourite kitchen appliances is the coffee machine.  Mine happens to be a Braun Tassimo T1200, which is by far and away the coolest coffee machine because it is actually a programmable beverage dispensing system.  With it I can make anything from a run-of-the-mill cup of Maxwell House to espresso, latte, cappucino, hot chocolate and everything inbetween.  And with almost zero cleanup.

What makes this possible are the pre-packaged, sealed pods (called T-DISCS) for each drink type that has a barcode printed on its lower surface.  Once placed in the machine, a scanner reads the barcode on the pod which then “programs” the Tassimo to prepare the bevvy with the precise amount of water at an exact temperature for a specific time.  The result is amazingly consistent quality from cup to cup!

Tassimo_pods2

Pictured above are three Tassimo coffee T-DISCs that are available here in Canada (Starbucks is coming soon!) and a plastic cleaning disc that’s used for descaling, etc.  As you can see, each features a different barcode to “program” the machine accordingly.  Of course, being a geek I just had to know how these codes worked to make my daily cup of bliss, so I set about to reverse-engineer/hack my Tassimo.

Starting the Hack – Reading the T-DISC Barcodes

I began toying with how the Tassimo brews coffee by examining the effect of swapping the barcodes – I used my color scanner/printer to make a replica of the Cafe Crema barcode and put it over top of the code for the Columbian coffee pod to see if it would give a similar frothy head.  No dice, but I was still curious how the codes configured the machine’s settings for each brew.  So, my first plan of attack was to decipher the barcodes to see if I could observe any patterns.

Step 1:  Scanning the T-DISC barcodes with a “declawed” :CueCat

Cue_catIn order to read the codes, I needed a barcode reader – and I had just the thing:  An old IBM :CueCat.  The :CueCat was originally intended to be used as a web-browsing aide, allowing users to “scan” barcodes that would navigate their browser to a specific site.  I know: I cannot imagine why the idea flopped.  If you want your own, I think they can still be had on eBay.

The :CueCat plugs into your USB port and pushes scanned data into your machine in much the same way as a keyboard.  I tested mine and discovered the output was encrypted – this required a hack to “declaw” the cat.

Once complete, I was quickly able to decipher codes from five pods and the cleaning disc using just the :CueCat and Notepad2.  I scanned each barcode several times to ensure that I was getting an accurate and consistent reading: (NB: I added labels to each code for clarity)

Tassimo_tdisc_codes

Reviewing this data, I discovered that the T-DISCs are encoded with six-digit “programs” which should correlate to programming the Tassimo’s brewing parameters of water, temperature and time.  Additionally, some interesting features of the codes were revealed:

  • Both the Latte and Cappucino T-DISCS share the same first two digits: “63”;  given that they are almost identical, this provides some insight into the purpose for the first tuple;
  • The cleaning disc’s code begins with a unique tuple, “07” – this could indicate a special code for its purpose.

Step 2:  Determining the T-DISC barcode symbology

Having decoded the data behind the T-DISC barcodes, I now needed to determine the symbology that was used to encode them.  Knowing this, I could then use a barcode generator to create my own codes for manipulating the machine.

After a bit of Googling, I came across a site I’d seen before for Wasp Barcode Technologies – they make all manner of readers, scanners and software related to barcoding.  They also have a web-based barcode generator:

Wasp_barcode_generator

Using trial-and-error, I applied each of the generator’s thirteen symbologies to the code for the Nabob Columbian coffee (642262) until I found one that matched the source bar code:  Interleaved 2 of 5.  This is a fairly common standard that’s literally applied to everything from soup to nuts.

I cross-checked the T-DISC codes with the symbology FAQ and determined that it did not include a checksum field which strengthened my earlier observation that the code’s three tuples were used to program the Tassimo’s brewing parameters directly.

Step 3:  Using the cleaning disc as a mock object

Before I could set to manipulating the Tassimo brewing codes, I needed to get some baseline measurements from the barcodes I knew.  In effect, I wanted to run some physical unit tests on the machine using known data so that I could record the volume and temperature of water dispensed and respective brew cycle time;  I’d then try to “map” these measurements back to the codes to determine correlations to “programming” the Tassimo.

Using real pods to run these “unit tests” could get expensive – fast.  So, my approach was to use the plastic cleaning disc as a mock object in conjunction with barcodes generated from the six-digit codes I scanned in from each T-DISC in Step 1.  By doing this, I could not only observe the effects of the codes on the brew parameters, but also verify that the barcodes worked and only waste water and not precious coffee in the process.

I began by using the Wasp Barcode Generator to create barcodes for each of the five beverage discs which I pasted into a Visio diagram and sized so that when printed and cut out, they would fit on to the barcode scanner in the machine.  This worked out to the convenient dimensions of 1” x 0.5”.  NB:  You can download the PDF of my worksheet here.

Mocking up a T-DISC

Mocking up a T-DISC is quite simple.  Below is a shot of the scanner in the Tassimo brew chamber where we need to place the generated barcode:

Tassimo_barcode_reader_detail

Next, here’s a sequence showing how I use the cleaning disc as a stand-in or “mock object” that simulates a Nabob Cafe Crema T-DISC.  On the left, I’m placing a generated barcode on the scanner window which will effectively override the cleaning disc’s program;  on the right, I’ve lowered the T-DISC loading tray which has the cleaning disc placed on it.  The disc is designed to allow water to flow straight through the spigot;  a real disc would retard the flow somewhat as the brewing takes place inside it before flowing through the spigot.

Tassimo_placing_crema_barcodeTassimo_mock_object

To run the test, I placed a pyrex measuring cup in the machine, closed the clamshell and allowed the machine to scan the code (you can see this happen through the clear plastic window) and pressed the “start” button.  I recorded the time for the brew cycle and the temperature of the dispensed water using a meat thermometer.

T-DISC Unit Test Observations

From my “unit tests”, I recorded the following observations:

Tdisc_brew_measurements

Not exactly promising – while I did have more information, a pattern still wasn’t emerging to provide a positive correlation between number “x” and the three parameters.  I needed to run further tests against the machine using barcodes for extreme edge cases to try a coerce the Tassimo to reveal its programming secrets.  To this end, I created barcodes for the series “11 11 11” to “99 99 99”, with the only noticeable effect happening when I ran “55 55 55”:

Tdisc_edgecase_measurements2

Here's how the results table breaks down:

  • The "Code Numbers" column corresponds to the code digits I used to generate the barcode, indicated with the graphic in the next column for visual verification;
  • The Outcomes column indicates the Tassimo's status after reading the barcode:  "Auto" for valid programs that can be run, and "Manual" for programs that failed to run - effectively making the machine a hot water dispenser;
  • The three stages columns correspond to the steps in the brewing cycle, depending on the type of beverage;  coffees tend to have three stages, with the first being a short 3s burst of water to pre-saturate the coffee, followed by a pause of about 10-12s, then a flow of hot water for 45 or more seconds.  Other beverages will just run straight through in one stage, or have a pre-saturate stage followed by a flow stage;
  • The Water column shows the amount of water in millilitres - I did this as the machine is European in design and may use metric over imperial measures;
  • The water Temperature column shows results in degrees Faranheit; 

Conclusions and Next Steps

Over the course of this hack I managed to learn several things about how the Tassimo single-serve beverage system works by employing basic “black box” testing techniques and using the cleaning disc as a “mock object” to run simulations to record various machine behaviours.  I observed that:

  1. Each beverage T-DISC (and thus the Tassimo itself) uses a barcode that employs Interleaved 2 of 5 symbology to control how it is “brewed” according to amount and temperature of water and time;
  2. These codes translate into six-digit strings that do not include any checksums;
  3. The six-digit strings can be used to create corresponding barcodes to simulate existing beverage products;
  4. There is definitely a way to modify these codes to enhance or degrade the brewing process!

What remains is to compile more test results using additional barcodes for more edge cases to see how the machine can be manipulated.  As I gather more information, I’ll post the results – and of course, if you happen to own a Tassimo, I’d love to hear about your experiments and discoveries!

Happy hacking!

Tags:
Wednesday, November 28, 2007 9:37:27 PM (Eastern Standard Time, UTC-05:00)  #    Comments [20] -
amuse | hacks

Friday, November 30, 2007 1:45:32 AM (Eastern Standard Time, UTC-05:00)
I wonder if it'd be helpful to take into account the back-pressure that's in the system when you have a particular pod attached. Depending on the tamping and grind size of the coffee in each pod, the actual amount of water that moves through the system could be affected. It could be more than 3 variables... maybe the pod code determines other things like pre-soak time, pressure, or rate of flow?

Looking forward to seeing what you figure out!
Friday, November 30, 2007 3:42:07 AM (Eastern Standard Time, UTC-05:00)
I'd suggest modifying single digits in the barcodes and re-running them to see what the delta is.
Jon
Friday, November 30, 2007 8:20:32 AM (Eastern Standard Time, UTC-05:00)
@Jason: You're probably spot-on as there is a definite difference between the pods and the cleaning disc, and I do need to take into account that the pods are designed to use inverse flow to brew the beverage. If you look at the first picture of the brew chamber above, the water inflow is the small spigot to the left.

@Jon: Exactly! I'm planning on a series of tests to change up individual digits to see the effects. I did try playing with the cleaning disc code, which starts with "07" and had no luck - mind you, I was only subbing in values for the other remaining tuples.
Chris Chapman
Friday, November 30, 2007 9:59:05 AM (Eastern Standard Time, UTC-05:00)
Try converting the codes to hex or binary, in order to search for patterns. Also note that one of the digits might be still be a checksum, just not one that pertains to bar-coding. That is, they might have added one at the "application level" of the programming in order to discard random bar-codes from unrelated products.
Mike Clay
Friday, November 30, 2007 10:41:54 AM (Eastern Standard Time, UTC-05:00)
@Mike: Thanks for the tip! I had thought about an embedded checksum - maybe doing the conversions to hex or binary might reveal them. And you're probably right about some internal verification in the firmware to sort out random barcodes.
Chris Chapman
Friday, November 30, 2007 4:01:48 PM (Eastern Standard Time, UTC-05:00)
This might help:

http://www.google.com/patents?id=h_OAAAAAEBAJ&printsec=description&zoom=4&dq=coffee+barcode#PPA37,M1
SomeOne
Friday, November 30, 2007 8:50:07 PM (Eastern Standard Time, UTC-05:00)
SCORE! Wow - well, thanks very much "SomeOne"! I'd send you a pint if I knew who you are!

This looks like it has the info I need - I'll review and try it out...!
Chris Chapman
Saturday, December 01, 2007 4:45:54 AM (Eastern Standard Time, UTC-05:00)
Chris, i came across this page yesterday and thought I was impressed.
Today I re-visited in the intention of posting a comment to encourage you in your quest to decipher these barcodes, and I find the link to the patent that "SomeOne" has posted..... WOW!
Seems you've almost got this one licked.
Now I'm interested for you to tell us of your decoding results.
I'm particularly interested in the patent mentioning the difference in milk preparations based on the machine "memorizing" what the previous drink was (page 41 on the PDF). I bought some "spare" milk cartridges but they're identical to both the cappucino and latte milk cartridges. I'm really interested in what happens to these cartridges if you put them in after some tea for example...
So many possibilities with this system. Designed by engineers, for engineers, I say. :-)
Keep up the really excellent work. It's much appreciated!
Jake
Saturday, December 01, 2007 5:31:15 AM (Eastern Standard Time, UTC-05:00)
No problem.

I think there is still quite some work to do. I could not see how the mentioned 12 bit are coded into the 6-digit barcode.
SomeOne
Saturday, December 01, 2007 9:34:33 AM (Eastern Standard Time, UTC-05:00)
@Jake: Thanks very much for the encouragement! It seems *a lot* of folks are curious about how the Tassimo works as well - I've had quite a few hits on the blog so far.

With respect to the milk functions, I'm curious as well as to how the program from "Cartridge 1" (say Espresso) influences the program for "Cartridge 2" which as you point out could be a Latte or Cappucino disc and produce different results. Some of it can be explained in their codes, which are similar.

I'll be posting my findings shortly on analyzing the binary tables - there's a few experiments I want to try out first.

@SomeOne: Thanks again for the help - I have an idea on how the codes relate to the 13 bits in the tables...!
Chris Chapman
Wednesday, December 05, 2007 9:17:39 AM (Eastern Standard Time, UTC-05:00)
Chris,

Patent documents do NOT contain precise, real-world specifications for an invention. Patent documents do not serve to reveal trade secrets. Rather, they exist to present ONLY as much information as would be necessary to legally secure the rights to an invention by a demonstration of what makes the concept unique.

It sounds like you think you are going to find these "12/13 bits" (referenced in the patent) of information in the bar code, or that the decimal numbers to which the symbology decodes can be directly mapped to device operation.

This is incorrect. You risk wasting virtually all of your time if you take this approach.

The T-DISC barcode uses interleaved 2 of 5 symbology to encode a series of subfields into one larger bitfield. The bitfield is exactly 48 bits wide. Within this bitfield are an unknown number of subfields. Each subfield represents a metric with a maximum value of the fieldlength to the second power.

In order to decipher exactly how the numeric values contained within the subfields map to device operation parameters, you will need to first identify the boundaries of the subfields. Note that the decimal representation of the subfields and overall bitfield have nothing at all to do with the device's interpretation of the encoded information. Therefore, the subfields are unlikely to be aligned with any easy-to-realize boundaries, such as fields of size 8 or 16. More likely, you'll see flags and fields of size 2 through 6.


Once you discover the field boundaries, you should then encode sequential values into these fields, and measure the operational deltas of the device.

One caveat, however:

I strongly intuit that a checksum algorithm is in place. It could be as simple as the last 8 bits of 48 bits encoded as simple CRC or LRC value (computed by logically XOR'ing the binary values of decimal numbers together.)

If you are unable to decipher the checksumming mechanism, you will never be able to map subfield values to device operation paramaters because they be rejected by the device! Therefore, you'll often end up in "manual" mode, like you saw when entering repeated decimal numbers.

[I theorize that the checksum is only 8 bits wide, because you had one success out of nine when using repeated decimals as input.]

Discovering the field boundries might be accomplished by mapping out known-good bitfields along with the corresponding device operation parameters. One could then observe the differences in the fields in relation to device function, and intuit the subfield ranges in use.

It will be near impossible to dechipher the feilds without knowing the checksum algorithm by mapping input to operation. However, as I just mentioned, you do still have a change of mapping known-good input to operation, and from there -- you stand a chance of revealing the checksum mechanism.
James McCafferty
Thursday, December 06, 2007 4:39:43 AM (Eastern Standard Time, UTC-05:00)
Most of this did go over my head. But isn't it possible that the Tassimo units contain a table of programs or sub routines that correspond to the barcode. So a particular number in a particular position might cause a specific chain of characteristics in the brew process, rather than just relating to one characteristic. Perhaps the secret is in the chips.

You mentioned the brewing parameters of water, temperature and time. I wonder if there might be additional parameters: pressure and frequency. They could vary the pump during the brew process or oscillate it during brewing.

BBOCK
Thursday, December 06, 2007 4:41:42 AM (Eastern Standard Time, UTC-05:00)
ummm. Nevermind! I didn't notice part 2.
BBOCK
Thursday, December 06, 2007 8:15:24 AM (Eastern Standard Time, UTC-05:00)
@BBOCK: No problem - be sure to check out Part 3 as well...

http://blog.chapmanconsulting.ca/2007/12/05/Hacking+The+Tassimo+Part+3+Updates.aspx
Chris Chapman
Monday, December 10, 2007 11:21:37 PM (Eastern Standard Time, UTC-05:00)
I got a big kick out of your post. I stopped using the Tassimo though I liked the design and use because I didn't like the coffee choices ( too dark for me) and didn't want to pay the shipping on the discs. To heat up water for making tea I saved the tops of the discs and placed them back into the unit--no decoding required, didn't really matter if temp was 175 or 180, easier than microwave. I would like to see someone hack the brewing unit and retrofit it for other coffee pods.
carolyn g
Tuesday, December 11, 2007 9:31:38 AM (Eastern Standard Time, UTC-05:00)
@Carolyn: I LOLed about your method for using the Tassimo as a hot water dispenser - I mentioned a similar idea to some friends who have one and they did a forehead slap: They heat up water in the microwave to warm bottles for their 1 year old.

Retrofitting the Tassimo for pods other than what it's intended would be ambitious - the entire clamshell mechanism would need to be reconfigured - not impossible, but definitely ambitious. For example, with Keurig style machines, you'd need to have a syringe to shower the contents with hot water - tricky.

And of course, you need to hack the barcodes! Still working on that - I've been busy getting a wiki site set up to aggregate my material and contributions from others.

Thanks for the comments!

Chris.
Chris R Chapman
Wednesday, December 19, 2007 5:15:26 PM (Eastern Standard Time, UTC-05:00)
I am just curious if anyone has successfully reused a t-disc and if so, how? I tried an espresso disc and while it did read, it leaked everywhere.
Jason B. Swaim
Wednesday, December 19, 2007 7:28:56 PM (Eastern Standard Time, UTC-05:00)
@Jason: I haven't heard of anyone successfully reusing a T-DISC - and I think you've discovered a reason why! Because the discs use inverse flow to "brew", there's some significant pressures that are applied which need the bottom (top?) to be perfectly sealed.

In addition, you need to use a code that compliments the type of coffee you're brewing - hence my interest in understanding how the unit works to control the brew parameters.

This isn't to say it's impossible to make a reusable T-DISC. Just that there's more to it than meets the eye.
Chris Chapman
Sunday, December 23, 2007 9:04:20 AM (Eastern Standard Time, UTC-05:00)
Great ! I searched everywhere on how to make the darn thing spit out just plain old hot water. This guide gave a great way! I hate machines that force you to use their product. (It was a gift) Great guide, thanks!
Tea Maker
Tuesday, January 01, 2008 10:39:00 AM (Eastern Standard Time, UTC-05:00)
to heat just hot water I just use the cleaning disk.
rick
Comments are closed.
About Me
I am a Toronto-based software consultant specializing in SharePoint, .NET technologies and agile/iterative/lean software project management practices. Currently, I am employed by Microsoft Consulting Services (MCS) Canada as an Application Development and Information Worker Consultant, focusing on delivering guidance and subject matter expertise to enterprise customers who have or are in the process of deploying Microsoft technologies.

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Chris R. Chapman
Sign In
Archive
<November 2007>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678
Statistics
Total Posts: 194
This Year: 2
This Month: 0
This Week: 0
Comments: 106
All Content © 2010, Chris R. Chapman
DasBlog theme 'Business' created by Christoph De Baene (delarou)