2026-10-12

A 16-bit differential front end turns a cheap linear CCD into a 0.2 percent linear spectrometer

Open HardwareCCDSpectrometerAnalog DesignTeensyScientific Instruments
A 16-bit differential front end turns a cheap linear CCD into a 0.2 percent linear spectrometer

A 3648-pixel linear CCD costs a few dollars and shows up in a large share of hobbyist spectrometer builds. Almost all of those builds stop at producing a spectrum that looks plausible. What almost none of them answer is whether the numbers in that spectrum can be trusted, because the TCD1304 makes that question unusually hard: its output is negative, sits on a 2.5 volt DC pedestal, and carries the three problems that have followed linear CCDs for decades, namely non-linearity, baseline drift and image lag.

A repository published by Mitch Nelson rebuilds the front end around that question rather than around the spectrum. The result is a 16-bit differential readout that reaches under 0.2 percent integral non-linearity and 60 electrons of read noise, with a board-level electrical noise floor of 14 microvolts measured with the sensor unplugged, which is below one LSB of the external converter it feeds. Schematics, Gerbers, STEP files, a BOM, firmware and a Python host application are all in the repository, which was created in December 2024 and last pushed in October 2026 with 69 stars and 6 forks.

Three boards for three budgets

The flagship version splits into two boards. The sensor board carries the analog chain only; the controller board carries the timing and the USB link. The separation is deliberate: it keeps the analog ground and the gate-drive current loops away from the CCD, and it gives the sensor mechanical isolation and optical alignment freedom.

The signal path on the sensor board is short and conventional in topology, but every stage is chosen for noise rather than bandwidth. A two-stage ADI ADA4807-2 dual op-amp inverts and level-shifts the negative-going CCD signal, and a TI THS4521 fully differential amplifier converts it to differential drive. Conversion is done by a Microchip MCP33131D 16-bit 1 MSPS differential SAR converter, referenced from an ADI ADR4540 at 4.096 volts with 2.7 microvolts peak-to-peak of low-frequency noise. Power comes from two LT1761 low-dropout regulators producing a 4 volt analog rail and a 4 volt gate-drive rail, plus a TPS72218 for the converter's 1.8 volt supply, and three Nexperia 74LVC1T45 level translators isolate the controller logic domain from the gate-drive domain on the clock, integration-clear and shift lines.

The all-in-one version puts sensor, analog front end and controller on a single board and drops the external converter, using the Teensy 4.0's internal 12-bit input instead. Cost falls from about 200 dollars to 104 and assembly gets easier, at the price of integral non-linearity degrading from 0.2 percent to a measured 0.62 percent. That trade is stated plainly rather than hidden, which is worth noting in a field where the headline number usually comes from the best-configured variant.

The analog-only version keeps the single-ended path and the gate driver with no converter and no controller, accepting 4 to 5.5 volts of supply and 3.3 to 5 volt logic so it can hang off other Arduino-ecosystem boards. All its parts are SOT-23 for hand soldering, and the author estimates about three hours per board.

The numbers that decide whether the chain works

Two relationships set the design. The first is slew rate. The CCD's gate capacitance is large, and the readout clock runs in the megahertz range, so the driver has to move charge quickly. The ADA4807 offers 225 volts per microsecond against an estimated requirement of 7.5, a margin of about 30 to 1. That margin is what allows full-scale single-pixel settling rather than smearing charge between adjacent pixels.

The second is the noise floor against converter resolution. With a 4.096 volt reference used in bipolar mode, the converter's full span is 8.192 volts and one LSB is 125 microvolts. A board noise floor of 14 microvolts leaves the converter, not the analog chain, as the limiting element, which is the only condition under which 16 bits is a meaningful number rather than a marketing one.

Timing is handled in hardware rather than in software. The i.MX RT1062's FlexPWM module generates the CCD clocks, so the charge-transfer physics, the image-lag suppression and the converter's sampling instant all sit on one hardware state machine. Jitter stays under 10 nanoseconds. Doing this in a software loop, which is what most Teensy-based builds do, makes the sampling instant a function of interrupt latency and puts a moving target under every measurement.

Parameter Value
Sensor Toshiba TCD1304DG, 3648 pixels, 8 by 200 micrometres
Converter MCP33131D, 16 bit, 1 MSPS, differential SAR
Reference ADR4540, 4.096 V, 2.7 microvolts p-p low-frequency noise
Board noise, sensor removed 14 microvolts
Integral non-linearity Under 0.2 percent, 0.62 percent on the 12-bit variant

The optics are deliberately plain

The test instrument is a transmission-grating spectrometer built from a Thorlabs GT50-12 grating at 1200 lines per millimetre, a 200 micrometre entrance slit, two plano-convex lenses with 50 to 70 mm back focal length, and an SMA905 fibre input. Centre wavelength is 500 nm with roughly 365 nm of range, and resolution is about 0.5 nm with a 50 micrometre slit.

The housing is 3D printed with a black plastic top over an aluminium base, and light sealing is black card and tape. There is no attempt at a finished enclosure. The author's position is that the value is in the optical layout and the linearity work, and the reports of the comparison against a commercial spectrometer are the evidence for it.

Why this belongs in an IoT catalogue

Most of the open hardware in a device catalogue is a radio, a sensor breakout or a development board, and the interesting question is what protocol it speaks. This project sits at the other end: it is the case where the analogue front end is the product, and where the engineering effort went into making a cheap sensor behave like an instrument.

For an integrator, three things transfer directly. The noise budget approach, where the converter's LSB sets the target and the analog chain is designed to stay under it, applies to any precision measurement front end. The level-translation pattern, isolating a high-voltage gate domain from a low-voltage logic domain with bidirectional translators, is reusable wherever a power stage has to be driven from a 3.3 volt controller. And the use of a hardware PWM peripheral as the timing master, rather than a software scheduler, is the difference between a repeatable measurement and a repeatable-looking one.

The repository is published under a licence GitHub reports as NOASSERTION, which means the terms should be read from the files rather than assumed, particularly for anyone considering commercial use.

Source: Feiduo Academy (Feiduo Xuetang), open-hardware daily series Day 53, WeChat, 12 October 2026. Repository metadata read from the GitHub API on 5 November 2026.

← All news