
Hardware:Portable Spectrometer
The project has been open-sourced in iGEM-GitLab-YAU-China : Handheld spectrometer · main · 2025 Competition / Software Tools / YAU-China · GitLab
The author's repository will be made open-sourced later: twy2020/Handheld-spectrometer: IGEM Hardware
1.Hardware Overview
1.1 Device Introduction
This portable spectrometer is a high-precision optical detection device specifically designed for the synthetic biology experiments of this project, with optimization for 96-well plate detection scenarios. The device can be directly mounted over the wells of a microplate to monitor, in real time, the spectral characteristic changes during the growth of Pseudomonas aeruginosa in culture media, thereby providing quantitative data support for the performance evaluation of biosensors.
1.2 Core Features
This portable spectrometer integrates an 8-channel high-precision spectral sensor with a detection range covering the visible light spectrum from 415 nm to 680 nm, enabling accurate capture of absorbance and transmittance changes of solutions at specific wavelengths. The device adopts a compact design optimized for 96-well plate observation, allowing it to be directly and tightly mounted over the wells to ensure both accuracy and convenience in detection. In terms of operation, it supports dual-mode functionality for both local display and network data transmission. Users can either view data in real time via the OLED screen or transmit spectral data to a remote host computer server through the real-time data streaming function, thereby enabling remote monitoring of the experimental process and subsequent in-depth data analysis.

2. Hardware Composition
2.1 Core Component List
Component | Model specification | Description |
---|---|---|
Spectral Sensor | AS7341 | 11-channel visible light spectral sensor: 8 optical channels+1 clear channel+1 near-infrared channel |
Main Controller | ESP32C3 Super Mini | Dual-core processor with integrated WiFi functionality |
Display | SSD1306 128×64 OLED | Real-time display of spectral data, system status, and menu navigation |
Illumination System | UV LED 365nm + AS7341 built-in LED | Provides stable illumination sources for different detection modes |
UV LED Drive Board | CN5711 | Drives and regulates the UV LED |
Enclosure | Custom 3D-printed | Precisely aligned with 96-well plate wells |
2.2 Key Component Introduction
1)AS7341
The AS7341, developed by AMS-OSRAM, is a high-performance 11-channel multispectral sensor that integrates a precision interference filter array with advanced digital processing capabilities, enabling accurate spectral analysis from the visible to the near-infrared region. It comprises eight independent visible-light measurement channels covering the key spectral bands of 405–425 nm, 435–455 nm, 470–490 nm, 505–525 nm, 545–565 nm, 580–600 nm, 620–640 nm, and 670–690 nm. Complementing these are three additional channels designed for near-infrared detection, broadband ambient light measurement, and flicker detection, thereby establishing a comprehensive spectral sensing architecture.
A defining strength of the AS7341 lies in its high-precision spectral resolution. Each channel incorporates professional-grade interference filters to ensure spectral purity, while a 16-bit analog-to-digital converter (ADC) and programmable gain control enable precise capture of spectral features across a wide dynamic range, from weak to intense illumination conditions. The sensor further integrates intelligent algorithms for temperature compensation, automatic range adjustment, and ambient light suppression, ensuring robust and stable performance under complex lighting environments.
Encased in a compact OLGA-20 package and featuring a streamlined I²C interface, the AS7341 serves as an ideal hardware platform for diverse spectral analysis applications, including color recognition, material analysis, environmental monitoring, and biomedical detection. When paired with dedicated host software, it fully realizes its capabilities for multi-channel synchronous acquisition, real-time data processing, and long-term stable operation, delivering a complete spectral solution encompassing data acquisition, visual analytics, and result output. Consequently, the AS7341 has become an indispensable spectral sensing core in scientific research, industrial testing, and intelligent device applications.
2)ESP32C3 Super Mini
The ESP32C3 Super Mini is an ultra-compact IoT development board based on the Espressif ESP32-C3 chip, integrating a high-performance RISC-V single-core processor with comprehensive wireless communication capabilities. Featuring an extremely compact PCB design—approximately half the size of a conventional ESP8266 module—it retains full dual-mode communication functionality, including Wi-Fi 802.11b/g/n and Bluetooth 5.0 Low Energy (LE), thereby delivering robust network connectivity within a limited physical footprint.
At its core, the board is equipped with a 32-bit RISC-V processor operating at a clock frequency of up to 160 MHz, complemented by 400 KB of SRAM and 4 MB of Flash memory. This configuration provides ample computational resources to support complex IoT applications. The ESP32C3 Super Mini also excels in power management, offering multiple low-power modes with current consumption as low as 10 μA in deep sleep mode, making it particularly well-suited for long-term battery-powered operations.
In terms of peripherals, the board offers a rich set of interfaces, including UART, I2C, SPI, PWM, and multiple GPIO pins, enabling flexible integration with a wide range of sensors and actuators. On the software side, it is fully compatible with mainstream development frameworks such as Arduino IDE, ESP-IDF, and MicroPython, providing developers with a convenient and streamlined programming experience.
Combining exceptional cost-effectiveness, a compact form factor, and a comprehensive feature set, the ESP32C3 Super Mini has become an ideal choice for applications in smart homes, industrial monitoring, wearable devices, and remote data acquisition, offering powerful hardware support for space-constrained IoT projects.
3)UV LED
The UV LED wavelength selected for this device is 365–370 nm, while the ultraviolet wavelength required for the project's detection is 365 nm. The use of a UV LED within this wavelength range perfectly aligns with the project's requirements for detecting the target fluorescent substrate.
3.How to DIY?
3.1 Hardware Circuit Construction

3.2 Process Photos






