Rapid Prototyping GIR’s Voltaire for Coffee Freshness Sensing

I had the incredible opportunity to help the GIR team develop the coffee freshness sensing technology that will become part of the Voltaire, launching on Kickstarter today. I’m very proud of how much we accomplished in a very short period of time, but I’m even more impressed with how the technology to enable such rapid development is so accessible. If you’ve ever wanted to make your own IoT device – either commercially, or as a personal project – you might find this interesting.

But first, a shameless and resounding endorsement for the Voltaire. I’m a major coffee geek, and my morning espresso is more of a ritual than a routine. Anyone who has ever pulled a life-changing shot of thick coffee knows that you can’t make great espresso without an excellent grinder. So when GIR – the only folks in the world who have made me fall in love with a spatula – said that they were going to build a coffee grinder, I got very excited. But, this grinder is different from any you’ve used before. It’s smarter. If you want to learn more about the product, head on over to their Kickstarter page. If you want to learn about how we developed the sensing technology, read on.

Starting From The Bottom

Here’s how it happened. At this year’s International Home and Housewares Show, Samantha Rose, GIR’s founder CEO, showed me a prototype of a grinder that her company was working on – a Mr. Fusion-esque, sleek, portable coffee grinder with high-quality burrs and some very useful features like a digital timer. “But,” she said, “we had this idea to make it sense the freshness of your coffee beans, too. Except we’ve never done that kind of thing before.” My eyes lit up. I had done some of that kind of thing before for Modernist Cuisine projects, and as it turned out, I was about to have a lot of time on my hands. We decided to give it a shot (pun intended).

Sniffing Headspace Gasses with Little Electronic Noses

By the end of week 1, we had determined that the idea was feasible. We pored through existing academic and industry research on coffee staling, and I ordered a bunch of gas sensors: CO2, Methane, Aldehydes, Ethanol, and others, and wired them up to a data logger. When I put the sensors in a container with coffee beans, their readings spiked. And, when we left the setup to log data over time, we could see that the concentration of the headspace gasses in the container diminished over time, just as we’d expect from beans losing freshness. This was great news, but far too little data to have certainty that we could determine freshness.

Long Term Logging Setup 1500

Over the next three weeks, we devised and ran a set of experiments to rule out as many confounding variables as we could. We measured and manipulated temperature, humidity, bean quantity, roast type, roast age, and grinding action, and we simulated a handful of storage scenarios before we finally convinced ourselves that the data we read from the sensors could be used as a reliable measure of freshness.

Having inexpensive and accurate data loggers let us parallelize much of this testing – one of our tests ran continuously for 30 days! Had we been limited by our ability to record from multiple sensors at once, the timeline would have grown considerably.

Patent Pending

sensing base cutaway

Once we were confident that this approach was sound, we wrote and submitted a patent application. Since the GIR team had done their industrial design in a CAD environment, it was trivial to create patent figure drawings from the 3D model, including cutaways. I whipped up a crude-but-useable 3D model of how we envisioned the sensing technology integrating with the grinder and rendered that out for patent figures as well. In the old days, we would have had to pay a technical artist to compose those drawings, costing the project both time and money. Now, all you need is Netfabb (free!) or a similar program to open nearly any 3D model format, inspect your parts, slice cutaways, and export your drawings. That closed out week 5. We were on a roll.

Prototyping in the Blynk of an Eye

Now that we had a handle on working with the sensors, and an idea of how to package up the sensing technology, it was time to make a prototype. We decided on a “sensing base” form factor: a platform on which the grinder would sit that contained the electronics necessary for taking the measurements we’d need. Moving from bench experiments running on data loggers to a standalone prototype would allow us to interact with the sensing technology more naturally, emulating a user’s experience at home. We believed this might reveal key insights about how the freshness sensing experience should be designed – from hardware to service to mobile app – and could inform decisions early on, while changes are cheap and easy to make.

We had a few requirements for the prototype:

  • It needed to connect to the internet to log data that we could use later for analysis,
  • It needed to provide some way for a user to interact with it from his or her mobile device, and
  • It needed to be cheap enough to clone, so prototypes could be deployed for wider testing.

I had worked with Arduino in the past, and it was the natural platform choice for a small, internet-connected device that needed to read from sensors and control hardware. But, as we also needed to support a client interface, I dreaded the thought of having to run a web server on Arduino, or worse yet, build a cloud service and native mobile app from scratch.


You can imagine, then, how happy I was to discover Blynk. Blynk is a customized flavor of Arduino that comes nicely packaged in the SparkFun Blynk Board. For $29.95, it provides WiFi, an onboard temperature and humidity sensor, an RGB LED – very useful for communicating status – an analog-to-digital converter for reading from analog sensors, and enough digital input/output pins to suit our needs. But that’s not even the great part…

Blynk is also the cloud service and mobile app I had been looking for! You see, on an Arduino running Blynk’s library, the communication between pins on the board and your mobile app is pre-wired. In fact, if you’re doing simple enough things – like turning on or off a pin, reading an analog value, or changing the color of the LED – you don’t even have to write any code. Zero. Not a line. Press a button on your mobile app and watch the Blynk board respond. It was like magic.

