Spectroscopy On The Cheap

[Project 326] wanted to know exactly what gas was in some glass tubes. The answer, of course, is to use a spectrometer, but that’s an expensive piece of gear, right? Not really. Sure, these cheap devices aren’t perfect, but they are serviceable and, as the video below shows, there are ways to work around some of the limitations.

The two units in question are “The Little Garden” spectrometer and a TLM-2. Neither are especially sensitive, but both are well under $100, so you can’t expect much. Because the spectrometers were not very sensitive, a 3D printed jig and lens were used to collect more light and block ambient light interference. The jigs also allowed the inclusion of special filters, which enhanced performance quite a bit. The neon bulbs give off the greatest glow when exposed to high voltage. Other bulbs contain things like helium, xenon, and carbon dioxide. There were also tubes with mercury vapor and even deuterium.

We’ll admit it. Not everyone needs a spectrometer, but if you do, there’s a lot of really interesting info on how to get the most out of these cheap devices. Apparently, [Project 326] was frustrated that he couldn’t buy an X-ray spectrometer and has vowed to create one, so we’ll be interested to see how that goes.

Some homebrew spectrometers can get pretty fancy. Of course, there’s more to spectroscopy than just optics.

Continue reading “Spectroscopy On The Cheap”

An Improved Spectrometer, No Lasers Required

Here at Hackaday, we love it when someone picks up the ball from a previous project and runs with it. That’s what we’re all about, really — putting out cool projects that just might stimulate someone else to extend and enhance it, or even head off in an entirely new direction. That’s how the state of the art keeps moving.

This DIY spectrometer project is a fantastic example of that ethos. It comes to us from [Michael Prasthofer], who was inspired by [Les Wright]’s PySpectrometer, a simple device cobbled together from a pocket spectroscope and a PiCam. As we noted at the time, [Les] put a lot of the complexity of his instrument in the software, but that doesn’t mean there wasn’t room for improvement.

[Michael]’s goals were to make his spectrometer a little easier to build, and to improve the calibration process and overall accuracy. To help with the former, he went with software correction of the color filter array on his Fuji X-T2. This has the advantage of not requiring a high-power laser and precision micropositioner to ablate the CFA, and avoids potentially destroying an expensive camera. For the latter, [Michael] delved deep into the theory behind spectroscopy and camera optics to develop a process for correlating the intensity of light along the spectrum with the specific wavelength at that location. He also worked a little machine learning into the process, training a network to optimize the response functions.

The result is pretty accurate spectra with no lasers required for calibration. The video below goes into a lot of detail and ends up being a good introduction to some of the basics of spectroscopy, along with the not-so-basics.

Continue reading “An Improved Spectrometer, No Lasers Required”

Measuring Nanometers At Home

If someone asked you to measure a change in distance at about one ten thousandths of the diameter of a proton, you’d probably assume you would need access a high-tech lab. The job is certainly too tight for your cheap Harbor Freight calipers. [Opticsfan], though, has a way to help. You might not be able to get quite that close, but the techniques will allow you to measure a surprisingly small distance.

The technique requires a Fabry Perot cavity, an inexpensive spectrometer, and an online calculator to interpret the data. This type of cavity is two parallel mirrors facing each other with a slight gap between them. Light can only pass through the cavity when it is in resonance with the cavity. These have been around since 1899, so they aren’t that exotic. In fact, they are often used in laser communication systems, according to the post.

Continue reading “Measuring Nanometers At Home”

PySpectrometer version 2, showing mini spectroscope, 4 inch display and hand for scale

Pi-based Spectrometer Gets An Upgrade

Here at Hackaday, we love to see projects re-visited and updated after we’ve covered them on the site. It’s always exciting to see what the creators come up with next, and this Pi-Based Spectrometer project is a great example of that.

[LesWright] found himself with a problem when the new version of Raspberry Pi operating system was released (Bullseye), and it broke some functionality on his original software. Rather than just fix the issues, [Les] chose to rewrite the software more dramatically and has ended up with a much more capable spectrometer that is able to match professional devices costing many times more.

Screenshot of Waterfall Display for PySpectrometer 2
Screenshot of Waterfall Display for PySpectrometer 2

By using multi-wavelength calibration and polynomial regression data, the new version is much more accurate and can now resolve wavelengths down to +/- 1nm.

The whole project is now written in OpenCV, and there’s a nifty new waterfall spectrum display, that will show changes in measured spectra over time.

A low-cost benchtop spectroscope is coupled to a RaspberryPi Camera via a CCTV zoom lens and the whole setup is mounted to a small block of aluminium for thermal and mechanical stability. The spectroscope is pointed at a fluorescent lamp and the user is guided through a calibration routine to tune the software to the hardware.

We’re impressed with the precision [Les] has achieved with his builds, and the write-up is sufficiently detailed to allow others to follow in his footsteps. We’d love to see if readers build one themselves, and what they use them for!

If you want to read up on the original build, you can find our article here. We’ve covered several spectrometry projects in the past, including this Gamma-Ray Spectrometer and this one based around an STM32 Nucleo board. Continue reading “Pi-based Spectrometer Gets An Upgrade”

The inside of a Laser-Induced Breakdown Spectrometer

Spectrometer Detects Chemicals By Zapping Samples With A Laser Beam

Here at Hackaday, we love projects that result in useful lab equipment for a fraction of the cost of professional gear. [Lorenz], over at Advanced Tinkering, built his own instrument for Laser-Induced Breakdown Spectroscopy, or LIBS, and it’s quite an impressive device. LIBS is a technique for analyzing substances to find their chemical composition. Basically, the idea is to zap a sample with a powerful laser, then look at the little cloud of plasma that results and measure the wavelengths emitted by it.

