This senior design project focuses on designing, building, and validating a compact and affordable visible-near infrared VIS-NIR spectrometer capable of measuring spectral content of light across approximately 400 to 1000 nm.
The system is built around the TCD1304DG 3648 px linear CCD sensor for spectral detection, driven by an STM32 microcontroller for precise timing, signal acquisition, and data handling.
Conventional spectrometers are expensive and bulky. Our design emphasizes low cost, portability, modularity, and ease of use without sacrificing spectral performance, making it suitable for teaching labs and biomedical optics research alike.
This spectrometer directly supports the photoacoustic imaging research conducted by Dr. Avishek Das at the Biomedical Imaging Laboratory. Photoacoustic imaging relies on delivering specific wavelengths of light into tissue.
By firing high-power LEDs and laser diodes at biological samples and reading the resulting fluorescence that emanates, researchers are able to map tissue structures.
Our device ensures these excitation sources emit exactly the expected spectral profile. Validating the emission wavelength and intensity is a mandatory step for accurate spectral unmixing. This exact measurement allows the research team to differentiate tissue types reliably and produce quantitative imaging data.
The spectrometer integrates six key subsystems to deliver accurate, real-time spectral measurements in a portable form factor.
Entrance slit, collimating optics, diffraction grating, and focusing optics arranged to disperse incident light onto the linear CCD sensor.
Custom Driver board which performs DC offset adjustment and low-pass filtering to condition the signal for the MCU, maximizing signal-to-noise ratio before ADC conversion.
STM32 firmware manages precise CCD timing using 3 hardware timers and DMA, ADC acquisition, data buffering, and host communication.
Python based GUI for real-time spectral intensity visualization, data storage, and wavelength calibration workflows.
Compact PCB using surface-mount components with careful grounding and noise mitigation. 3D-printed mechanical enclosure for portability.
Calibration using narrow-line lasers or calibrated LEDs to map CCD pixels to wavelengths, validated against spectral accuracy targets.
All coding files, including the STM32 embedded firmware and the PC based graphical user interface code, are maintained on our personal github server.
The project spans two semesters progressing from design and prototyping to full integration and validation.
The team designed and assembled a custom printed circuit board to serve as the analog front end. This board manages the physical connection to the TCD1304DG linear CCD sensor. It performs DC offset adjustment to align the sensor output with the microcontroller voltage range. The circuit includes low pass filtering to remove high frequency noise before the signal reaches the analog to digital converter. We completed the schematic design and fabricated the board using surface mount components.
Extracting readable data from the CCD requires precise timing control. The firmware uses an STM32 microcontroller configured with three hardware timers to generate the exact clock pulses demanded by the sensor. As the sensor outputs pixel voltage levels the microcontroller samples the data using a 12 bit analog to digital converter. We implemented direct memory access to transfer this data continuously without burdening the primary processor. This architecture allows the system to build complete spectral frames in real time.
We developed a custom graphical user interface in Python to receive and display the spectral data. The software connects to the microcontroller over a USB serial connection to read the incoming frame buffers. It renders the raw pixel data into a live intensity graph for immediate visual feedback. The application includes features to record the spectral data to a file for later analysis. We also built the foundational code for mapping pixel indices to specific optical wavelengths.
The team prioritized the development of a custom optical calibration device to ensure precise wavelength mapping. We engineered a 3D printed housing designed to securely hold laser diodes and alligned glass mirrors. Initial physical testing revealed clearance issues with the lenses. We quickly redesigned the fixture to incorporate expanded lens clearance and adjustable tilt mechanisms for the laser diodes. This redesign improves the alignment of the test LEDs and isolates the light to capture highly accurate baseline readings.
Validating the optical path before final assembly requires highly accurate modeling. We evaluated multiple optical modeling programs and selected 3D Optix due to its streamlined interface and simple integration with standard optical components. We imported our specific diffraction grating parameters into the software to begin simulating the precise behavior of the light path. Current simulation efforts focus heavily on analyzing second order diffraction. This virtual environment allows us to optimize component placement and plan the final physical enclosure with complete confidence.
We successfully transitioned to direct optical bench testing and achieved our first live data acquisition. By connecting the CCD sensor and the microcontroller to an existing optical module, we captured live frame data and distinct light intensity peaks through our custom graphical user interface. We procured low OH multimode fiber optic cables and SMA mating sleeves because standard silica fibers absorb excessive light in the 800 to 1000 nanometer range. Our embedded systems architecture successfully reached the target 125 Hz frame rate. We are now isolating further embedded software improvements to triggering, integration time control, and background subtraction.
Access progress reports and formal design documentation.
A team of Electrical Engineering seniors from Iowa State University.
Electrical Engineering
Focusing on the optical subsystem. He leads the component selection and alignment to disperse light accurately onto the sensor.
Electrical Engineering
Has an emphasis in RF, antenna, and VLSI design. His focus in this project has been in the design and verification of the hardware and data transmission.
Electrical Engineering
Specializing in custom circuit design and software. He built the Python interface and handles the integration testing.
Electrical Engineering
Driving the system testing and validation. He verifies all operational parameters to guarantee the device meets the target specifications.