Adding WiFi to the Bonavita Digital Kettle

Coffee preparation techniques besides espresso like pourover.
luma

Postby luma » Mar 26, 2016, 11:16 am

Like a lot of folks I've been using the Bonavita 1-Liter Variable Temperature Digital Electric Gooseneck Kettle for my pour-overs for a couple of years now. The device is a well-designed product that has been time-tested in cafes around the world.

What nobody asked for was WiFi and smart home support, so I've set about doing just that.

Let me start at the end:


The default behavior when powering on the kettle is to display the set temperature, bring the water up to that temperature, and then turn off the heat once the set temp has been reached. The kettle also offers a "hold" button which, when pressed, will instruct the kettle to bring the water up to the set temperature and keep it there for 60 minutes at which point it'll shut down. The "hold" function is all I ever use, so every time I turn the kettle on I then press "hold" immediately thereafter.

Ain't nobody got time for that!

The first order of business was detecting when the kettle has been turned on and then moments later pressing the "hold" button. You see this behavior in the beginning of the video, where the device detects the kettle powering on by monitoring the red power LED to the left. A couple hundred milliseconds after that LED comes on, the "hold" button is pressed to automatically place the kettle in "hold" mode (green LED) after every power on.

Next, the device publishes its state (on or off) to a service called MQTT which sends messages to and from my SmartThings home automation platform. The app you see on the tablet is the standard SmartThings mobile app showing the kettle's current power state and then toggling the device on and off. Once the device is accessible in SmartThings I can trigger the devices in a zillion different ways. For example, SmartThings offers integration with the Amazon Echo so I can also control the kettle via voice commands.

I first knocked together a simple solution to trigger the "power" switch via a relay:
Image

That gave way to a SmartThings Zigbee shield, an Arduino, some optoisolators, and a few clicky relays:
Image

The trouble was that this arrangement was large and would require a separate box sitting on the counter next to the kettle along with a separate wall wart to power it which didn't seem ideal. Then I discovered the ESP8266 family of microcontrollers which allowed me to use a much smaller WiFi-enabled device which could conceivably be shoehorned into the kettle.

To get it wired in I needed to figure out where I could access a couple four things: I needed a source of DC power, I needed to be able to monitor the power LED, and I needed a way to press the "power" and "hold" buttons. Here is what I came up with:
Image

  1. VCC +5V DC (kinda, more on that below)
  2. Ground
  3. Button common
  4. Power button
  5. Hold button
  6. Power LED (negative logic, so +5V == off)

Using this map I soldered in a ribbon cable and put a dupont connector on the end for easy connections:
Image

The microcontroller I'm using has an onboard power supply to convert 5VDC into the 3.3VDC it's expecting, but every time I'd power it up something went wrong. I spent quite a while tracking that down using external regulation and filter caps but couldn't get the microcontroller to power up. Eventually I looked at it with my oscilloscope which allowed me to see the +/-1V 60Hz swings in voltage coming from the kettle's built-in PSU. In response I tore open a wall-wart USB charger, stole the guts, then wrapped it in heat shrink and stuck it inside the kettle. With a stable power supply I was able to reliably control the kettle via 3 optoisolators to fully isolate the microcontroller from the kettle's own dodgy power.
Image

The next step was to condense this down into a package that could fit inside the base so I got some perfboard and set myself to hacking together this mess of tiny wires (that's 30awg kynar).
Image
Image

The resulting combination of microcontroller and isolator interface board turned out to be small enough for my purposes. A 5mm LED is placed next to this for scale:
Image

I positioned the power supply and microcontroller board in the base where I thought things would kind-of fit
Image
However with it laid out like this I couldn't get the base to fit correctly. I needed to run the wire to the left of that screw mount (far left in the picture), but it had some bracing extending to the side of the kettle base. No problem, I'll just snip that brace out! Well, that cracked the whole screw mount post leading to some choice words followed by a healthy dose of JB Weld
Image

Eventually I was able to get everything placed in such a manner that the base would fit and so none of the wires were binding anywhere. Here's what the completed version looks like inside:
Image

The code is pretty ugly and contains comments which are not actually true and is generally in need of a cleanup, but no project post is complete without code so here it is. Don't expect much.

The end result is a tea kettle that finally behaves in the way I'd expect. The device automatically powers on into hold mode and I can now automate the kettle with the rest of the automation tools in my home.

Oh yeah, and I can also make coffee with it.

Bodka Coffee

Postby Bodka Coffee » Mar 26, 2016, 11:20 am

Just what I need. When will they be for sale? :-)
Bodka Coffee Company
http://www.bodkacoffee.com
LMWDP #503

