The Science of Coffee with James Harper

Thursday, 20 March, 2025

From the Big Bang to your big morning coffee, years of research have gone into the process of making your cup of coffee better. James Harper is determined to uncover the details and take us on this epic journey.

Words by James Harper of Filter Stories

Illustrations by Andy Torr


As dawn breaks, you probably wake up with one thing on your mind: adding water to ground coffee to brew up a delicious coffee. 

But behind this simple morning ritual lies an epic story that stretches from the origins of our universe to the cutting-edge technology of today. 

This story is, in essence, The Science of Coffee - a series I created, born out of an unexpected revelation one morning during my routine brew.

On an ordinary day, I would meticulously heat my water to exactly 93 degrees, measure out a precise 31 grams of coffee, and begin my brewing ritual with my trusty V60. But one fateful day, in a moment of absent-mindedness, I poured water straight off the boil onto my coffee. The result? A strikingly bitter, unpleasant cup. 

As I stared at the soggy coffee grounds, a single question echoed through my mind: 'What happened!? What happened at a microscopic level that led to this cup tasting so weird?'

Thus began my journey into the science of coffee, an exploration that has now evolved into a spin-off of my documentary coffee podcast, Filter Stories. 

Over the course of six months, I delved deep into discussions with the world's leading coffee scientists, aiming to demystify the microscopic mysteries of coffee and empower the coffee community to elevate their home brewing experience. The episodes traverse a diverse range of topics, from the science of water and extraction to coffee genetics, espresso technology, latte foam, and even sonic seasoning, which I’ll explain later.

So, let's embark on this journey together and discover what your morning coffee ritual looks like through the lens of science.

Water 

Bleary eyed, standing in the early morning light, you switch on your kettle. If you live in a hard water area, you’ll see little flakes of limescale begin forming and dancing in the heating water. If left unchecked, they will scale up your boilers and kettles and often stop automated coffee brewers functioning altogether. 

The culprit? Bicarbonate. 

And its impact doesn’t stop there: too much of it will make your coffee taste lame by neutralizing the coffee's acids. Curiously, too little of it will also corrode your kettle as well. 

So where does this (un?)helpful bicarbonate come from? The answer requires a journey back to our planet's cosmic past. The water in the kettle, now nearing its boiling point, shares its origins with the birth of the Earth, and possibly even with ancient comets. 

The earth was created by the explosion of an ancient star, and the stardust coming together contained many elements. The heavier ones like iron sunk deep into the earth’s core as the world swirled together. Lighter metals, including calcium, surfaced into the crust beneath our feet. 

Over billions of years (and an evolutionary arms race involving an untold trillions of aquatic critters), limestone was formed from this calcium. And as rainwater hits and then dissolves this limestone, bicarbonate are released into your water tables, which eventually make it into your cup of coffee.

Fortunately, it’s easy to rectify by getting a good water filtration system. And by increasing the water’s magnesium content, research suggests your brews will sparkle with even more flavour. 

Coffee genetics

As you pour your beans into the grinder, take a moment to consider their origins. Perhaps you’re brewing up a delicious blueberry-rich SL28 from Kenya. It is the result of centuries of natural evolution and meticulous cultivation. 

But this experience is increasingly becoming a luxury: Climate change, with its unpredictable weather patterns and worsening pest infestations, is threatening the Kenyan coffee industry, leading to less dense, less flavourful beans.

The plight of most Kenyan farmers is a stark reminder of the challenges that coffee cultivation faces globally. A warming climate, erratic rains, and falling prices are all conspiring to make traditional coffee farming less viable. 

One of the issues is that Arabica, the most common species of coffee admired in specialty coffee, is not particularly helpful for farmers in the face of climate change. Scientists globally are looking for alternative species, but many of these potential substitutes are not yet ready for commercial cultivation. 

And if we don’t find anything soon, it’s not a crazy idea to imagine in the not-so-distant future you might be pouring Robusta beans into your grinder instead. This species is known for its hardiness and productivity, but it may not offer the same quality of flavours as Arabica does, but science is also entering into the cultivation of this species, so it is not all doom and gloom. (Editor’s Note: You can read all about Robusta on Pg36)

Espresso machine

