Public Lab Research note


Detection of Added Sugar in Red Wine Using Visual Light Spectroscopy

by ygzstc | July 23, 2014 19:37 23 Jul 19:37 | #10955 | #10955

Disclaimer: All the information (including hardware, software, experimental setup, procedure, and results) in this research note is provided "as is" without warranty of any kind. Author makes no warranties, express or implied, that they are free of error, or are consistent with any particular standard of merchantability, or that they will meet your requirements for any particular application and/or problem. They should not be relied on for solving a problem whose incorrect solution could result in incorrect claims which may or may not lead to any kind of monetary loss related to trade and/or legal liability. If you do use them in such a manner, it is at your own risk. The author disclaims all liability for direct, indirect, or consequential damages resulting from your experiments and claims based on their results.

Introduction

Naturally occurring sugar is the sugar found in whole, unprocessed foods, such as milk, fruit, vegetables and some grains. The most common natural sugars are fructose, which is found in fruit, and lactose, which is found in milk products.

Added sugar is the sugar added to processed food and drinks while they are being made, as well as sugar you may add to your food at home. Food manufacturers may add both natural sugars (such as fructose) and processed sugars (such as high-fructose corn syrup) to processed food and drinks.

Why is sugar added to food and drinks? Well, while added sugar provides no nutritional value, it does serve many uses in food processing. Added sugar can: (1) Serve as a preservative for jellies and jams; (2) Assist in fermentation of breads and alcohol; (3) Maintain the freshness of baked goods. Sugar is also added to processed food and drinks because it makes them taste more appealing.

There are serious health consequences to consuming added sugar. Too much added sugar in your diet can contribute to tooth decay, obesity, difficulty controlling type 2 diabetes, higher triglyceride levels, lower high-density lipoprotein (HDL, also called “good” cholesterol) levels, and heart disease. Also, if you fill up on foods or beverages that contain added sugar, you are less likely to consume healthy foods and beverages that protect your health. So the question is: Can we come up with a cheap but effective method for household use to detect added sugar in our daily drinks?

In this preliminary study, detection of added sugar in red wine is investigated using visual light spectroscopy.

(So, why did not I use grape juice? Well, wine can be considered as grape juice and I do not like non-alcoholic grape juice at all :) )

Setup, Sample Preparation and Data Collection

