The world’s leading publication for data science, AI, and ML professionals.

Roasting Coffee To Perfection Using AI

Perfecting your favorite cup of coffee has gotten easier thanks to AI

REAL WORLD AI

Photo by 🇸🇮  Janko Ferlič on Unsplash
Photo by 🇸🇮 Janko Ferlič on Unsplash

If you’re a coffee-lover, you may have wondered how your favorite cup of morning brew tastes so good.

There’s the barista’s skill, of course, and the caliber of espresso machinery involved.

But there’s also the roasting of the coffee beans – getting this right makes a big difference to the taste of your morning cup.

Coffee roasting is a complex process that takes a fair degree of expertise. And it’s not easy to get a consistently good outcome amidst the hustle and bustle of a busy coffee roasting facility.

That’s why Norwegian coffee roasting specialist, Roest, has been turning to artificial intelligence (AI) for the best results.

In this article, we’ll look at the intriguing application of AI to roasting consistently good coffee.

The flavor is in the browning

Have you heard of the Maillard reaction (MR)?

(Apparently, it’s pronounced myYAR)

It’s an important part of cooking and refers to the stage at which food starts to brown. Think of browning onions, aubergines, steaks, and potatoes, for instance.

And if you’re like many, you may be thinking, "yum!". It’s the browning process that adds so much flavor to many of our favorite dishes.

So, what does the MR have to do with coffee roasting?

Listening for that first crack

As it happens, managing how long the MR process takes is one of the most important aspects of coffee roasting.

According to Guy Snead of Rounton Coffee, extending the MR for longer results in "a heavier mouthfeel and rich caramel notes". Or if you prefer a coffee with "inherently fruity qualities" and "pronounced acidity" you’ll need a shorter MR.

So, tracking the MR is fundamentally important to coffee roasting.

A key indicator of how the MR is progressing is when the first crack of roasting coffee beans occurs.

The first crack is heard when water in the beans turns to steam, and as a result, the beans start to ‘pop’ open, just like in popcorn.

Listening for the first crack is done manually by professional roasters, requiring constant attention to help identify the exact timing of the crack.

However, since it’s a manual process, consistency varies amongst roasters.

It also takes valuable time away from the roasters’ busy schedules, requiring dedicated attention, and limits the roasters’ ability to manage other tasks.

Automating the consistent and accurate identification of the first crack, therefore, would greatly benefit Coffee Roasters. And this is where AI can help.

Sample roasting coffee to perfection

Roest specializes in sample roasting – the practice of roasting small amounts of green (raw) coffee beans to determine their specific qualities.

Sample roasting is a vital part of the coffee supply chain. It provides exporters, importers, and coffee roasters the information they need to make sound purchasing decisions.

Given the importance of sample roasting, managing the roasting process carefully is paramount for establishing the quality of the batches from which the coffee samples are taken.

Roest is an award-winning manufacturer of sample roasting machines. Their machines are known for quality and precision, both of which matter for sample roasting, even more so than for everyday roasting for consumption.

And Roest has turned to AI to take their sample roasting machines to the next level.

How AI helps with coffee roasting

By partnering with another Norwegian firm, Soundsensing, an audio and machine learning specialist, Roest has developed an automated solution for accurately and consistently identifying the first crack.

Here’s how it works:

  • Using a tinyML implementation, i.e., running machine learning on tiny devices in an IoT (internet-of-things) framework, a small microcontroller is placed inside each coffee roasting machine
  • The microcontroller includes a small microphone, with associated sound-sensing firmware, that listens to the coffee beans during the roasting process
  • A machine learning algorithm (neural network) that has been pre-trained to recognize and identify the first crack of the coffee beans is embedded in the microcontroller
  • At a pre-set time after identifying the first crack, the roasting machine automatically switches off and stops the roasting process

This Tinyml solution makes the roasting process fully automated and:

  • Frees up roasting operators for other tasks
  • Improves the consistency of roasting
  • Maintains standards, regardless of the skill level of individual roasting operators
  • Allows easier scaling up of the roasting process

Roest has been shipping this tinyML solution in their roasters since 2020.

The future beckons for tinyML-acoustic solutions

This application of AI, i.e., using tinyML and acoustic technology to identify the first crack in coffee roasting, is the first of its kind.

And the possibilities for future applications abound.

Soundsensing is already involved in many areas of industrial machine monitoring through the use of sound. With AI and IoT-tinyML technology, the capabilities and deployment possibilities of such smart monitoring are likely to increase significantly.

In summary

  • Coffee roasting is a complex process, a key part of which is detecting the first crack of roasting coffee beans
  • Sample roasting is a vital part of the coffee supply chain, in which valuable time and resources are dedicated to detecting the first crack
  • In a world-first, two Norwegian firms – Roest and Soundsensing – have developed an automated AI solution for identifying the first crack in the coffee roasting process, using tinyML and acoustic technology
  • This AI solution frees up roasting operators for other tasks and improves the consistency and accuracy of the coffee roasting process
  • Roest has been shipping their award-winning coffee roasting machines with the included AI solution since 2020
  • The future possibilities of tinyML-acoustic solutions are significant, given the capabilities that can be deployed on AI-powered IoT devices

Related Articles