---
title: Build a Low‑Cost, Open‑Source Spectrophotometer for Your Classroom
siteUrl: https://logzly.com/labcraftdiy
author: labcraftdiy (LabCraft DIY)
date: 2026-06-18T20:12:08.663044
tags: [labcraftdiy, opensource, scienceeducation]
url: https://logzly.com/labcraftdiy/build-a-lowcost-opensource-spectrophotometer-for-your-classroom
---


**Disclosure: We are reader supported, and earn affiliate commissions when you buy through us.**


A spectrophotometer may sound like a piece of equipment you only see in a university lab, but the truth is you can make a reliable one for under $100. In a world where schools are tightening budgets, having a simple tool to explore absorbance, enzyme kinetics, or [water quality](https://www.amazon.com/s?k=water+quality&tag=organizationtip101-20) can keep curiosity alive without breaking the bank.  

## Why a DIY Spectrophotometer Matters  

Most textbooks show a sleek, black box with a digital read‑out, but the core idea is simple: shine light through a sample and measure how much is blocked. If you can replicate that with off‑the‑shelf parts, you give teachers and students a hands‑on way to see chemistry in action. Projects like a [low‑cost PCR thermocycler](/labcraftdiy/build-a-lowcost-opensource-pcr-thermocycler-for-your-classroom-lab) show how other disciplines can benefit from similar DIY approaches. I first built a prototype for a high‑school summer camp, and watching the kids watch a green solution turn brown as they added a few drops of iodine was pure magic. That moment reminded me why I left the corporate lab – to bring real science to anyone who wants to learn.  

## What You’ll Need  

Below is a list of parts that are easy to find online or at a local electronics store. All prices are approximate and based on 2024 [market rates](https://www.amazon.com/s?k=market+rates&tag=organizationtip101-20).  

### Optical Components  

- **LED [light source](https://www.amazon.com/s?k=light+source&tag=organizationtip101-20) (470 nm blue or 630 nm red)** – $5  
- **Photodiode or cheap light‑dependent resistor (LDR)** – $2  
- **Narrow‑band filter (optional, $3)** – helps isolate a single wavelength  

If you prefer a more portable setup, a [smartphone‑based spectrophotometer](/labcraftdiy/diy-smartphone-spectrophotometer-open-source-design-for-classroom-use) can be assembled using the same LED and detector components.  

### Mechanical Parts  

- **3‑D‑printed housing** – design files are on the LabCraft DIY GitHub; printing cost about $10 for PLA  
- **Cuvette holder (can be a 3‑D printed clip or a simple [rubber band](https://www.amazon.com/s?k=Rubber+Band&tag=organizationtip101-20))** – $1  

### Electronics  

- **Arduino Nano or compatible board** – $8  
- **Breadboard and jumper wires** – $4  
- **10 kΩ resistor** – $0.10  

### Power  

- **USB [power bank](https://www.amazon.com/s?k=power+bank&tag=organizationtip101-20) or 5 V wall adapter** – you probably already have one  

### Software  

- **Arduino IDE (free)** – for uploading the code  
- **[Simple spreadsheet](https://www.amazon.com/s?k=simple+spreadsheet&tag=organizationtip101-20) or Python script** – to plot absorbance curves  

Total cost: roughly $45, leaving room for extra LEDs or a second detector if you want to compare wavelengths.  

## Step‑by‑Step Build Guide  

### 1. Print the Housing  

Download the STL files from the LabCraft DIY site. The design includes a slot for the LED on one side, the detector directly opposite, and a groove for a standard 1 cm cuvette. Print at 0.2 mm layer height; the parts are sturdy enough for classroom use. If you don’t have a 3‑D printer, a laser‑cut [acrylic box](https://www.amazon.com/s?k=acrylic+box&tag=organizationtip101-20) works just as well – just keep the internal distance between LED and detector at 1 cm.  

### 2. Assemble the Optics  

- **Mount the LED** in its socket at the front of the housing. Solder a short piece of wire to the positive lead; the negative lead goes to ground later.  
- **Place the photodiode** directly opposite the LED, facing inward. If you use an LDR, orient it so its sensing surface points toward the LED.  
- **Add the filter** (if you have one) in front of the LED to narrow the light band. This step isn’t required for basic experiments, but it improves accuracy when you compare different solutions.  

### 3. Wire the Electronics  

1. Connect the LED’s positive lead to the Arduino’s 5 V pin through a 220 Ω resistor (this limits current and protects the LED).  
2. Connect the LED’s negative lead to Arduino ground.  
3. Hook the photodiode’s anode to 5 V and its cathode to an analog input (A0) through a 10 kΩ resistor. The other side of the resistor goes to ground, forming a voltage divider that the Arduino can read.  
4. Power the Arduino with the USB power bank or wall adapter.  

### 4. Upload the Code  

Open the Arduino IDE and paste the following sketch (available on LabCraft DIY’s repository). It reads the analog voltage, converts it to a raw intensity value, and prints it over the serial monitor.  

```cpp
const int ledPin = 9;          // PWM pin for LED brightness control
const int sensorPin = A0;      // analog input from photodiode
int baseline;                  // reading with no sample

void setup() {
  pinMode(ledPin, OUTPUT);
  analogReference(DEFAULT);
  Serial.begin(9600);
  // Turn LED on at low brightness to avoid saturation
  analogWrite(ledPin, 30);
  delay(500);
  baseline = analogRead(sensorPin);
  Serial.println("Ready");
}

void loop() {
  int sample = analogRead(sensorPin);
  // Simple absorbance calculation: A = -log10(I/I0)
  float absorbance = -log10((float)sample / baseline);
  Serial.print("Absorbance: ");
  Serial.println(absorbance, 3);
  delay(1000);
}
```

Upload, open the serial monitor, and you should see a steady “Absorbance: 0.000” line with no cuvette in place.  

### 5. Calibrate the Device  

Place a clean cuvette filled with [distilled water](https://www.amazon.com/s?k=distilled+water&tag=organizationtip101-20) in the holder. Record the reading – this becomes your “zero” or blank. Then replace the water with a known concentration of a standard solution (e.g., 0.1 M potassium permanganate). Plot the absorbance versus concentration; you’ll get a straight line if everything is working.  

### 6. Use in the Classroom  

Now the spectrophotometer is ready for experiments. Here are a few quick ideas:  

- **Enzyme kinetics** – measure how fast an enzyme breaks down a colored substrate.  
- **Water testing** – compare the absorbance of [tap water](https://www.amazon.com/s?k=tap+water&tag=organizationtip101-20) versus [filtered water](https://www.amazon.com/s?k=filtered+water&tag=organizationtip101-20) after adding a safe dye.  
- **Plant pigments** – extract chlorophyll with ethanol and watch the absorbance shift as you add more solvent.  

Encourage students to record data in a spreadsheet, draw a calibration curve, and calculate unknown concentrations. The whole process reinforces the scientific method, data handling, and basic electronics.  

## Tips for Longevity  

- **Keep the LED and detector clean** – dust will scatter light and give false readings. A quick wipe with a lint‑free cloth does the trick.  
- **Avoid over‑driving the LED** – high brightness can heat the LED and change its wavelength slightly. The PWM setting in the sketch (value 30) works well for most dyes.  
- **Store the device in a dry place** – moisture can corrode the solder joints.  

## When to Upgrade  

If you find the need for higher precision, consider swapping the LDR for a true photodiode with a transimpedance amplifier. The code will need a small tweak, but the hardware change can improve sensitivity by an order of magnitude. For labs that need the accuracy of a true photodiode, see how the [high‑precision PCR thermocycler build](/labcraftdiy/how-to-build-a-low-cost-pcr-thermocycler-for-under-150) handles sensor upgrades.  

## Closing Thoughts  

Building a spectrophotometer from scratch is a perfect blend of physics, electronics, and chemistry – exactly the kind of interdisciplinary project I love to share on LabCraft DIY. It proves that sophisticated science tools don’t have to be expensive, and it gives teachers a tangible way to bring real data into the classroom. The next time you hear a student say “I wish we had a spectrophotometer,” you’ll be ready with a printable file, a few cheap parts, and a smile.  
