HOSI: BUILD A HYPERSPECTRAL CAMERA FOR £350 THAT SEES UV AND NEAR-IR (COMMERCIAL ONES START ABOVE £20,000)

Labs pay over £20,000 for a hyperspectral camera; this one costs £350 and records a full spectrum per pixel down into UV and near-infrared.

by Dr Jolyon Troscianko

FULL CAD BOM FIRMWARE DOCS

ScienceOpen-hardware

Built withArduino3D printing

difficulty
●●●●○
time
a weekend-plus
license
GPL-3.0
repo
repo ACTIVE19 stars
1
Jump to section

COMPAREE VERDICT

HOSI is a mechanical hyperspectral scanner built for animal vision and artificial light research, published as a peer-reviewed paper by Dr Jolyon Troscianko at the University of Exeter. Instead of an expensive hyperspectral sensor, it uses a single Hamamatsu micro-spectrometer (about 220 pounds) behind a lens, mounted on a 3D-printed pan/tilt gimbal driven by two stepper motors and an Arduino Nano. The gimbal sweeps the scene point by point, recording a full radiance curve (320-880 nm, covering UV and near-infrared) for every pixel. Total hardware cost is around 350 pounds; the paper puts commercial hyperspectral cameras above 20,000 pounds for the human-visible range alone, and UV-visible imaging lenses at typically around 10,000 dollars. Output is a .csv of raw and calibrated radiance plus a .png preview, so every scan is quantitative data, not just a picture. The dynamic range exceeds 50,000:1 in a single night scan, and sensitivity goes down to about 0.001 cd/m2 - dark enough to measure a night scene. The catch is speed: scans are mechanical, so a daytime woodland scene took around 20 minutes and a night scene about 40. If you need live video or even a snapshot, this is not the tool. But if you are measuring spectral signatures - butterfly wings, plant reflectance, streetlight types - this is a remarkably capable option at this price. The one thing most likely to go wrong is ordering the wrong optics: the Thorlabs LB4280 lens is fused silica, and an ordinary glass lens will cost you the UV end of the range.

GOOD TO KNOW

  • —Full build package: 3D print files, wiring diagram, Arduino firmware, Python GUI, calibration scripts and a peer-reviewed paper (BMC Biology 23, 5 2025, doi 10.1186/s12915-024-02110-w).
  • —The Hamamatsu C12880MA spectrometer (approximately £220) is the single largest cost and the only specialist part.
  • —All other hardware is off-the-shelf: two 28BYJ-48 stepper motors, an Arduino Nano, a Thorlabs fused-silica lens (LB4280, ~£75), and 3D-printed gimbal parts.
  • —Licence is GPLv3, which allows commercial use but requires derivative works to share source under the same licence.
  • —The author's YouTube channel has a five-part series: introduction, assembly, firmware upload, calibration and an imaging demo.
  • —Scans are slow: a daytime woodland scene (86 × 23 points) took around 20 minutes, a night scene (61 × 16 points) about 40 minutes, because the gimbal sweeps point by point.

Parts to buy

5 items

