Beyond the Bean: Analyzing the color and moisture of roasted coffee using NIR Spectroscopy

Chapter 58
📂 Case overview: The detectives assist a client who wants to know how to analyze their roasted coffee's color and moisture content. Want to know what makes a Dalgona so creamy? How color and moisture affect coffee - If Eggcule will ever be satisfied? Then read on!

What is a dalgona coffee?

The detectives gather in the office and start the day as they usually do – with a cup of coffee. Cornlumbo has turned up with a Dalgona, and the other detectives are looking on inquisitively at the thick, viscous liquid perilously balancing on a glass of milk. 

“What on Earth is that?” asks Miss Mapple. 

“It’s a Dalgona; it's all the rage on TikTok,” says Cornlumbo, who may as well be speaking Swahili as Miss Mapple had little time for social media trends. Cornlumbo explains that it is a micro-foam created from equal measures of instant coffee, sugar, and water. The mixture is then whipped for 3-4 minutes until a delicate crema is created and balanced on chilled milk. Miss Mapple’s face has gone from looking confused to looking horrified. 

“That sounds as appealing as it looks,” she says sarcastically. 

“Would you like to give it a try?” asks Cornlumbo. 

“Dalgona coffee is created from equal measures of instant coffee, sugar, and water - whipped for 3-4 minutes - then balanced on chilled milk.”

Miss Mapple thinks to herself that she could quite happily live the rest of her days without ever knowing the taste of a Dalgona, but she politely accepts Cornlumbo's offer and tentatively puts the drink to her lips. 

As the sweet, thick liquid touches her tongue, her eyes begin to bulge. Cornlumbo gives out a huge belly laugh – and says, “Not your cup of tea?” in his best attempt at an English accent. “Absolutely not,” says Miss Mapple, who immediately rinses the sugary mixture from her mouth. “Anyone else like to try?” asks Cornlumbo. 

The other detectives are so intrigued that they take turns trying the coffee. Nancy Drew, who, like Cornlumbo, has a sweet tooth, quite likes the Dalgona; However, Eggcule Poirot, who is used to a shorter, more bitter coffee, is also not impressed. Shallot Holmes then enters the office and wonders what is occurring.

“We’re trying Dalgona coffee. Would you like to try it?” asks Cornlumbo. 

“As you know, I’m more interested in facts, the details; tell me, how is the Dalgona made?”

Cornlumbo repeated what he told the others about using instant coffee, sugar, and water in equal measures. 

“I can’t stand when things are measured volumetrically,” says Eggcule, who considers himself a coffee connoisseur. “You cannot achieve any consistency measuring volumetrically, as it doesn’t account for differences in the constituent components; you could make a Dalgona – don’t ask me why – but – you could make it one day with one type of sugar and achieve one result – and another day you may use a different sugar, one that is denser, and your results would differ greatly.” 

For the next five minutes, Eggcule continues his tirade about how mass would be a more helpful indicator than volume. Holmes finally cuts off Eggcule by asking, “What about the specifics about how a Dalgona is made - the chemistry - for we are detectives, are we not?” says Holmes.

What are surfactants? How can they help us create the perfect crema?

Miss Mapple explains that coffee's surfactants enable the creation of crema. 

“Tell me more,” says Holmes.

She explains that surfactants, or surface-active agents, are compounds that reduce surface tension; therefore, they tend to accumulate on surfaces or interfaces. At the molecular level, surfactants typically have a hydrophilic (water-attracting) head and a hydrophobic (water-repelling) tail. This unique feature allows them to mix or emulsify oils and water that naturally tend to separate. 

Holmes is impressed and tells the detectives that the surfactant in coffee is called melanoidin, a high molecular weight heterogeneous polymer formed when sugars and amino acids combine during the Maillard reaction. Eggcule remembered explaining the Maillard reaction to the detectives during their case involving beer. It was responsible for the darker, more bitter beer found in Belgium. 