A plot showing the spectrum of hematite
The spectrum of hematite (iron oxide), compared to that of pure iron

The laser [Lorenz] used is a Nd:YAG unit salvaged from a tattoo removal machine. After it fires a pulse, a photodiode detects the light and triggers a spectrometer, which consists of a diffraction grating, a few lenses and mirrors, and a linear CCD sensor. The grating splits the incoming lights into its constituent components, which fall onto the CCD and trigger its pixels. An STM32 Nucleo board reads out the results and sends them to a PC for further processing.

That processing bit turned out to be a full project on its own. [Lorenz] called upon [g3gg0], who software that simplifies the operation of the spectrometer. First, it helps with the instrument’s calibration. Point the detector at a well-known light source like a laser or a fluorescent lamp, then select the expected wavelengths on the resulting spectral plot. The software then automatically calculates the correct coefficients to map each pixel to a specific wavelength.

The software also contains a database of spectra corresponding to chemical elements: once you’ve taken a spectrum of an unknown sample, you can overlay these onto the resulting plot and try to find a match. The resulting system seems to work quite well. Samples of iron oxide and silver oxide gave a reasonable match to their constituent components.

We’ve seen other types of spectrometers before: if you simply want to characterize a light source, check out this Raspberry Pi-based model. If you’re interested in chemical analysis you might also want to look at this open-source Raman spectrometer.

Continue reading “Spectrometer Detects Chemicals By Zapping Samples With A Laser Beam”

Integrating sphere test setup

Cannonball Mold Makes A Dandy Integrating Sphere For Laser Measurements

It’s an age-old riddle: if you have a perfect sphere with a perfectly reflective inner surface, will light bounce around inside it forever? The answer is pretty obvious when you think it through, but that doesn’t mean that you can’t put the principle to use, as we see with this homemade Ulbricht sphere for optical measurements.

If you’ve never heard of an Ulbricht sphere, don’t worry — it’s also known as an integrating sphere, and that makes its function a little more apparent. As [Les Wright] explains, an integrating sphere is an optical element with a hollow spherical cavity that’s coated with a diffusely reflective coating. There are two ports in the sphere, one for admitting light — usually from a laser — and one for light to exit. The light bounces around inside the sphere and becomes perfectly diffuse, and creates a uniform beam at the exit port.

[Les]’ need for an integrating sphere comes from the desire to measure the output of some of his lasers with his Raspberry Pi-based PySpectrometer. Rather than shell out for an expensive commercial integrating sphere, or turn one on a lathe, [Les] turned to an unlikely source: cannonball molds. The inside of the mold was painted with an equally unlikely ultra-white paint concocted from barium sulfate and PVA glue. With a few ports machined into the mold, it works perfectly to diffuse the light from his dye lasers for proper measurements.

Lasers can be an expensive hobby, but [Les] always seems to find a way to make things more affordable and just as good. Whether it’s homemade doorknob caps for high-voltage power supplies or blasting the Bayer filter off a cheap CCD camera, he always seems to find a way.

Continue reading “Cannonball Mold Makes A Dandy Integrating Sphere For Laser Measurements”

Using A Laser To Blast Away A Bayer Array

A Bayer array, or Bayer filter, is what lets a digital camera take color photos. It’s an array of tiny color filters that sit on top of a camera’s CCD. The filter makes it so that each sub-pixel in the image sensor only sees red, green, or blue light. The Bayer filter is an elegant tool that gives us color digital photos, but what would you do if you wanted to remove one?

[Les Wright] has devised a way to remove the Bayer filter from the Raspberry Pi Camera. Along with filtering red, green, and blue light for their respective sensors, Bayer filters also greatly reduce the amount of UV and IR light that make it to the CCD sensor. [Les] uses the Raspberry Pi camera in his Pi-based Spectrometer, and he wants to remove the Bayer filter to improve and expand its sensitivity.

Of course, [Les] isn’t the first one to want to do this. Some have succeeded in physically scratching the filter off of the CCD, but because the Pi Camera has vital circuitry around the outside of the sensor, scratching the filter off would likely destroy the circuitry. Others have stripped it off using chemical means, so [Les] gave this a go and destroyed no small number of cameras in his attempt to strip the filter off with solvents like DMSO, brake fluid, and industrial paint stripper.

A look at the CCD, halfway through the process.

Inspired by techniques used in industry, [Les] eventually tried to use a several-kW nitrogen laser to burn off the filter (which seems appropriate given his experience with lasers). He built a rig that raster scans the laser across the sensor using stepper motors to drive micrometer bases. A USB microscope was included to allow progress to be monitored, and you can see a change in the sensor’s appearance as the filter is removed.

After blasting off the Bayer filter, [Les] plugged his improved camera into his home-built spectrometer and pointed it outside. The new camera gives the spectrometer much more uniform sensitivity and allows [Les] to see further into the IR and UV bands. The spectrometer can even detect the Fraunhofer lines—subtle dips in the sun’s spectrum from absorption by molecules in the atmosphere.

This is incredible for a DIY setup and instrument, and we can’t wait to see what [Les] does next to improve his measurements. If your spectrometry needs are more mass than visual, take a look at this home-built mass spectrometer. Home spectrometers aren’t just for examining light spectra—they can also be used to judge the ripeness of fruit!

Continue reading “Using A Laser To Blast Away A Bayer Array”