From our check of the build. Exact quantities and part numbers are in the creator’s BOM.

  • Hamamatsu C12880MA micro-spectrometer~£220Find
  • Thorlabs LB4280 fused-silica lens~£75Find
  • Two 28BYJ-48 stepper motorsFind
  • Arduino NanoFind
  • Standard electronics (wiring diagramFind

BUILDS OF THE WEEK

Five open-source builds worth your weekend, every week.

Checked like this one: what’s really in the repo, what it costs, how hard it is. One email, unsubscribe anytime.

Can I build this?

Print3D-printed gimbal parts for the pan/tilt frame — files are in the repository
BuyHamamatsu C12880MA micro-spectrometer (~£220), Thorlabs LB4280 fused-silica lens (~£75), two 28BYJ-48 stepper motors, Arduino Nano, and standard electronics (wiring diagram in repo)
Tools3D printer, soldering iron, laptop or smartphone for the Python GUI (connects over USB)
SkillsIntermediate electronics (assembly and wiring), basic Arduino (firmware is provided but you will flash it), and willingness to calibrate optics — the author's video walks through it, but this is not plug-and-play
TimeA weekend-plus: assembly is straightforward, but calibration and first test scans will take another day
CostHigh for a hobby build but tiny for the field: about 350 pounds in total according to the paper, of which about 220 is the Hamamatsu spectrometer and about 75 the fused-silica lens
SafetyNone beyond ordinary electronics care — low voltage throughout, no lasers, no mains.

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

Videos

Hyperspectral open source imager (HOSI) imaging demo21:00

21-minute imaging demo by the author: how to use HOSI and what it can do. Assembly, firmware upload and calibration each have their own video below.

More builds like this

All projects

Gallery

opengraph.githubassets.com
doi.org
doi.org
doi.org
img.youtube.com
img.youtube.com
img.youtube.com

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Read the peer-reviewed paper (BMC Biology 23, 5 (2025) — the full methods, calibration procedure and example data are here)
  2. 2.Watch the author's 21-minute imaging demo, then the assembly, firmware and calibration videos (The imaging demo, posted 8 Jan 2025; assembly, firmware upload and calibration each have their own short video linked from the README)
  3. 3.Clone the repository and check the wiring diagram (Everything is there: 3D files, Arduino firmware, Python GUI, calibration scripts)
  4. 4.Order the Hamamatsu C12880MA spectrometer(Approximately £220 from Hamamatsu UK — this is the single largest cost)

Resources

Documentation, files and community threads for this build — we link straight to the original sources and never rehost the creator’s files.

KNOWN ISSUES

  • Use the Thorlabs LB4280 fused-silica lens the author specifies: ordinary optical glass absorbs much of the UV end, so a cheaper glass lens costs you the UV part of the 320-880 nm range - often the part animal-vision work needs most.
  • Scans are mechanical and slow: a small daytime scene takes around 20 minutes, a night scene closer to 40. If you need live imaging or even a snapshot, this is not the tool.
  • Calibration is not optional: the author supplies Python scripts for linearisation and spectral sensitivity, but you need the wavelength coefficients that come with your C12880MA chip, a white standard and a light source with a known spectrum before the data is quantitative.
  • The C12880MA is wired straight to the Arduino Nano: follow the author's wiring diagram with its wire lengths, and power the spectrometer from the Nano's regulated 5 V pin, not VIN.
  • The 28BYJ-48 stepper motors are 2048 steps per revolution, but the spatial resolution (about 0.2 degrees) depends on the optics alignment — expect to iterate on the first build.
  • The Python GUI runs on a laptop or smartphone over USB, but the author's code is written for his workflow (field scans, .csv output) — if you want real-time preview or a different file format, you will be editing it.

Why is this so much cheaper than a commercial hyperspectral camera?

Commercial systems use expensive 2D hyperspectral sensors or tunable filters; HOSI uses a single £220 point spectrometer and sweeps the scene mechanically. The trade-off is speed: a commercial camera captures the whole frame at once, HOSI takes 20-40 minutes per scan.

Can I use a normal lens instead of the Thorlabs fused-silica one?

Not if you want the UV range. The author specifies the fused-silica Thorlabs LB4280 because ordinary optical glass absorbs much of the near-UV, which would cut into the 320-400 nm end of HOSI's range.

What file format does it output?

A .csv of raw and calibrated radiance (one row per pixel, one column per wavelength) plus a .png preview. If you want a different format, you will need to edit the Python GUI.

Can I speed up the scans?

Speed is set mostly by light: in bright scenes HOSI manages about 12 points per second, at dim indoor levels about 3.6, and with 1-second night exposures under one point per second. The easiest speed-up is scanning fewer points (a coarser pan/tilt resolution or a smaller area), which is a scan setting rather than a hardware change.

Community builds

No community builds yet — be the first, we feature the best ones.

Discussion1

FROM THE COMPAREE TEAM

The author's demo scans include butterfly wings that look plain black to humans but show a strong UV peak many animals can see, and a night-time dock scene where individual streetlight types can be told apart from their spectra. What would you point yours at first?

CompareeTEAM1mo agoedited

Practical notes from our verification: the peer-reviewed paper (BMC Biology 23, 5, 2025, doi 10.1186/s12915-024-02110-w) is open access and includes the full methods, calibration procedure and example data. The spectral range is stated as 320-880 nm in the README and as roughly 320-850 nm for the sensor in the paper text — both are the author's own published figures. The cost figures come directly from the paper: around £350 in total, about £220 for the Hamamatsu C12880MA micro spectrometer and about £75 for the Thorlabs lens. The README links five separate videos — intro, assembly, firmware, calibration and a 21-minute imaging demo. There is no separate PCB: the spectrometer and stepper motors are wired directly to an Arduino Nano following the wiring diagram in the repo. Correction (4 October 2026): we re-checked this page line by line against the project's own repository, documentation and videos, and fixed errors in earlier versions.

Dr Jolyon Troscianko

Dr Jolyon Troscianko is a researcher at the University of Exeter working on animal vision and artificial light at night (ALAN). He built HOSI to measure spectral signatures in the field — butterfly wings, plant reflectance, and streetlight types — because commercial hyperspectral cameras cost over £20,000 and a UV-capable imaging lens alone is typically 10,000 dollars. The full build was published as a peer-reviewed paper in BMC Biology in January 2025.

GitHub

Star the project on GitHub

DISCLAIMER

  • Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
  • Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
  • Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.