A low-cost turbidity sensor and its software, for monitoring culture density in a running bioreactor. It uses the circuit board from a TST-10-type turbidity probe (as sold on DFRobot's SEN0189 module), mounted in a 3D-printed case around a clear tube and read by an Arduino Nano. A timed syringe actuator draws culture from the vessel through the tube for each reading.
- Sensor head: the bare probe board in one of two printed cases around a clear tube.
hardware/tube-case/is a plain block for bench use or an inline liquid line.hardware/sampler-case/mounts on a vessel port below the syringe actuator.hardware/probe/holds the measured board outline that both cases are sized from.docs/hardware.mdlists the enclosures and covers the wiring.hardware/adapter-case/encloses the SEN0189 adapter board between the head and the Arduino.hardware/nano-shield-case/holds an Arduino Nano on a DFRobot Nano I/O shield. - Readout:
examples/arduino-multichannel/streams raw readings from up to four heads.tools/captures, summarises and plots them. - Sampler logger:
rig/pi/runs the syringe actuator (uwo-fast/syringe-actuator) in timed bursts and extracts a culture reading from each burst. It does not need position sensing or valves. - C library: a model of the head based on the manufacturer's curves, and a calibration tool.
The model applies to a head in its stock housing, not in the tube case. See
docs/library.md. - Data: all bench sessions and runs, with their notes, in
data/bench/.
- Bench: two heads in tube cases measured kaolin standards from 250 to 4000 mg/L. Readings of
clear water repeat within 0.05–0.11 % across refills of the tube, about one ADC count
(
docs/bench/session-1-results.md). - Run 1: the sampler monitored a Chlorella vulgaris batch culture in a sparged column for
about 7 days, with a benchtop spectrophotometer (OD750) as the reference.
- A fit to the first four days predicted five later readings within 2.6 %. This excludes four readings that have recorded caveats. With those four included in the fit, the later readings are 4.5–10.1 % off.
- Record:
data/bench/2026-11-05/notes.md.
- Not yet done:
include/,src/: the C library;src/also holds the generated vendor-fit headertools/: the calibration CLI and generator, serial capture, summary and plot scripts, and the tube ray traceexamples/: the Arduino examples and a host replay examplerig/pi/: the sampler loggerhardware/: the probe library, the tube case, the sampler case, and a flange that holds a TST-10 over a beakerdata/bench/: bench sessions and runsdata/calibration/: vendor digitisations and generated calibrationdocs/: wiring, test solutions, the library, bench proceduresdocs/archive/: earlier research and datasheetstests/: unit, CLI-contract, package smoke and logger tests
Tasks run through just; just --list shows them all.
just build # configure and compile (warnings are errors)
just test # build and run the test suite
just check # clang-format check + clang-tidy (CI-equivalent)
just arduino # compile the Arduino examples for every board
just capture # record a board's serial log to CSVfmt, check and CI use clang-format and clang-tidy 18.1.8.
Without just:
cmake -S . -B build -DBUILD_TESTS=ON -DBUILD_TOOLS=ON -DBUILD_EXAMPLES=ON
cmake --build build
ctest --test-dir build --output-on-failureCopyright © 2025–2026 Cameron Brooks.
This project is free software: you may redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later version.
The parametric CAD source (.scad) is also licensed under
CERN-OHL-S-2.0, and the geometry generated from it
under CERN-OHL-S-2.0 alone. The exception is the sampler case, which includes GPL
libraries, so its source and geometry remain GPL-3.0-or-later only. The bench and
calibration data are licensed under CC-BY-4.0. See
LICENSING.md for what applies where, including the third-party
datasheets and standards that this repository does not license. The organization
licensing policy
gives the reasons.
