Coffee Data Science

Improving Coffee Grind Measurement using a Sifter

Using image processing to understand grinder performance Part 2

Robert McKeon Aloe
Towards Data Science
4 min readFeb 19, 2021

--

Previously, I looked at using image processing to measure grind particle distribution, and I found it challenging. Taking the image requires care, but that’s not all. It seems something is happening with the coffee because setting 15 and 30 on the Niche produced similar results according to the image processing technique. I suspect it is due to grounds sticking together, and to test this, I will use a sifter.

I have a Kruve sifter, and I have a few screens (250, 400, 500, 800), but I mainly use 400um and 500um. Considering I’m most concerned with making a staccato shot using a few grind levels of the Niche, I focused on these two screens which gave three sift levels.

All images by author

I used 4 or 5 beans, so the test was quick. Then I sifted the grounds for each setting, measured the weight for each level, and then put some grounds from each sift level on to the paper to image.

Here are the three sift levels on paper using the grind setting 15.

Setting 15 images: Left is <400um, Middle is between 400um and 500um, and the right is >500um

I used the measured weights from each sieve and combined that with the imaging measurements to give these distributions below. This assumes the particles are spheres (they aren’t quite but any 3D shape is proportional to the third power).

However, there isn’t something right with these graphs. Setting 15 and 0 look too close, and they both appear to have a lot of coarser particles which is impossible because a sieve was used would have filtered those out. Let’s look at just setting 0 and the distributions from particles in each sieve:

The number of fines in the >500um is problematic. For <400um or the middle one, anything above 500um is an error. Most likely due to multiple particles clumping together causing the algorithm to have issues.

Additionally, if we sum up the volume for the three sieves, we don’t get the right distribution relative to ground truth.

If we ignore all particles outside of the desired sieve, we get this distribution which looks a lot better. These curves are the result of ignoring particles outside of the sieve range when merging the data across sieves.

Combining imaging and sieves seems to be a technique that could work for determine coffee grind distribution on the cheap, but that still doesn’t get to the more ideal situation where anyone can put coffee grounds on a piece of paper and take an image to get the particle distribution.

In part 3, I will explore the data to see what improvements could be made using image processing to automatically clean the image.

--

--

I’m in love with my Wife, my Kids, Espresso, Data Science, tomatoes, cooking, engineering, talking, family, Paris, and Italy, not necessarily in that order.