TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Coffee Data Science

Rethinking Refractometers: VST, Atago, and DiFluid; Part 2

Robert McKeon Aloe
TDS Archive
Published in
5 min readSep 26, 2022

--

This is the second article in a series evaluating the DiFluid (DFT) digital refractometer to the VST and Atago refractometers. Refractometers have been used to determine the Total Dissolved Solids (TDS) in coffee by correlating the change in refractive index of the coffee at a specific temperature. Though they are the most commonly used refractometers for coffee, the VST and Atago devices are also the most costly. DiFluid has recently emerged on the market with a much lower price point and smaller footprint. Early testing from various people in the community has yielded interesting results from the DFT, but, as our results suggest from Part 1, there appears to be significant, unpredictable variability between devices.

Socratic Coffee collected data on multiple sets of DFT devices. A main goal of this testing is to understand how accurate these devices are to groundtruth (i.e., coffee solubles measured directly via a moisture balance). Additionally, this testing incorporated different solutions of varying signal + noise. Through these data, we get a better picture regarding the complex nature of measurement and difficulties using refractive index to infer dissolved solid content.

All images by authors

The Data

The data was collected in three batches across 16 DFT devices, 1 VST, 1 Atago Coffee, and 1 Atago RX-5000i. Each batch used a different set of DFT devices (5, 6, and 5 respectively). Additionally, some samples were analyzed with a moisture balance, providing a groundtruth measurement. Several solutions were used, each providing different insight:

  1. Sucrose solution (the basis for Brix measurement; well-established normative data; a “clean” assessment of hardware)
  2. Instant Coffee at Espresso Strength (high coffee soluble concentration with minimal interference from non-solubles; increased difficulty from sucrose, requiring software conversion of refractive index reading to coffee solubles)
  3. Instant Coffee at Filter Strength (low coffee soluble concentration with minimal interference from non-solubles; reduced signal strength compared to instant coffee espresso but relatively low noise compared to real-world solutions as instant coffee is almost entirely coffee solubles — 99.9%
  4. Espresso (real-world application at high coffee soluble concentration; a difficult testing solution with increased noise but strong signal)
  5. Filter Coffee (real-world application at low coffee soluble concentration; the most difficult testing solution with decreased signal and increased noise, testing robustness of both hardware and software)

It should be noted that not all test sets used all of these solutions. In testing, some samples were filtered with a syringe filter and some were not, but it is explicitly stated in the charts.

In this article, we will look at all five solutions, and this set of data had filtered and unfiltered samples.

Analysis

We will start with the most ideal case, sucrose, and move towards filter coffee (the most difficult due to the low TDS). For sucrose, there is still a variation across devices, but they are pretty close TDS. And it should be noted that all statements regarding the plots are simply observations from the data, to the groundtruth. The y-axis is set at a range to include all results from espresso to filter strength not inferential analyses attempting to extrapolate more generalizable results.

The TDS results for the Atago RX-5000i are originally in Brix, and they are converted using the Atago Pal Coffee data. For each reading, the Atago Pal Coffee gave Brix and TDS, so we used this ratio to convert the Atago RX-5000i from Brix to TDS. It should be noted that all of these devices have some commonality in output, but not all. Atago RX-5000i has only Brix, Atago Pal Coffee has Brix and coffee TDS, and DFT has coffee TDS and nD (refractive index).

For espresso strength instant coffee, we have an additional dataset of filtered and unfiltered. The results for the DFT sensors matches well for filtered or unfiltered, but there is an offset from the groundtruth. Oddly enough, the two Atago sensors and the VST sensor get better results with unfiltered coffee in this strength.

Moving to filter strength instant coffee, unfiltered still performs better, but only one DFT performs similar to the non-DFT devices. There is also more variability across DFT devices.

With real espresso, we see an offset from groundtruth for all the sensors. The DFT devices perform pretty similar to the others. The filtered result has a higher groundtruth but lower TDS for the devices. For the groundtruth, this was done using a moisture balance, but only one sample was taken (due to time constraints; one sample took one hour).

Now at the hardest to measure, we see an over-estimate across devices. Filtering follows a similar trend as before, but the groundtruth is below the samples instead of above. The filtered groundtruth was lower than unfiltered which is the opposite than before, which is curious, but it requires more data to better understand.

Finally, we can look at the percent error of the TDS samples across these different types. Sucrose performs the best, and VST and Atago are almost lock-steap. DFT has some variation, but some devices are closer.

This dataset was a nice sample across coffee types. However, the data on
refractometers seems to point to the complexity of the coffee beverage. They should be better studied as the differences across coffee types are more nuanced than previously believed. It’s also curious to see the clear impact of filtering a sample, something Socratic Coffee has studied previously. As their work suggested, filtering a sample seems to manipulate it in a more complex way than simply removing noise to improve the refractive index reading.

If you like, follow me on Twitter, YouTube, and Instagram where I post videos of espresso shots on different machines and espresso related stuff. You can also find me on LinkedIn. You can also follow me on Medium and Subscribe.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Robert McKeon Aloe
Robert McKeon Aloe

Written by Robert McKeon Aloe

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.

No responses yet