If you’re a home espresso nerd, you may have a smart switch that automatically turns on your espresso machine half an hour before you wake up. Once the boiler water is piping hot and ready to go, you will most likely grind your coffee into a portafilter, tamp it down and pull a gorgeous thick, creamy espresso. 

This satisfying experience is testament to over a hundred years of innovation, primarily from Italy. Key to the evolution of espresso was the discovery of using a lever to create pressure back in the 1940s. This pressure allowed for a finer grind, resulting in the birth of crema - that luscious, golden froth that signifies a well-extracted espresso. This discovery marked the beginning of what we appreciate today as true espresso.

But this innovation also made life for baristas a lot safer. Earlier models of espresso machines had high pressure boilers where the barista would be required to regularly release excess steam. And if they forget (which would happen), the boiler would explode, sending shrapnel flying across the counter. 

Now, thanks to the advent of the lever, as well as the electric pump and heat exchanger, each shot pulled from a modern machine promises safety, consistency and repeatability, enabling you to deliver an exceptional espresso, time after time.

Extraction

So, you’re brewing a Kenyan coffee this morning and you want to make those blueberry notes as sweet as possible. But how?

Professor Bill Ristenpart at UC Davis Coffee Centre recently updated the Specialty Coffee Association’s Brewing Control Chart. To highlight the coffee's innate sweetness, the research suggests you should aim for a lower extraction yield and a low Total Dissolved Solids (TDS). 

But what does that look like in practice? Peter Giuliano, Executive Director of the Coffee Science Foundation put it plainly: “the easiest way to counteract bitterness and amplify sweetness in the research we’ve done, is just to make it weaker”.

But why is it happening? We don’t really know. But we do know that it has little to do with sugar! These weaker cups of coffee don’t contain more sugar, because sugar levels were measured to be below our sensory detection threshold. Professor Bill Ristenpart theorises it could be  down to tricks being played on our brain. Fortunately, the Coffee Science Foundation has recently launched new research to help understand what is going on. 

Latte foam

What if you want a milky coffee first thing in the morning? You turn the dial on your espresso machine’s steam wand and begin to steam the milk. But, it turns out that we are actually not “steaming” milk at all. Because steam simply condenses to water, and condensed water will not create latte foam.

As you introduce the steam wand into the pitcher of milk, the steam actually sucks in air from the room (technically referred to as ‘entraining’). And as you swirl the milk, large bubbles break into smaller ones. 

But what keeps these newly formed bubbles of air from floating up and popping? Surfactants. These little broken pieces of protein race to the surface of the air bubbles to keep them intact. As the number of bubbles increase, they push against each other, and soon a silky microfoam is formed, held together by surfactants, the unsung heroes of latte foam. 

But, as you place your cappuccino on the counter, almost immediately fine bubbles appear in the latte art, signaling the beginning of the foam's demise. This is drainage in action, the process where liquid within the foam gradually flows out. At the same time, Ostwald ripening occurs, a phenomenon where smaller bubbles are absorbed into larger ones due to differences in pressure.

Latte art is fleeting because foams are very delicate structures. But the secret to longer lasting latte art is simple: smaller bubbles. 

Sonic seasoning

Finally, you take a sip of your coffee. But the flavour you perceive could still noticeably change depending on what you’re hearing.

If you’re listening to hard rock music with its intense, lower-pitched rhythms, research suggest you’re going to perceive a complex coffee’s bitter notes more readily. But by switching the track to a soft, light piano piece with higher pitches, the coffee could seem sweeter. This is the same sonic trick that Colombian Barista Champion Diego Campos used in combination with a powerful routine that helped him win the 2021 World Barista Championship. 

But, he could have possibly lost that championship if he did what many coffee shops often do: make too much noise! In a louder, more chaotic environment, research suggests coffee might taste less vibrant, its complexity diminished, replaced by a watered-down impression. 

And, for me, a lover of audio and coffee, this is the ultimate shame. Considering all the work that has gone into making this sublime cup of coffee, from the farmer’s choice of coffee tree to the role of the surfactants in holding together beautiful latte art, the whole experience can be compromised by an unnecessarily loud stereo. 

In the end, every sip of the cappuccino is not just a morning pick-me-up; it's a tribute to a grand epic of science, nature, and human innovation that spans across time and space. 

Got something to say? Then leave a comment!