Of course, our scenario was a little more complex than that. We had to interpret gas sensor values, read from a load cell, output status, and set some parameters that influenced the device’s behavior. In all, I wrote fewer than 700 lines of code (including comments!) to power the entirety of the freshness sensing prototype. Blynk’s code and a few Arduino libraries did the heavy lifting.

I also didn’t have to write a single line of UI code to deliver a fully-functional mobile app. The Blynk App (Google Play, Apple App Store) lets you drag-and-drop simple UI controls, like buttons, sliders, gauges, labels and even graphs and a terminal window. Within the mobile app itself, you can connect those UI controls to the Blynk board by assigning them pins: analog or digital pins to correspond to the Blynk hardware, or virtual pins that can be read and written by customizing the software running on your board.

Logging Data


The one place where the Blynk offering falls short is in its data logging and retrieval. Blynk does log the data that your board collects. Just add a graph control to the UI and connect it to the pins you want to monitor. However, getting that data back out of Blynk for analysis is still underdeveloped. Yes, there are ways to access it through a REST API, but that’s a pain.

So, we decided that in addition to letting Blynk do its logging, we’d also log somewhere more accessible for analysis. The obvious choice was ThingSpeak. It’s a free service designed for IoT devices to stash timestamped data, and they have Arduino libraries readymade. We were restricted to logging every 15 seconds at most, but that’s still plenty of resolution for our needs. When it’s time to analyze, it’s a one-button click to open your log in Excel. Not bad for $0.00.

Designing the Enclosure

In addition to having user-friendly software, we also wanted the sensing base prototype to have a physical form factor that matched the grinder, and could be evaluated for industrial design and manufacturing. I had previously worked in 3ds Max – a great environment for mesh editing, but problematic for making physical stuff. In the past, I’d run into issues with my 3ds Max models not being watertight or having wall thickness problems when it came time to 3D print. So, I turned to Autodesk Inventor, which is a much more appropriate tool for designing stuff… especially stuff that needs to be assembled.

Thanks to some helpful training videos, I was able to get up-to-speed in Inventor in a day or two. Most of the electromechanical components we used had free 3D models available from SparkFun directly, and I found a load of others on GrabCad. This meant that I could spend less time measuring mount hole spacing with my caliper, and more time projecting the 3D models onto my Inventor drawings so I could see how everything would fit and where screw holes and standoffs should go. I could even drop in standard sized machine screws, making it simple to determine which screws I’d need to buy for assembly. From there, the design process was extremely fast: I was ready to print the enclosure components within a few days of CAD tinkering.

I’m Still Amazed by 3D Printing

I should find 3D printing to be blasé by now since I’ve printed in thermoplastics, rubber, resin, porcelain, and stainless steel, but I’m still blown away every time I hold a 3D object that I dreamt up on my computer. Our big challenge was printing quickly enough to allow for iterations and reprints, if necessary. Although GIR has their own 3D printer, it was in Chicago and I’m in Seattle. That meant adding days of transit to turnarounds, and high shipping costs to rush delivery.

Instead, we turned to 3DHubs.com. It’s a service that connects you to people in your area who have 3D printers and will print your parts for a fee. I was lucky enough to find someone a mile away from me who printed my design with a 2-day turnaround for less than $70. That is pretty damn unbeatable.

I was thrilled to discover that assembly worked on the first print! [Brushes off shoulder]. All of the internal components fit exactly as they should, screws fit into screw holes, and things that should align did. That’s all thanks to having great software and a community-built library of 3D models at my fingertips.

Can you imagine how much this housing would have cost – in specialized software, industrial designers, CNC machining, and finishing – only a few years ago? Without cheap and ubiquitous 3D printing, and the easy-to-use software adoption it has driven, this would have been a months-long, megabucks endeavor.

Putting it all together

So, after two weeks of prototyping work, and only 8 weeks since we kicked off the freshness sensing project, we had an actual, physical, internet-connected prototype running our own code, measuring actual coffee headspace gasses, controllable with an Android and iOS mobile app, and logging unlimited data to a cloud service for analysis.

Consider for a minute the incredible confluence of technologies that makes that possible. It’s never been easier to prototype these types of devices, and I’m sure that it won’t be long until the technology references in this article seem laughably outdated. Drake said it best: “What a time to be alive.”

In the spirit of the maker and hacker communities who drove these technologies forward, GIR has decided to make the sensing base’s firmware open source, and will provide APIs and SDKs to allow enthusiasts to develop their own apps that can work with the sensing base’s technology. Even though it was designed to measure the freshness of coffee beans, I can’t wait to see how others repurpose it!

This was a wildly cool project, and it was an honor to be involved. I’m so thrilled to see the Voltaire hit Kickstarter, and I encourage you all to support it if, like me, you care about great coffee.

I’m Returning to Modernist Cuisine

