Near-infrared spectroscopy (900–1700 nm) can measure moisture, protein, fat and sugar in food and soil without chemicals, but the instruments cost thousands of dollars. Most of that cost is the InGaAs detector array. This project designs a NIR spectrometer around a single InGaAs photodiode instead, and compares the ways to read a full spectrum with one pixel. Everything is ray-traced, and the optical models and scripts will be published.
• Goal: a 900–1700 nm spectrometer with ~10 nm resolution or better, fibre input, built from parts a small team can buy.
• Approach: compare single-pixel architectures, review a published reference design, rebuild it from catalogue optics, then improve it with a concave variable-line-spacing (VLS) grating.
• Open: Python ray-tracing models, spot diagrams, BoMs and drawings published with each log.
• Status: design and simulation. Hardware build next.
In Log 1 we compared three ways to build a NIR spectrometer. This log is a design you can actually buy and build: a DLP spectrometer for 900–1700 nm where every lens, the slit and the grating are Edmund Optics catalogue parts.
Why catalogue parts? TI’s DLP NIRscan Nano is a good reference design, but its lens and grating drawings are not public. So today there is no open DLP NIR design that someone can reproduce from a parts list and this is our attempt.
The short result: 7.9–8.6 nm resolution across 900–1700 nm in the ray trace, with a 25 µm slit and a 400 µm fibre. Everything fits in standard lens tubes. Nothing is built yet; the hardware log comes next.
The layout
Light comes in through an SMA fibre and a 25 µm slit. A small achromat makes it parallel, a 300 l/mm grating spreads the colours, and a second achromat focuses the spectrum onto the DMD. The DMD mirrors that are switched on send their wavelengths through a three-lens condenser to one InGaAs photodiode.
Two things in the drawing are not obvious:
The focusing lens is tilted 12° and shifted 1.5 mm. The DMD has to sit at about 10° to the light so the mirrors can send it on to the detector. An achromat focuses all colours on a plane square to the beam, so I tilt the lens to tilt that plane onto the DMD. Without the tilt, the band edges go out of focus (19–35 nm instead of 8 nm).
The order-sorting filter (about 850 nm longpass, absorbing glass) sits at the condenser entrance, not after the collimator. There it does the same job and frees room for the lens tubes.
Parts
Slit 25 µm × 3 mm — Edmund 38-558
Collimator, 6 mm × 9 mm FL NIR-II achromat — 45-783
The top row shows where light from one point in the slit lands on the DMD: 5–10 µm RMS wide in the middle of the band, about 15 µm at 900 and 1700 nm. One DMD column is 5.4 µm (grey lines). Only the width across the columns matters; the height runs along a column and the detector sums it anyway.
The bottom row is the line one wavelength makes with the real 25 µm slit and 400 µm fibre, including the width of one DMD column. Its width at half height, divided by how many µm one nm moves on the DMD, is the resolution: 7.9–8.6 nm across 900–1700 nm, and quite flat. Most of it is the slit image (31–37 µm); the lenses add little.
Each wavelength uses at least 1,000 traced rays, and the figure shows how many got through (83% at 900 nm, 92% at 1000 nm, nearly all above that). I learned this the hard way on another design: a spot built from a dozen surviving rays can look much better than it is.
The slit is 3 mm tall but the 400 µm fibre lights only its middle, so we also checked points 0.1 and 0.2 mm up the fibre. The spots barely change: about 16 µm RMS at 900 nm, 5–7 µm at 1100 nm, 9 µm at 1300 nm, 10 µm at 1500 nm and 15–17 µm at 1700 nm. Off-centre points only tilt the spot a little; they do not widen it across the columns.
The condenser puts 96% of the light on the 1 mm detector on average, 76% at 1700 nm. Moving the detector 0.05 mm towards the long-wavelength side evens this out (84% worst case).
Benchmark: what TI’s published numbers imply
TI’s design note DLPA062 gives the main numbers for the NIRscan Nano: 25 µm slit, 300 l/mm grating, 1.52× slit-to-DMD magnification, an image plane tilted about 10°, and 10 nm resolution. The lens prescriptions are not public, so we can’t model TI’s actual lenses.
What I can do is build a lens model that meets those published numbers with simple spherical singlets and see what resolution it gives. Scored...
An NIR spectrometer needs a detector that sees 900–1700 nm, and silicon goes blind past about 1000 nm. The standard answer is indium gallium arsenide (InGaAs), and that is where the cost goes.
A single 1 mm InGaAs photodiode is a catalogue part: a Hamamatsu G12180-010A is about $95. An InGaAs line array (256 or 512 pixels) is quote-only and costs many times that, before you add its cooling and readout electronics. That gap shows up in instrument prices. A 2016 element14 RoadTest compared TI's DLP NIRscan Nano, at about $1,000, with an Ocean Optics NIRQuest array spectrometer at about $20,000.
So the first design question for a low-cost NIR instrument is: how do you get a whole spectrum out of one pixel?
Three ways to read a spectrum
All three start the same way: light enters through a slit, a collimating lens makes it parallel, and a diffraction grating fans the wavelengths out. They differ in how the fan is read.
1. Array spectrometer. A lens focuses the fan onto a line of detector pixels, one wavelength per pixel. Every wavelength is measured at once, with no moving parts. It is the fastest and simplest option, but the InGaAs array dominates the cost.
2. Scanning monochromator. The grating (or an exit slit) rotates, so only one narrow band at a time falls on a single photodiode. A motor steps through the spectrum. The detector is cheap, but the instrument has a precision mechanism, and a scan takes as long as the motor needs to step through every point. Wavelength accuracy depends on how repeatably that mechanism returns to each angle.
3. DLP (digital micromirror) spectrometer. The grating is fixed. The fan lands on a DMD, an array of tiny mirrors that each tilt ±17°. Mirror columns turned "on" send their wavelengths through a condenser lens to one photodiode; "off" columns send light away. Choosing columns electronically does what the motor does in a monochromator, with no macroscopic moving parts.
The DLP option keeps the cheap single detector and drops the motor. It also adds something neither of the others has, in terms of light throughput.
What the DMD adds: more light per measurement
A monochromator, or a DMD showing one column group at a time, sends one narrow band to the detector per measurement. The rest of the spectrum is thrown away.
A DMD can show any pattern, so it can turn on about half the columns at once in a Hadamard pattern. Each measurement then sums many wavelengths, and a known set of N patterns is inverted back into N spectral points. When detector noise dominates, as it often does with an uncooled InGaAs photodiode, this multiplexing improves signal-to-noise by up to about √N/2 in theory. When noise from the light itself dominates, the gain disappears.
In practice the gain is smaller than the theory. TI quotes about 50% better SNR for Hadamard over column scans on the NIRscan Nano, as reported in the element14 RoadTest.
Two other things come free with a programmable mirror array:
Pick your bands. Patterns can skip wavelengths an application doesn't need, or spend more time on the ones it does.
Correct the optics in software. Spectral lines from a tall slit come out slightly curved on the DMD; the column patterns can be curved to match.