← All Projects
University · Embedded Systems · Product Design

Automated Fluid Analysis Machine

A portable automated sample-analysis system combining mechanical handling, visible spectroscopy, embedded control, a custom electronics design, local display and Bluetooth communication.

Spectroscopy STM32 Embedded C PCB Design CAD
Finished automated fluid analysis machine shown from front and rear angles
Completed prototype with removable sample carousel and enclosed electronics.

Automating a multi-sample testing workflow

The project addressed the need for an automated system capable of testing and analysing fluid samples efficiently. The machine was designed to load, position and test up to ten samples, record the measurements, display the results and transmit the data to an external device.

The work covered the complete mechatronic system rather than a single subsystem: mechanical design, electrical architecture, firmware, user interface and prototype construction.

10sample positions
6visible spectral channels
3main digital interfaces
32 RPMcarousel motor speed

Mechanical development

The enclosure evolved from early hand sketches into a CAD assembly and then a physical prototype. The design separated the sample-handling mechanism from the electronics while providing access through the top carousel hatch and a lower electronics compartment.

SLS-printed nylon was used for the structural components and laser-cut wood panels formed the enclosure sides. The panels also served an important functional purpose by blocking external light during spectroscopy measurements.

CAD render of the automated fluid analysis machine showing the enclosure and carousel
CAD development showing the enclosure, carousel and internal mounting arrangement.
Motorised Carousel

A geared DC motor drives the sample carousel. A 6:1 gear reduction provides controlled movement, while an IR sensor detects positioning tabs and signals the STM32 when the required sample position is reached.

Light-Controlled Enclosure

The enclosure was designed to minimise external light reaching the spectroscopy sensor. The removable top hatch provides access to the carousel while the lower compartment provides access to the electronics and battery.

Design for Assembly

The CAD design incorporated mounting points and captive-nut features so the structure could be assembled, disassembled and maintained without making the internal system difficult to access.

One controller coordinating the complete machine

The STM32L432KC acted as the central controller, coordinating the spectroscopy sensor, real-time clock, display, motor positioning, Bluetooth communication and power-management system.

AS7262Six-channel visible spectroscopy sensor
STM32L432KCCentral embedded controller
RV3028Real-time clock for sample timestamps
HC-05Bluetooth data communication
2.8" LCDLocal sample and status interface
7.4 V Li-ionRechargeable system power
Fluid analysis machine LCD showing the idle state
Idle state and user prompt.
Fluid analysis machine LCD showing sample test results
Testing state displaying sample data.
I²C sensors + RTC SPI LCD UART Bluetooth GPIO / PWM positioning control
Custom electronics

The electrical system was designed in Altium with dedicated power, signal and ground routing. PCB and schematic imagery will be added during the final visual pass when the original Altium files are available for capture.

State-based machine control

The firmware was organised into defined operating states so the machine could move from initialisation through user interaction, automated testing, data processing and result presentation.

01Initialisation

Initialise the sensors, display, motor driver and communications.

02Idle

Wait for a local button press or Bluetooth command.

03Testing

Position each sample, stop using the IR sensor and collect measurements.

04Data Processing

Process sensor values and attach timestamps from the RTC.

05Results

Display the collected information and transmit it over Bluetooth.

06Error Handling

Handle sensor or communication failures and return the system to a safe state.

Software flow chart for the fluid analysis machine
Main software flow from initialisation through testing and data transmission.
What Worked
  • Clean, integrated mechanical enclosure
  • Removable carousel for sample loading
  • Effective light blocking around the spectroscopy area
  • Clear local LCD interface
  • Integrated mechanical, electrical and software architecture
What Needed Improvement

Testing identified issues with the AS7262 spectroscopy sensor and its virtual-register readings. The resulting data was not consistently reliable, making sensor integration and calibration the main area for future refinement.

The project therefore demonstrated both the value of integrated automated testing and the importance of validating sensor behaviour independently before relying on the resulting measurements.

This project brought mechanical design, electronics, embedded firmware and user interaction together into a single working prototype. The strongest outcome was the complete system architecture and physical implementation, while the spectroscopy integration provided a clear direction for the next iteration.