I’m thrilled to announce that I’m returning to Modernist Cuisine as Technical Director! Although I can’t talk publicly about the projects I’ll be working on as they’re still in development, I’m ridiculously excited about what lies ahead.

It’s been almost a year since I made the bittersweet decision to leave Modernist Cuisine and finally work full-time at Sansaire, after years of intense moonlighting. I’m very proud of my work over the past year: launching the Sansaire Searing Kit and Steak Aging Sauce, expanding retail sales, and building one of the top sous vide brands from scratch.

However, over time, it became clear that Sansaire wasn’t an environment that enabled me to do my best work. Being a first-time entrepreneur, and co-founding a company with another first-time entrepreneur is tough enough. Running a hardware company without outside investment, and shipping worldwide to major retailers with seasonal demand is extra tough. That’s ok – entrepreneurs eat “tough” for breakfast. But, when co-founders don’t share an aligned vision and strategy, that stress becomes pervasive and, in this case, unfixable. It was a painful, emotional, and personal decision for me to resign from active participation in Sansaire. The Sansaire team will continue to produce amazing products, I’m sure, and I wish them all the success in the world.

Starting today, I’m back at Modernist Cuisine, working with a wildly talented group of people on a mission that I will be very proud to reveal in due time. At my previous Modernist Cuisine farewell, Nathan presented me with a cake that read, “Please Come Crawling Back.” It worked.

Farewell, Modernist Cuisine. Hello Sansaire.

Today is my last day at Modernist Cuisine. After three and a half years serving as the Director of Applied Research, it’s time for me to turn my attention to Sansaire full-time.

To call this decision “bittersweet” is a gross understatement. This has been my Dream Job, and every moment of my time at MC lived up to the fantasy I conjured when I first heard about the place. I’ve had the most incredible opportunities and the most unimaginable experiences here. I’ve worked alongside ridiculously talented people and learned from the best culinary minds in the world. And, for my part, I’ve made a contribution to books that will forever mark the period in history when the science of cooking became accessible to the world.

My first visit to the Modernist Cuisine lab was five years ago. I visited as part of an open house thrown in honor of the International Food Blogger’s Conference, and although I had spoken with Nathan on the phone once previously, it was our first time meeting in person. He was as effusive and smart as I expected, and way less stuffy. I soaked in every detail of the lab tour (with my jaw dragging on the ground), and I wore a stupid grin for a week after that.

It was crystal clear that this is where I was meant to work. Although he never said it in exactly these words, I think Nathan recognized that I was the right kind of crazy to be at Modernist Cuisine. (Note: Nathan has, on many other documented occasions, pointed out that I am plenty of other kinds of crazy.) When he created an opportunity for me to graduate from “unofficial fan club president” to full-time employee, Nathan was taking a risk that some guy from the Excel team at Microsoft with no culinary training and (I mean this pejoratively) a blog would be a good addition to his team.

Less than two months into my job, I was on a plane to Los Angeles with a steamed omelet laser-etched with Jimmy Kimmel’s face packed in my suitcase. A few weeks later, I was sitting for lunch with the Top Chef judges, designing our new website, and reviewing chapters for the upcoming Modernist Cuisine at Home release. When I opened my eyes next, I was writing code for a motorized microscope mount to shoot focus-stacked photography, designing a museum exhibit, mastering CNC-milled slip-cast ceramics, introducing Ferran Adria at Seattle Town Hall, 3D printing a mold for bean-to-bar chocolate, making liquid nitrogen ice cream on Irish TV, building a robot, laser-cutting a gingerbread house, and convincing Andrew Zimmern to drink dinosaur broth.

Through all of those experiences – and too many others to list – I had the time of my life. The Modernist Cuisine team has grown and matured, and their capabilities, creativity, and energy now are the best I’ve ever witnessed. My team specifically – Melissa, Caren and Gabbie – are individually the kind of people I may spend the rest of my career trying to find and hire; as a team, they’re an unmatched force in the industry. The editorial team is turning the largest bread book project in history into a printed reality, and with Head Chef Francisco Migoya at the helm, the culinary team is cranking out delicious, beautiful, and uniquely Modernist bread that [I believe] will hugely disrupt the world of baking. I’m very thankful to all of these people for allowing me to play alongside you.

Most of all, I want to thank Nathan. Nathan, you have given me my Dream Job, and extended to me the trust, encouragement, and resources to make this the most incredible period of my life. The lessons that I’ve learned from you – some of which I know, some of which I don’t yet realize – will resonate with me for the rest of my career. I am indebted for the opportunity to apply my brand of crazy to your vision for Modernist Cuisine, and I will remember these years (and all that sous vide pastrami) with great fondness.

All the while, during my fantastic voyage at Modernist cuisine, a team of incredible folks have been hard at work bringing Sansaire to life, growing the business, and creating new opportunities to change the way the world cooks. My nights and weekends at Sansaire won’t cut it anymore – we have big plans and hard work ahead, and it’s time for me to be with my Sansaire family full time.

So here we go…