The Keurig B60 is a very complex machine under that smooth black plastic skin.
It is extremely well designed and executed, with mechanical, hydraulic, electrical, and electronic systems all working in harmony, according to its design. But sometimes, you want some things of a slightly augmented design.
It is somewhat difficult to take apart, but it can be done without a hacksaw or sledge hammer, and can be re-assembled unblemished.
Mine has two brains: one the original, and the other, the Moteino I added a while ago (Moteino R2 with RFM12B). Why two brains? It needed to be smarter, and be able to interface with me in different ways. I don't have the time, attention, or eyesight to stand there looking at its little LCD screen - all I want is a cup of coffee from it, and right away.
It
almost does that. But, it takes a bit of time. Just enough time that I don't like to stand there and wait for it to heat or to brew. Yes,
two things to wait for! From a cold start, the machine takes just over one minute to get to brewing temperature. Longer if the room temperature is lower than average. The actual brewing takes a bit of time as well, the better part of a minute. (I always choose the largest size, which takes the longest.)
So I had thought, wouldn't it be great to add a Moteino, and just turn it on and at least get it heated up, right from my desk? (Another solution would be to move the machine to my desk, but there are actually several good reasons against this.)
Of course it would be better with Moteino! So with RF commands, I gave this machine another interface that will do button presses, and obtain the status of the lights on the control panel. The only things I cannot do remotely are:
1) Physically load the coffee charge cartridge into the machine
2) Place my empty cup in the target area
3) Remove the spent charge
4) Retrieve my freshly brewed cup of coffee.
5) Set the time, schedule, or any of the "advanced" functions.
I suppose there is no worthwhile remote solutions for these, although maybe there is a robotic solution possible for items 1 and 3. But we are pushing silly there. Item 5 was overkill, I would need to interface to the LCD and learn all the button press sequences and code them. Possible, but I would need an additional Moteino because I would be out of pins with just one. Just not worth it. Fortunately, the coffee maker is not set to display the time, so it is not annoying. In fact, I only found the time and advanced schedule stuff after I started investigating the control panel to interface to it. Much easier to move all that to outside systems now, with the single Moteino relaying status and commands. Items 2 and 4 involve me physically anyway, since I am the user of the coffee cup ... if only there was a way to transmit cup and coffee by RF...
So, from a browser, hitting a PC with a web server, connected to a gateway Moteino, I can manually turn on and off the machine without walking over to it. If I remembered to load the coffee charge in, and I know there is a cup there, I could hit the brew button from my desk as well... but this never happens. I think I will try to adjust my habits, and buy a second coffee cup, so that when I retrieve a cup of coffee, I reload with a new charge and place the second cup there, so it is all ready. That would work until I forget the cup one time - so I am thinking I will eventually (or, soon) add Felix's EE-SY310 photo reflective sensor breakout to detect the cup.
This would actually save me about 10 minutes per day, believe it or not. Maybe even more. That adds up! I could use that time coding for Moteino...
Peering into the future, I can see me successfully adjusting my habits, and hitting that brew button, but then eventually getting that cup of coffee, long after it has gotten cold. That would be acceptable. I prefer fast coffee to hot coffee. But, I could also add a reminder system once I hit brew - one that would be canceled at the machine, by the removal of the cup, or something like that. Because I prefer hot fast coffee to cold fast coffee. We shall see.
Much more important was the morning fuzzy-thinking-before-coffee situation. (A thing of the past.) That solution involved other nodes, so I will describe that whole thing in another post. Main point is, since my coffee maker responds to RF commands, they can come from me thru the gateway, or they can be sent by other nodes directly, if they were designed to interact with the coffee maker. And what fun would it be if they weren't...? More to come.
-------------------------
Here are some pictures.
First is the inside of the Keurig B60.
It is really pretty amazing. It does a lot and it's actually inexpensive if you take into account all the components and assembly and so forth. As with any complex machine like this, you have to treat it nicely, keep it maintained, and it will repay you will long service. I use only filtered water, have never needed to de-scale it, and it has served me with exactly zero failures for more than two years. I just needed to make it a little bit more excellent - by adding Moteino.
Once you get the control board, you can see there is an LCD, but as I am not using any of the information on it, I didn't need to interface to that. There is a momentary push button at the top, and four below the LCD. The top one is power, the ones below from left to right are: brew 6 oz cup, menu, brew 8 oz cup, brew 10 oz cup. I think that other than testing the connections in this interface, I have only ever used the power and brew 10 buttons. I can't speak for other users of the machine, but I am pretty certain no one has ever touched "menu" except perhaps accidentally.
One interesting thing is that all of the buttons are on the same control line to the controller. There is a network of various different resistors creating a system of voltage dividers, and the controller apparently detects specific changes in voltage to determine which button was pressed. I didn't want to mess with that, so I elected to simply put a relay in parallel with the switches I wanted to control. The back view of the board shows some connections, I don't know why, but I didn't snap a photo when I had all the connections done. Here I just have power and the power switch hooked up. The control board runs on 5 volts, so I just took power from here to power the Moteino.
There is nothing on the LCD that isn't reflected in the states of the various LEDs on the device. If they are lit, not lit, flashing, I can tell what the deal is. So no need to decompile the LCD design (it is a custom one). Instead, just monitor the LEDs: one for each brew button, and one for the "add water" light. Really I just needed a single brew button and the add water light.
When the machine is off, the add water light (and all lights) are off. When it is on, the add water light is either on continuously if there is sufficient water in the reservoir, or flashing if there is not enough. If there is enough, then the machine will heat the water. If the water is hot, the brew buttons light up continuously. When you cycle a switch in the mechanical assembly that houses the coffee charge, it assumes you have put one in, and you are ready to brew - the brew buttons flash.
The LEDs are all active low, and feed right into the digital inputs of the Moteino. Couldn't have been easier. (Much easier than getting the external case off.)
I made a little wiring harness to come down from the control board, down the side of the machine. The heat shrunk cubes are my two relays (one for power, one for brew 10).
The Moteino is easily removed from the connector, in case I need to replace it. And locating it at the bottom of the machine means I do not have to disassemble the entire thing to get to it, like I had to do to get to the control board. There are some extra wires that dead end in a heat shrink tube ending. Those lead back to buttons and LEDs (menu and brew 6 and 8 ) that I don't use now but might want to use in the future. Yes, I ran these wires, because getting that case apart
is that difficult.
With everything in place, the Moteino is easily accessible by simply removing the bottom plate. I added a serial connection that comes out where the power cord exits the case, so that I can plug in and monitor it directly if I like to check stuff out, or to do a non-wireless flash of the MCU.
You can't really see the Moteino so well in the case like this, here is a close-up.
The antenna is a half-wave monopole in a coil, it goes right up the side of the machine, where there is an air space. As the Moteino is easy to remove, here is a picture of it next to where it actually lives, just outside of the machine.
Here is a screen shot of some direct serial output.
The status of the machine in monitored continuously, and can serve this information out to any RF nodes on the network (including gateway nodes connected to web server). In this shot, the machine is turned on, it heats up (CW means it is Cold, and there is Water - HW means that the water is now Hot). The reporting interval is 5 seconds, so you can see that it takes a bit more than a minute. After 5 minutes, it sees that no status has changed. No one has brewed anything, we are just sitting there wasting energy, keeping that water hot, losing the heat to the surrounding air. I tend to believe we are also eating into the lifetime of the heating element and the water pressure sensors, and other related components. So I have the Moteino set to shut it off after five minutes.
At some later time, node #87 on my RF network sends it a command to turn on. Since it was not fully cold, the water only takes about 40 seconds to get to brew temperature. Sadly, it will simply just turn off in five minutes, because no one is physically there to load a coffee cartridge.
Maybe this isn't that exciting, but it could be the caffeine talking...