3.3 Software Development Preparation
Obtain our project files firstly, the project has been open-sourced in iGEM-GitLab-YAU-China : Handheld spectrometer · main · 2025 Competition / Software Tools / YAU-China · GitLab
To ensure the software development environment is properly prepared, it is first necessary to install the required software components, including the CH341 serial driver and the Arduino IDE. When installing the Arduino IDE, please visit the official website (https://www.arduino.cc/en/software) to download the latest version.) After completing the installation, launch the application.
Subsequently, it is necessary to add support for the ESP32 development board. The specific procedure is as follows: navigate to the "Preferences" option under the "File" menu, and in the "Additional Boards Manager URLs" field, add the following URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json Search esp32 in library management and download.



Next, navigate to the "Board" option under the "Tools" menu, select "ESP32 Arduino," and locate "ESP32C3 Dev Module." Simultaneously, in the "Port" section, choose the serial port corresponding to the ESP32C3 SuperMini. It is particularly important to access the "USB CDC On Boot" setting under "Tools" and set it to "Enable"; otherwise, serial communication via USB will not be possible.


During the program flashing phase, first open the project's corresponding Spectrometer_v2.ino file in the Arduino IDE, and connect the ESP32C3 Super Mini development board to the computer using a USB cable. In the IDE, confirm that the correct port and board type (ESP32C3 Dev Module) have been selected, then click the "Upload" button and wait for the program flashing process to complete.
3.4 Installing the Host Computer Software
The installation and operation of the host computer software mainly consist of three steps: configuring the Python environment, installing the required dependency packages, and launching the software.
First, it is necessary to configure the Python environment. You can either download and install Python 3.12 directly from the official Python website or install Anaconda to manage the Python environment. Regardless of the method chosen, please ensure that during the installation process you check the option to add Python and Conda to the system environment variables, so that they can be directly invoked in the terminal or command prompt later.
After the environment configuration is complete, the next step is to install the dependency packages required for the project to run. If you are using Anaconda, it is recommended to first create a separate Conda environment
(for example, using the command: conda create -n SpDevice-PC python=3.12),
and after creation, activate the environment
(conda activate SpDevice-PC),
then use pip to install the required packages such as PyQt5 and pyqtgraph. If you are using the system Python environment, you can directly run the pip installation command in the terminal:
pip install PyQt5 pyqtgraph pyqt5-tools pandas.
Once all the above preparations are completed, you can launch the host computer software. Please switch to the directory where the program is located in the already configured Conda environment or system Python environment, and run the main program using the command: python Spectrometer_v2_PC.py.
The running interface of the host computer is shown in the figure.

4. Usage of equipment
4.1 Local Mode
The local mode's basic functionality is to automatically and continuously measure spectral data and display it in real time on the OLED screen. The device's basic functions can be adjusted through the button and menu system, such as controlling the on/off state and brightness of the UV LED and AS7341 LED, enabling or disabling the buzzer, configuring Wi-Fi parameters, and connecting to Wi-Fi for communication with the host computer.
The figure below shows the device's operational display screen.

4.2 Data Stream Mode
It is strongly recommended to enter the Data Stream Mode for scientific research–level operations. To enter the Data Stream Mode, please ensure the following: 1. The device has connected to the Wi‑Fi hotspot of the computer running the host software. 2. The IP address has been correctly set in the host software, and the target IP has been properly entered in the device's Wi-Fi settings. The device will automatically connect to the host software's status communication server and notify the host that the device is ready. 3. Click Enable Data Stream Mode in the host software. The device will display DATA STREAM MODE, at which point it will disable local mode functions and button interactions, and begin transmitting spectral data to the host software's UDP server.


In Data Stream Mode, the host software can take full control of and modify all device functions through the TCP command server (the available command interface is detailed in the project documentation).
The host software can control the device to perform scheduled measurements and fixed-number measurements, set light source parameters during measurement, plot spectral graphs in real time, save measurement data, and provide a more user-friendly and professional operating interface, offering a more convenient way to acquire data.
5. Hardware Application in This Project
We designed a set of spectral detection experiments to monitor the spectral data of eight channels during the growth of Pseudomonas aeruginosa in a 96-well microplate. The total detection duration was 9 hours, and spectral data for 6 hours were presented. After algorithmic filtering, a time-series chromatogram of the Pseudomonas aeruginosa culture medium substrate was plotted for analysis. Culture conditions: 37 °C.
The following is a photo taken during the measurement.


The following are the substrate spectral curves obtained under the conditions of LED-only illumination, UV LED-only illumination, and simultaneous LED and UV LED illumination:

6. Analysis and Hypothesis
Based on the experimental result graphs above, we observed the substrate spectral time series measured under three different illumination conditions. The intensities in the yellow–orange–red bands corresponding to F6 (580–600 nm), F7 (620–640 nm), and F8 (670–690 nm) exhibited a noticeable decrease between 17:55 and 18:34. This is speculated to be associated with the exponential growth phase of Pseudomonas aeruginosa, during which substrate consumption increases rapidly while pyocyanin signals are produced (laboratory measurements indicate that pyocyanin substrates are also highly sensitive in the F6–F8 channels). The homemade instrument still requires multiple control experiments for verification and calibration.
7. Limitations and Improvements
It was observed that the ultraviolet fluorescence effect cannot be captured by the sensor with sufficient sensitivity. The data contains many fixed errors that deviate significantly from the normal values; upon inspection, this is due to the device turning off the light source too early during time-series reading, resulting in a fixed error value in one set of readings. In addition, the amount of experimental data we collected is still insufficient; further extensive validation experiments are required to acquire a larger dataset, thereby establishing a relationship between spectral data and Pseudomonas aeruginosa concentration through mathematical methods such as machine learning or function fitting. The filtering algorithm also needs further improvement to present cleaner and more accurate curve profiles.