Turbidostat: Optical density sensors

2 minute read

Published:

Optical density (OD) measurements are crucial to measuring bacterial growth. OD describes the transmission (\(T\)) of light through a highly blocking optical filter, in this case bacteria, such that \(T\) of light through the medium is very small. OD is mathematically expressed as the negative \(log_{10}(T)\) where transmission is a physical value between 0 and 1. Typically OD is measured by shooting a specific wavelength through the test tube that the bacteria cannot absorb, but refract and scatter resulting in decreased detectable transmission from an optical sensor on the other end of the tube. Naturally there should be a linear relationship between the amount of light blocked by the number of bacteria cells in the medium.

\[\displaylines{ OD = -log_{10}(T) \\\ T=10^{-OD} }\]


Cyanobacteria are photosynthetic and not only absorb light at most of the visible spectrum, but also release a photon in a phenomena called epifluoresence. Because I only have a simple light sensor that detects over a broad range of light, the chosen wavelength of light must not be in the photosynthetically active range. Hence the standard wavelength to measure cyanobacterial turbidity is 780 nm because it is near infrared and cannot be absorbed by photosynthetic pigments. I opted to use a 780 nm laser diode because simple LEDs have too broad of a wavelength distribution that bleed into the photosynthetic range. The optical sensor I chose is the TSL2591 from adafruit to make things easy for myself. It uses i2c addressing to control and comes with a nice circuit_python library to make coding easy.

Multiplexing sensors

Because the turbidostat will have at least 6 independent bioreactor vessels, I need to multiplex driving multiple TSL2951 devices. Because they use i2c addressing, I use the TCA9548A mutliplexor. If you are using circuit_python, you will want to use a microcontroller that uses a ATSAMD51 ARM processor due to issues with the TCA9548A library not compatible with other boards. I’ve linked 6 sensors together to a M4 Metro Express Featherwing from Adafruit. The board is connected to my laptop which is receiving a data stream through PySerial and writing the data to a csv file in realtime. This data is then plotted live using my custom GUI. The TCA9548A also supports daisy chaining so in the future I can have up to 21 sensors wired at the same time.



Part List

Code Depedencies

  • Circuit Python and Circuit Python libraries
    • TSL2591
    • TCA9548A
  • PySerial
  • CustomTkinter
  • Matplotlib