A low-cost, portable, and open-source spectrophotometer for absorbance and transmittance measurements from 410 nm to 940 nm, based on the SparkFun AS7265x sensor and ESP32.
Your project aligns with the growing trend of democratizing spectroscopy for environmental monitoring, education, and citizen science. As highlighted in recent literature:
- Portable spectrophotometers enable real-time water quality analysis (e.g., chlorophyll, nitrates, microplastics).
- The Beer-Lambert law forms the basis for quantitative analysis:
( A = \log_{10}(I_0/I) = \epsilon \cdot c \cdot l ) - Open-source designs reduce costs from thousands to under $100, while maintaining scientific validity.
This device is ideal for:
- Quantifying bioindicators (e.g., algae via chlorophyll absorbance)
- Detecting chemical pollutants
- Educational labs in chemistry and environmental science
- ✅ Dual-mode: Absorbance & Transmittance (%)
- ✅ 18-channel spectral range: 410–940 nm (UV-Vis-NIR)
- ✅ Hardware-synchronized LED control (external light source)
- ✅ Stable measurements: 5s LED warm-up + 10-reading average
- ✅ User-friendly GUI: Port selection, sample naming, real-time plotting
- ✅ Export-ready: CSV (with I₀, I, A, %T) and publication-quality PNG
- ✅ Cross-platform: Windows, Linux, macOS executables via GitHub Actions
| Component | Description | Photo | Where to Buy |
|---|---|---|---|
| ESP32 Dev Board | Microcontroller with Wi-Fi/Bluetooth, used for sensor control and serial communication. | ![]() |
Amazon |
| SparkFun Triad - AS7265x | 18-channel spectral sensor (410–940 nm), with factory calibration in µW/cm². | ![]() |
SparkFun |
| External White LED | High-intensity light source for transmission measurements (connected to GPIO 32). | ![]() |
Amazon |
| Cuvette Holder | 3D-printed or acrylic holder for standard 10 mm pathlength cuvettes. | ![]() |
Amazon |
- Go to Releases
- Download the appropriate version:
spectrophotometer.exe→ Windowsspectrophotometer→ Linuxspectrophotometer.app→ macOS
- Install USB drivers if needed (CH340/CP210x)
- Run the executable and follow the GUI instructions
git clone https://github.com/your-username/your-repo.git
cd your-repo
pip install -r requirements.txt
python spectrophotometer.py