“Surfactants reduce surface tension and typically have a hydrophilic head and a hydrophobic tail, allowing them to emulsify oils and water that naturally tend to separate.”


Holmes tells the detectives that their morning's discussion was very helpful, as he had been contacted by a coffee manufacturer looking for the most effective method for determining color and moisture in their roasted coffee. Melanoidins are particularly important in roasting coffee beans, contributing to the color and complex flavor profile. 

Why analyze moisture and color with NIR spectroscopy?

“Why else may our client want to analyze color and moisture content?” asks Homes.

Nancy Beef says, “They are crucial indicators of the roasting process and have huge implications on the quality and flavor potential of the coffee. The taste, aroma, and shelf-life will all be influenced. As we discovered this morning, it is difficult to please everyone, so coffee producers need to tweak their processes to produce different flavor profiles for different customers. Some, like Cornlumbo and I, may prefer more bittersweet coffee, whereas older… I mean… other people, like Eggcule and Miss Mapple, may prefer more bitter flavors.”

“A large coffee manufacturer is looking for the most effective method for determining color and moisture in roasted coffee.”

Holmes tells Nancy that she is correct and that lighter roasts tend to have a more acidic profile and preserve more of the bean's original characteristics, while darker roasts exhibit a more robust roasted bittersweet flavor. He also points out that coffee “beans” are actually the seeds, or pits, of the fruit that grows on coffee trees that grow small red fruits called coffee cherries. 

Miss Mapple then tells the detectives that coffee beans typically have a 10-12% moisture content, which is reduced during roasting. The moisture content affects how beans respond to heat and influence roasting dynamics. She says that coffee roasters must also consider weight and volume as they influence pricing and yield calculations. 

“It also influences grinding consistency,” says Eggcule, who begins another lecture on the importance of grinding to the brewing method. He also tells the detectives that he recently spent considerable money on a top-of-the-range grinder to ensure the quality and consistency of his home-brewed coffee. 

“Coffee “beans” are actually the seeds, or pits, of the fruit that grows on coffee trees that grow small red fruit called coffee cherries.”

How does analyzing moisture and color with NIR spectroscopy work?

Holmes then asks the detectives how they think the client should perform the analysis, and finally, the detectives are all in agreement. They suggest the client use NIR-Online for the analysis as its real-time control will ensure consistent and repeatable quality in the final product. Due to the complex nature of coffee roasting, ensuring consistency and optimizing each process can be difficult. Several parameters could be accurately, simultaneously, and continuously measured with NIR. They all agreed that conventional methods were too destructive and slow to achieve the optimization required to keep the likes of Eggcule Satisfied!

Shallot Holmes then sets off to visit the client, where he discovers that they need to analyze Arabica and Robusta beans as well as coffee powder. He assesses the processing facility and decides on the best place to install an NIR sensor. First, the beans are fed into a roaster feed bin before entering the roasting chamber. After being roasted, the beans pass into a cooling chamber. After being cooled, the beans exit the roaster discharge bin, where Shallot recommends placing the sensor. 

The client takes Shallot's advice and sets about installing the sensor and getting all the necessary calibrations done so that they can start measuring the moisture and color content. A couple of weeks later, once everything is up and running, the client cannot believe how quickly they now receive information about the color and moisture of their roasted coffee. Together, they plot the results in a chart showing the results and the Standard Error of Calculation (SEC). 
 

ParameterRange SEC
 Arabica 
Moisture3.8 – 5.70.02
Color*55 – 880.22
 Robusta 
Moisture2.8 – 5.20.12
Color* 52 – 861.5
 Coffee Powder 
Moisture1.6 – 60.03
Color*46 – 860.29


The information received lets the client make numerous optimizations that dramatically increase energy and cost efficiency. Shallot is very happy and returns to the office to tell the detectives the good news and thank them for their help in solving the case. 

“Several parameters were accurately, simultaneously, and continuously measured with NIR, and the optimizations made possible increased energy efficiency and cost efficiency.”