In the study, red wine (Gallo Family, Cabarnet Sauvignon) and granulated white sugar are considered. In addition, Public Lab’s webcam-based spectrometer (http://publiclab.org/wiki/spectrometer), and its data collection software “Spectral Workbench” (https://spectralworkbench.org/) along with few extra tools are used (See Figure 1).

PictureRWS-1.png

Figure 1 - Setup (left) and products used (right)

Total 8 samples are created. Starting from no sugar added red wine, 1 tea spoon (~ 4 grams) of granulated white sugar is added to a cup (~ 235 ml) of red wine for each sample, up to 7 tea spoons.

Once the spectrometer is calibrated with CFL, physical setup (shown in Figure 1) is set. First, a spectral data is recorded with the empty petri dish (90 mm diameter, glass) and a Verilux 18 Watt Natural Spectrum CFL Bulb (http://www.verilux.com/compact-fluorescent-bulbs/compact-fluorescent/ ). We call this spectrum as “baseline”. Later, from each sample, 15 ml is taken and poured in the petri dish and the spectral data are collected. (Those spectral data are on the Public Lab’s website and nomenclature of the data is provided in Appendix.)

Collected spectral data are then smoothed with 5th order Savitzky–Golay filter. Baseline, red wine (no added sugar) and red wine with added sugar (7 tea spoons/cup) are shown in Figure 2.

PictureRWS-2.png

Figure 2 – Spectral data of the baseline, red wine (no added sugar) and red wine with added sugar (7 tea spoons/cup) - zoomed region on the right

Later, the difference between each sample spectra and the baseline spectrum is calculated. Resulting spectral data (from few samples) are shown in Figure 3.

PictureRWS-3.png

Figure 3 – Spectral data of the difference between the samples and the baseline (zoomed region on the right)

As a simple metric for measuring the level of added sugar, area under the curve between the wavelengths 425-440 and 590-620 nm are selected. This is more robust measure compared to “peak height” which fluctuate more causing noisy measurements.

Values of the area under the curve (AUC) with respect to different added sugar levels are shown in Figure 4. It is clear that the amount of added sugar and AUC exhibit almost perfect linear relation.

PictureRWS-4.png

Figure 4 – Adulteration level and AUC exhibit almost perfect linear relation

NOTE-1: The first data point which is calculated from red wine sample (without added sugar) seems to be problematic! That was the first data sample poured into the petri dish and petri dish might not be completely clean at that time. Another potential explanation is: the lamp used in this experiment takes some time to reach its stable maximum intensity as any other CFL and may be that sample spectra collected little early. However, remaining data suggest that the technique works well.

Results and Discussions

Results of this preliminary study show that, using visual light spectroscopy (using the spectrometer developed by Public Lab), it’s possible to detect/model/measure added sugar amount in red wine in an efficient and simple way. Furthermore, these results indicate that it might be possible to detect and measure added sugar amount in other drinks such as fruit juices, coffee etc. as well.

These results also suggest that, similar approach may be used to identify the level of salt or some other added sweeteners in drinks.

NOTE-2: Looks like the LED lamp I used in my olive oil adulteration study is much better than Verilux CFL that I used in this study.

Appendix

test2: CFL spectra used for calibration

d3-L: Spectra of the Verilux CFL

d3-b: Spectra of empty petri dish - baseline

d3-rw-s0: Spectra of sample – red wine (no sugar added)

d3-rw-sx: Spectra of sample – x tea spoons of sugar added to a cup (x=1 to 7)


I did this Help out by offering feedback! Browse other activities for "spectrometry"


People who did this (0)

None yet. Be the first to post one!


19 Comments

Wow, very cool! Can you link to your spectra on SW?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Sorry but what is SW?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Sorry! Spectral Workbench.

Reply to this comment...


Info about the spectra is in the appendix already but I guess you mean something different by linking? Am I missing something?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Oh I was just hoping for links to the raw data you collected.

Reply to this comment...


I just saw an article about detecting if a drink has been drugged: http://www.gadgetify.com/pd-id-tells-drink-drugged/

How much sugar is in wine? How much rohypnol is in beer?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


A rather nice exercise, well done. Quite surprising results I think, I would have predicted the extra sugar to have had minimal effect on the transmission of light through the wine. Your results suggest it is both detectable and predictable.

So why are you testing for extra sugar ? I know the Europeans sometimes add sugar to their grapes, but the sugar is then fermented into alcohol by the yeast, so there is usually no remaining sugar in a dry wine. Slightly different for some sweet white wines and fortified, which have residual sugar levels, but you wouldn't expect to have to test for sugar in bottled red wine. Even if the grapes had been "boosted" the sugar is now long gone.

It would be interesting to see if the addition of extra acid to wine could be detected the same way. If you have time on your hands and want another experiment, maybe add tartaric acid in small amounts and see if you can detect the levels. Red wine might have around 8g/litre of tartaric acid (and other acids), so adding an extra 0.5g/L in steps up to 12g/L would be useful. While you are doing the spectroscopic analysis, taste the wine as well and see if you can put the glasses into increasing order of acidity :) We found the palate was quite discriminating. IIRC Euro wines aren't allowed to add extra acid, so that would be a useful test to have available.

well done again, I enjoyed reading about your work (and the Olive Oil analysis), I'd also suggest using a broad spectrum source rather than the CFL, but you already know that !.

stu

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Thanks Stu... I just wanted to see if added sugar is detectable first. If yes, you can may be measure the sugar levels during wine making process as well, right? Or chose the appropriate grapes to start with... Also, "no added sugar" labels on juices may not be true :) You can catch them too...Also, may be differentiate different sugars or sweeteners, or may be even detect some other additives in juices...May be it is possible to detect honey adulteration with sugar and/or syrup as well... It was just a humble start :)

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


ah yes, good thinking. well done again on your work, a very well written research note as well.

stu

Reply to this comment...


I think i found the data on Yagiz's Spectral Workbench profile, and I made a set: https://spectralworkbench.org/sets/show/1369

Embeds don't seem to work, maybe iframes in comments are disallowed?

Screen_Shot_2014-07-25_at_12.06.53_PM.png

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Thanks a lot Jeff!

Reply to this comment...


