Is there any way to use turbidostat and diluting to a set OD instead of a set mL, while keeping also a target max. OD for growth?
Thanks!
Hi @lindlich
You mean something like āIf OD >= upper_bound_OD, dilute until OD == lower_bound_ODā?
Yes, exactly that. Thanks!
Itās not a native automation, but Iāll give you instructions on how to add it:
- SSH into your Pioreactor leader (or only Pioreactor)
- enter
nano ~/.pioreactor/plugins/bounded_turbidostat.py - This opens up a text editor. Copy and paste the linked Python code.
- Save and exit with ctrl-x
- Optional: Next, distribute this to any other Pioreactors in your cluster:
pios cp ~/.pioreactor/plugins/bounded_turbidostat.py - Add the automation to your UI:
and copy and paste the linked code.nano .pioreactor/plugins/ui/contrib/automations/dosing/bounded_turbidostat.yaml - Save and exit with ctrl-x.
- Refresh your UI, and you should see the following:
Let me know if you encounter any problems or are missing some feature!
Amazing thank you so much! Iāll try it!
Just a heads up: this is untested! I suggest keeping an eye on the first run to make sure it works as expected.
we are testing it now using WT e coli - will post results here in 5-7 days.
thanks ![]()
Hi! We are testing it and got some problems. Itās not diluting when the targeted OD is reached
This is the message it shows:
āBoundedTurbidostatā object has no attribute
ācurrent_volume_miā
Do you have any recommendations? Thankss : )
Hi @lindlich,
I should have asked what software version you were on! Iām guessing itās pre- 25.6.25?
In that case, try the following: for pre 25.6.25 builds Ā· GitHub (Iāve changed self.current_volume_ml to self.liquid_volume)
You can stop the automation, make the change in the code, and then start it again.
Hi!! Thanks, but it isn“t working : (
- We tried the code for the past version and it didn“t work.
- Then, we updated the pioreactors by doing pio update and then pios update, and we tried both the code for the new version and the previous one. It didn“t work.
The message we constantly get is: Signal above suggested calibration range. Trimming signal. Calibrated for OD=[0, 1], V=[0.00176, 0.306]. Observed 0.573V.
So, it`s not diluting.
What can we do? Thanks
Signal above suggested calibration range. Trimming signal. Calibrated for OD=[0, 1], V=[0.00176, 0.306]. Observed 0.573V.
Hm, okay, so Iām guessing your OD Reading curve looks flat and stuck at 1.0. And if your turbidostat upper threshold is above 1.0 (maybe even equal to 1.0?), then it will never reach and wonāt dilute. And the culture keeps growing, which increase V, which reinforces seeing the āSignal above suggested calibration rangeā message.
I think there are a few independent solutions:
- Create a calibration curve that is above the upper threshold of
1.0. Thatās a lot of work though. - Choose an upper threshold below
1.0, even something like0.95would work. - Modify the Python code I provided to handle this situation. This is also a lot of work.
I would try 2. first, see if that works, and then carry on from there. Iāve also updated the automation for the post-25.6.25 software to log whatās happening so we get more visibility. These are ādebugā logs, so youāll need to view them under āEvent Logsā with the āDetailed viewā selected.
You can also manually add and remove media using the āDosingā tab under āControlā dialog on the Pioreactors page. Carefully add and remove media until youāre back under 1.0.
Sorry for the confusion, we actually tried a few different settings for the upper threshold/target OD.
we tried setting it to 0.8 and 0.1, and also 0.5 and 0.2
our calibration goes from 0.1-1, and our problem is that it just never triggered a dilution when the target OD is reached.
I can perhaps look at the code within the next coming months - I will see what I can do with it.
Thanks for your help!
Dylan
Did anyone manage to achieve this?

