Short version: I hacked the most advanced tea making device to make it play music from Star Wars. To get a sense of what this project was about check out the video below.
The goal of this project was to hack the Breville One-Touch Tea Maker to give it some extra personality while it was making a pot of tea. The whole concept was a challenge/request by my friend Vince at Econify.com He was the project sponsor and the end result of the hack became a great gift for one of his employee's who is really into his tea (or so I assume)!
I should clarify that this is not a real "hack" or at least not a hack in the way most people would think. What I do here with that little black box next to the tea maker is read the power signature of the tea maker and determine what state it's in from how much power it's using now vs previous time periods. By monitoring the tea maker's current usage I'm able to tell when it's just sitting around waiting, boiling water, lowering the basket, brewing the tea, raising the basket, and when it's all done.
This is not an entirely new idea. It's actually used quite a bit in the energy industry. It's technical term (usually when applied to a whole building or system) is called power disaggregation. This is a fancy term for "figuring out what thing in your house is turned on by looking at how much power (usually in watts) you are using." Here's some info on the idea https://lids.mit.edu/research/research-highlights/power-disaggregation
I wish I could say that the approach here was the first thing I tried. It actually was a last resort! When I first saw this tea maker function I thought the easy way into it's state was to just crack open the bottom base where all the smarts are and poke around until I found the logic lines that drive the state of the little motor that makes the basket go up and down.
Well the team at Breville did a great job designing this thing to keep people out of the base. I first tried to access the base by removing all the screws and trying to pry it apart. Keeping in mind that this is not a cheap device (retails at $250) AND it was supposed to be a gift I did not really want to go at it with a pair of pliers and a blow torch. I even looked for broken ones on eBay that I might sacrifice. The device is so new (or just never breaks) that there was not much there.
After giving up on the base I thought the carafe would be a good next option. It has a small circuit board inside (I know this because I saw these for sale on Breville parts websites). On the base there were two kinds of screws, the regular old philips head, then they also had these strange triangular head screws. I found a set http://amzn.com/B004IUEHYS spoiler alert, they're called "Triangle Head" screws. I am assuming they're named after Mr. Triangle. https://www.youtube.com/watch?v=BQsO4WxAVb8
The carafe also was a dead-end. It's a really well designed carafe. Even If I was able to remove the bottom board I was a little concerned I would break some factory applied seal causing boiling hot water to leak out and cause some real problems for all parties involved.
For a brief period of time I thought the lid would be a good place to try to install my hack. This would mean that the lid would have to sense the basket drop from above and wirelessly transmit that info to some other circuit to play the sound effects. The lid could contain a simple battery powered bluetooth transmitter and could use a simple contact sensor to know if the basket was located. (The basket is held in by magnets so I considered using a hall-effect sensor as well).
The wireless lid sensor + basestation was the best idea I had at the time and it would have worked too if it were not for all that boiling hot water. Since the lid sits directly above the tea water it can get pretty hot. Steam is a really good way to transfer thermal energy. When you make tea (or boil water) a whole mess of steam rises off the water and hits the lid. When all that steam hits the lid it heats it up pretty good. Did I mention that the wireless sensor would run on batteries? It was really the only way to get power up where (except for some fancy peltier-effect based thermal energy harvesting system https://en.wikipedia.org/wiki/Thermoelectric_effect perhaps).
Turns out your standard AA battery has a operating temperature range of -18°C to 55°C. During my tests the lid easily reached well over 80°C. This would have probably meant exploding batteries. No one likes battery acid in their tea, for sure! http://data.energizer.com/PDFs/E91.pdf
Anyway, on to the actual hack!
The concept of the hack was to have one Arduino measuring the power usage of the tea maker using a modified (and calibrated) circuit from http://openenergymonitor.org/emon/ The code on this arduino has to sense and determine the state of the tea maker based on it's past know states and some data samples it takes from the current transformer. It then will signal the second Arduino with the Wave shield using one of two signal lines. When one line goes high the tea maker basket is going down, when the other line goes high the tea basket is going up. The Wave shielded Arduino just has the simple job of reading these two lines and playing one of two audio clips for each event.
For the curious here is the complete hardware list...
- Appliance rated 15AMP power cable
- Arduino Pro Mini Sparkfun https://www.sparkfun.com/products/11113
- Current Transformer Amazon http://www.crmagnetics.com/high-frequency-current-transformers/wire-lead/voltage-output/solid-core/cr8448
- Project Box Amazon http://www.amazon.com/gp/product/B0002BENMI?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00
- Wave Shield Adafruit http://www.adafruit.com/products/94
- Arduino uno Adafruit http://www.adafruit.com/product/50
- Speaker Sparkfun https://www.sparkfun.com/products/9151
- Proto Board Adafruit http://www.adafruit.com/products/1608
- SD Card, Misc equp. cables, power plug misc
- Breville Tea Maker Amazon http://www.amazon.com/gp/product/B003LNOPSG?psc=1&redirect=true&ref_=oh_aui_detailpage_o03_s00
And the sources for some ideas on this project...
- Current sensing circuit design from open energy monitor http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface
- WAV sheild example from adafruit https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino?view=all#examples
- Audio editing tool to make Wav files - Audacity http://audacityteam.org/
- State sensing code on github https://gist.github.com/breakpointer/4c105f4276c1196fc421
- Audio playing code on github https://gist.github.com/breakpointer/a700ef3620361a40546a
Well, that's it. Hopefully you find this useful if you want to "power disaggregate" your own devices. Please be careful when working with 120VAC. I have been working with electronics like this for many years. If you have not worked with powerline electronics please consult one of the many references out there or, when in doubt ask a professional!