Adding WiFi to the Bonavita Digital Kettle

Coffee preparation techniques besides espresso like pourover.
luma
Posts: 77
Joined: 10 years ago

#1: Post by luma »

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:


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


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:

  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:


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.


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).



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:


I positioned the power supply and microcontroller board in the base where I thought things would kind-of fit

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


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:


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
Posts: 554
Joined: 10 years ago

#2: Post by Bodka Coffee »

Just what I need. When will they be for sale? :-)

borisblank
Posts: 134
Joined: 10 years ago

#3: Post by borisblank »

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
Posts: 6
Joined: 8 years ago

#4: Post by TheFinePrint »

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 (original poster)
Posts: 77
Joined: 10 years ago

#5: Post by luma (original poster) »

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.

User avatar
happycat
Posts: 1464
Joined: 11 years ago

#6: Post by happycat replying to luma »

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
Posts: 644
Joined: 10 years ago

#7: Post by CoffeeBar »

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

luma (original poster)
Posts: 77
Joined: 10 years ago

#8: Post by luma (original poster) »

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
Posts: 3
Joined: 8 years ago

#9: Post by whackedspinach »

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.



Maybe I should stick to software. :?

luma (original poster)
Posts: 77
Joined: 10 years ago

#10: Post by luma (original poster) »

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.

Post Reply