Good observations -- but why use a CFL which has poor SNR for wide-band averaging because the spikes prevent using higher light intensities for broad-band measurements? Switch to a halogen and then search for a wider bandwidth (which shows indications of sugar sensitivity) to average which should have a higher SNR. Cheers, Dave

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Hi, how does one download the data in the appendix? Thanks!

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Here’s my try at this experiment. Basically, Yes, you can detect added sugar in wine, but it’s a very small change, and requires an accurate baseline. The difference in absorbance is more than can be accounted for by the presence of sugar. Possibly an interaction between the sugar and the wine (fermentation?)

Plotting the absorbance from the original data, s1 vs s7 (A = log10(s1/s7)), gives this:

absorbanceS1A.png

The peak absorbance of 0.15 Au seems kind of high, especially since the path length is only 0.25 cm (15 ml liquid in 90 mm dish). Multiply that by 4 to get the standard 1 cm path length gives an absorbance of 0.60, with a sugar concentration of approximately 0.3 mole/liter = (7 teaspoons/250 ml) * (4 grams/teaspoon) * ( 1000 ml/liter) * (mole/342.2 grams). Compare that to this chart of sucrose absorbance at 1 cm path length:

sucroseAbsorbance.png

https://www.researchgate.net/profile/Robert_Stark3/publication/26547496/figure/fig5/AS:214060537782297@1428047417621/UV-VIS-absorbance-spectrum-of-sucrose-solutions-over-10-mm-path-length-The-absorbance-at.png