borisblank

Postby borisblank » Mar 26, 2016, 2:32 pm

Sorry - you're looking for the "The craziest %#*$ing thing I've seen all day..." thread in "Knockbox" forum... :wink:

Amazing what a little boredom and a lot of know-how can produce...good stuff...

TheFinePrint

Postby TheFinePrint » Apr 01, 2016, 8:12 pm

I've been lurking for ages and this is the post that gets me to finally register.

I've wanted to do this for ages - I have the same kettle & have had an arduino kit laying around for months but hadn't gotten around to this.

you undoubtedly saved me a ton of time with the diagnosis of the +5v PSU issues & the pinouts of the board so THANKS for that.
one question - the optoisolators were necessary why? the arduino switches in output mode should just short the pins that go to the buttons right? I'm assuming they are +5v? why didn't just directly controlling the switches with the arduino work?

I might PM you with more questions - I hope you don't mind :-)

luma

Postby luma » Apr 02, 2016, 10:36 am

A couple reasons. First, I'm using an ESP8266 instead of an Arduino (because it has WiFi), but that works at 3.3v. Further, when I attempted to directly power the ESP8266 from the system's PSU (via a 3.3v regulator) it never would work right which I didn't understand until I bought a scope and actually measured the noise and voltage drop. You might get an Arduino to directly control the device as it runs 5v, so it's worth a shot, but I had already moved on to the ESP8266 platform as I wanted this to fit inside the base.

At various points in this project I also tried relays (worked, but they were noisy and too big) and transistors (didn't work due to the noise issue). Isolators are particularly handy when you're running two independent power supplies to prevent any problems with varying voltage levels or floating ground (which is the case on the USB power supply I used). They're cheap, fast, easy to use, and they do a great job of separating your control system from the system under control to prevent any sort of weirdness or unexpected behavior. They handle varying voltage levels with no problem which was key as I'm interfacing a 3.3v system with a 5v system. Further, they protect each device from each other, so a stupid mistake on the controller side (of which there have been several) will not damage the kettle side.

happycat

Postby happycat » replying to luma » Jul 29, 2016, 11:50 am

Amazing thanks for sharing this.

I've ordered a nodemcu ESP8266-based board and I'm looking forward to using it instead of Arduino in some projects, perhaps controlled through Blynk on iOS. I'm waiting on a pile of parts from China but I have a prototype Arduino shot controller on my Gaggia Classic and I plan to automate my Quest M3 with an Arduino+TC4. I would love to replace the Arduinos with nodemcu/ESP8266 to give wifi control. Adding ESP8266 to arduino seems like redundancy.
LMWDP #603

User avatar
CoffeeBar

Postby CoffeeBar » Jul 31, 2016, 8:20 am

+1
This project is So cool and I wish I could have one 8)

luma

Postby luma » Jul 31, 2016, 10:18 am

happycat wrote:Amazing thanks for sharing this.

I've ordered a nodemcu ESP8266-based board and I'm looking forward to using it instead of Arduino in some projects, perhaps controlled through Blynk on iOS. I'm waiting on a pile of parts from China but I have a prototype Arduino shot controller on my Gaggia Classic and I plan to automate my Quest M3 with an Arduino+TC4. I would love to replace the Arduinos with nodemcu/ESP8266 to give wifi control. Adding ESP8266 to arduino seems like redundancy.

Waiting for the slow boat from China is always the hardest part of these projects. Second hardest part is when a box shows up full of parts and Chinese writing and you have to try and remember what the hell it was you ordered 6 weeks previous :D

whackedspinach

Postby whackedspinach » Aug 15, 2016, 4:54 pm

I wanted to try this with a Particle Photon I had laying around and encountered the same power issues you did. I took the base over to a scope to check out the power supply and carelessly dragged a jumper wire across a contact. The whole thing shorted and sparked, and scared the hell out of me.

Image

Maybe I should stick to software. :?

luma

Postby luma » Aug 16, 2016, 9:11 am

Awww nuts. The dangers of testing live circuits :(

Is the unit still producing power? If you can take some high-res pics of the top and bottom of the area, maybe we can point out what can be replaced component-wise and bridged on the PCB to get this working again.