Spot Adulterated Olive Oil With This Spectrophotometer

Olive oil at its finest quality is a product that brings alive the Mediterranean cuisine of which it is a staple. Unfortunately for many of us not fortunate enough to possess our own olive grove, commercial olive oils are frequently adulterated, diluted with cheaper oils such as canola. As consumers we have no way of knowing this, other than the taste being a bit less pronounced. Food standards agencies use spectrophotometers to check the purity of oils, and [Daniel James Evans] has created such a device using a Raspberry Pi.

A spectrophotometer shines white light through a sample to be tested, splits the light up into a spectrum with a prism or diffraction grating, and measures the light level at each point in the spectrum to gain a spectral profile of the sample. Different samples can then be compared by overlaying their profiles and looking at any differences. This build shines the light from an LED through a sample of oil, splits the result with a diffraction grating, and captures the spectrum with a Raspberry Pi camera. Commercial instruments are usually calibrated by co-incidentally sampling a pure sample of the same solvent the test subject is dissolved in, in this case the calibration is done against a sample of pure olive oil. The software requires the user to identify the spectrum in the resulting photograph, before generating a curve.

From a basis of having worked with and maintained spectrophotometers in the distant past we would have expected to see an incandescent bulb rather than an LED for a flatter response, but since this is an oil identifier rather than a finely calibrated laboratory instrument this is probably less of an issue.

Over the years we’ve had quite a few spectrophotometer projects here, this Hackaday Prize entry from 2016 is just one of many.

27 thoughts on “Spot Adulterated Olive Oil With This Spectrophotometer

    1. If you use a blank does it really matter ? Since the blank will allow yu to have the spectral profile of your sensor and lightsource no ? It just has to stay the same between the blank and the measurement.

      1. Yes. You’re normally looking at a specific wavelengths since they correlate to the compound of interest. Narrowing your focus also reduces interference since you can get fluorescence which’ll mess up your measurements.

    2. Yeah. LEDs suck for this. Any small incandescent lamp would be an improvement. If you can time it right you can also use a xenon photoflash.

      But for what he is doing I think you really would want a FTIR spectrometer. It can actually identify the organic substances in it. In the visible spectrum there is just so many other things that could change the spectrum.

      Add: yeah, went to look and they do use ftir to check olive oil. https://www.researchgate.net/figure/FTIR-spectra-of-extra-virgin-olive-oil-corn-oil-and-sunflower-oil-scanned-at_fig1_221976821

      1. FTIR is a completely different kind of spectrophotometer. it is short for Fourier Transform InfraRed. we start taking measurements in the frequency domain instead of the time domain and…. well…. things start getting out of hobby territory

    1. Not really.
      RGB is really just to trick your eyes, add PWM for intensity and you can fool your eyes into thinking you are seeing a wide full sprectral White.
      To get a good spectrograph you need a light source that is level in output over the spectral range you are interested in viewing. You can add a blank path to adjust for some dips in output, but If there is no light output at that wavelength by your light source then you aren’t going to be able to balance to compensate for that.

  1. The spectra you’re most interested in with this is in the 200 – 400 nm range which is well into the ultraviolet and not considered with the project since the camera likely won’t pick it up, though there’s a useable bump at about 680nm which is likely what he’s getting with the visible range.

    A simpler method would be to measure transmission at one of those high frequencies with a fixed source (UV LED would do it, UV-B preferably) and skip the grating.

    References here:

    https://www.researchgate.net/publication/260449534_Detection_and_Quantification_of_Adulteration_in_Olive_Oil_using_a_UV-_Spectrophotometric_Method

    https://www.laboratoryequipment.com/article/2011/10/your-extra-virgin-olive-oil-really-extra-virgin

    1. yes, this won’t say much about the unsaturated fatty-acid content of the oil (which absorb in the UV region) as it will mainly look at the visible end of the spectrum. It might give some useful information about the visible-region, with natural components like carotenoids and chloroophyll giving olive oil its color, but these can vary from one olive-oil to another.

      1. That would be my concern. Color varies in EVOO is one point against this working well. The other point against this working well is that much adulteration is going to be either dilution with a different plant oil or dilution with olive oil with a second (or later) pressing (so you are still looking at EVOO but it’s just less than 100%).

        Putting those two facts together makes me think that reliably using this setup to spot adulteration is going to be extremely difficult.

  2. If the design is purposed only for inspection of olive oil it is likely possible to dispense with the diffraction grating and use an LED of the right wavelength, or multiple LEDs one at a time, to make the identification. It could become a kitchen gadget every housewife wants, but you’ll have to test a lot of different oils to detect the different possible counterfeits they can create.

    Nice gadget idea! Good work.

  3. Absorption in the UV-B region would be easiest – I tried to post references but they didn’t get past the spam filter. There’s also a useful bump at about 670nm that is likely the difference being detected by the builder.

  4. I think this is a great project, but I don’t think that this is measuring what is intended.

    I think it’s measuring refractive index changes, or flexure in the grating changing the dispersion pattern. I think the left side of the plots are indicating that there just isn’t any light making it to the detector on that side of the spectrum. The maximum intensity of the led at the lower wavelengths is probably quite low, and there is probably a bit of a position shift in where the spectrum hits the detector when the oils are put in the light path. This is likely just an error in the measured background. If that’s the case, the absorption features on the long wavelength side are also likely not quite what is expected.

    For this to work well, the light should be collimated going through the sample, then focused onto the slit, collimated after passing through the slit, then dispersed though the grating and imaged by the camera.

    I’m not sure what the best path is toward identifying adulteration. First one needs to identify the adulterants or build a fingerprint of known good olive oil (direct from manufacturers?). It would take many good samples to determine what natural variation looks like. Then looking at common adulterants would allow detection of specific cases of adulteration. It looks like IR spectroscopy, UV spectroscopy, gc/ms, and chemical methods work well for this.

  5. Well… doubt need for the GC of the GC/MS. MS would be great but doubt we’ll be putting diffusion pumps in a “home use” device, and doubt any “home GC” would be quadrapole, would have to be magnetic sector to keep simplicity. Even with all that, either is still far too costly for the home. Spectral examination as originally proposed should do the job and I’ll wager could be sold for the same as other common kitchen gadgets. I thought even a diffraction grating to be too costly for the home. I estimate one has to test only at 3 or 4 different wavelengths to catch most fakes and that makes LEDs just the ticket.

    My belief is that success is probable with just a few LEDs.

  6. I’d wonder how reliable this is. I’d first want to run it against a wide range of “known good” oils to see what the acceptable variance in the baseline looks like as I would not expect all such oils to look the same based solely on all of them being extra virgin olive oil.

  7. In an earlier post I said GC where meant to say MS. My bad.

    —–

    As Pewlett Hackard suggests a GC may be just the ticket, I can see this working with just the GC, no MS. It would likely be a flame ionization detector unit. Could see this being a relatively small package for the home. If I had to develop this idea I’d still be going for LEDs and detectors for home use, only the lab developing this product would need to know the full spectra produced by pure olive oil and fakes to define what the home use product would need to watch for.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.