Using WebPlotDigitizer (https://apps.automeris.io/wpd/) to extract data from the above graph, gives approximately 0.004 absorbance for 0.25 mol/l sucrose at 500 nm. So it’s not just the sugar causing the observed absorbance. Maybe there’s a reaction of some kind between the wine and sugar?

The goals for this experiment:

• remove noise from spectrometer • verify 0.3 mole/liter sucrose absorbance • measure cabernet/sucrose absorbance

Setup

setup.JPG

Using an old Kodak Condenser Head enlarger to contain the light source and control the amount of light reaching the spectrometer. For this experiment, I used a piece of tissue paper in the film carrier and removed the object lens.

Samples are placed in plastic boxes: 5cm x 5cm x 7cm. Shown with the 5% cabernet sample in place.

PL 3.0 spectrometer with DVD grating. The components were removed from the box and attached to magnets, placed on metal sheet and positioned for correct alignment and focus. Never could get things to line up properly using the box.

Remove Noise

For the software, I’m using Python with the Pygame library. The program reads from the spectrometer camera, processes the image, and outputs the spectrum intensity CSV file and a reference image. SpectralWorkbench is not used.

To remove noise, I’m using two kinds of averaging. The first, Frame Averaging, reads the spectrum cross-section from a number of frames and outputs the average intensity. Here’s the result of a 50-frame average:

before-after.jpg

The second is Row Averaging. Instead of just reading a single row of pixels at the cross-section, it averages together a number of rows on either side. The average cross-section is then used by the frame averaging and output to the CSV file. Currently averaging 20 rows on either side of the cross-section.

The rows between the red lines are averaged to become the ‘cross-section’:

rowAverage-spectrum-20181218-112614.jpg

Camera resolution was increased from the default 640x480 used by SpectralWorkbench, to 1280x720. The PL 3.0 camera also supports 1600x1200, but the processing time was much slower.

Verify Sucrose Absorbance

Using this configuration:
40 row average; 30 frame average; 2700K LED Base: reverse-osmosis water, 5 cm path length Solution: reverse-osmosis water + 0.3 mole/liter sucrose (19g/180ml); 5 cm path length gives this result:

water-waterSugar2.png

Measured value is approximately 0.025. Dividing by 5 to get 1 cm path length, gives 0.005, very close to the value in the sucrose absorbance chart. The spectrometer is able to accurately measure sucrose absorbance, with very little noise.

Measure Cabernet/Sucrose Absorbance

Couldn’t find the “Gallo Family Cabernet Sauvignon” locally, so instead used “Double Dog Dare Cabernet Sauvignon”. The cabernet is much too dark to use with a 5 cm path length, so I made a 5% solution, giving an effective path length of 0.25 cm, same as the original experiment. For the sugar, I kept the concentration at 0.3 mol/liter, rather than diluting it to 5%. If the absorbance is only caused by the presence of sugar, this will allow a direct comparison with the water/sugar results.

Using this configuration: 40 row average; 30 frame average; 2700K LED Base: Cabernet, 5%; 5cm path length Solution: Cabernet, 5% + 0.3 mole/liter sucrose (19g/180ml); 5 cm path length gives this result:

cabernet-cabernetSugar2.png

Measured value is approximately 0.06, more than twice the absorbance of the 0.3 mol/liter sucrose. Evidently, there’s some reaction between the cabernet and sucrose that’s contributing to the absorbance.

“The fermentation process generally stops on its own when there is no sugar left, so you will have a really dry wine, or when the alcohol concentration reaches about 14-18%, depending on the yeast strain.”

I wonder if the extra sugar is interacting with the yeast in the wine…

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Problem I have is that sucrose solution looks colorless so does not absorb visible light. I feel that the changes in absorbance that you are seeing are caused by changes in refrative index. Actually measuring sugar content using refractive index is a thing see brix scale.

Reply to this comment...


Well, the sucrose absorbance is very low, but it's not zero. See Sucrose Absorbance. Since the data is 'clean' and the calculations match expectations, the result should be valid.

Thought refraction depended on angle of incidence and wavelength. The angle is zero from light to grating, and the response is mostly flat across the visible wavelengths

Reply to this comment...


solaria, great work, much kudos deserved. A rigorous experiment.

Like david_uwi, I wondered at why sucrose is absorbing visible light (VL) at all, being colourless. Bit of digging and it seems sucrose is a big player in the IR (https://webbook.nist.gov/cgi/cbook.cgi?ID=C57501&Type=IR-SPEC&Index=0#IR-SPEC) and has detectable absorbance in the near-IR. Likewise in the UV it is detectable. The ResearchGate sucrose absorption graphic is linked to another method for determining sucrose concentration (viscocity) and I wasn't able to quickly verify that data.

The water samples showing a log absorbance of 0.005 (about 1% relative) for 0.3mol/L are cool. 1% is not a lot to go on to detect a "hella lotta" sucrose in a beaker.

The fact you have got such consistent data showing an absorbance of around 0.06 on the log scale (or close to 15% relative ?) in the wine confounds me a bit. Anthocyanins (colour compounds in grapes) are a complicated beast and I have a suspicion that they are reacting to the large increase in sucrose. They are an excellent predictor of acidity/fruitiness (wine tasting 101). I don't think the yeast/fermentation hypothesis is correct. Even "Double Dog Dare Cabernet Sauvignon" would not have residual viable yeast, as rough as it sounds :). Try the whole experiment again using increasing amounts of tartaric acid instead of sugar to see those anthocyanins at work.

A few thoughts on this. Putting 6-7 teaspoons of sugar into a tumbler (250mL) of red wine doesn't need spectroscopy to detect ! I note what I said 4 years ago, dry red wine (so almost all) doesn't have residual sugar. Certainly not in the 0.3mol/L range. Wine grape sugars are fructose and glucose anyway. Why are we confusing the detection of sugar (sucrose) by using a wine sample ? If it is to detect the addition of sugar (legal in the EU, illegal here in Australia, but plenty of ways around it, concentrated grape juice being one) then the horse has bolted, the sugar is no longer sugar but alcohol after fermentation.

Lots of research about measuring sugars (all types) in soft drink, honey and blood. Different strategies, really interesting stuff. With the recent publicised honey contamination issues analysis of honey seems very worthwhile

https://nuft.edu.ua/doi/doc/ufj/2016/3/3.pdf

but mostly it seems they use IR or UV.

Interestingly, the blood sugar level in blood (for diabetics) can be done using spectroscopy.

Thanks again solaris, great to read and ponder on your work.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Thanks Stray'. Actually, the 0.06 A for the wine was at 5 cm path. Divide by 5 to get 1 cm path for comparison.

If yeast/fermentation was contributing to the increase, I think the effect would increase with time. Re-tested the samples that had been sitting around for a few days, and there was no change from the original tests.

Anthocyanins sounds interesting. So, if I tried the experiment with a white wine, the absorbance increase should go away? Great, maybe we've found a spectroscopic method to differentiate between red and white wine :)

To actually detect sugar requires looking at absorbance in the 210 - 270 nm range, outside the range of this 'meter. On the other hand, creating the tools to perform these tests is interesting. It's the journey, not the destination.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


thanks solaris, yes, the yeast, like the sugar, has bolted.

An analytical test for red and white wine, excellent, we are making progress :)

Agree about the journey. I wonder what the absorbance graphs for alcohol look like ? :)

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Login to comment.