Automation - turbidostat: diluting to a set OD

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!

1 Like

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:

  1. SSH into your Pioreactor leader (or only Pioreactor)
  2. enter
    nano ~/.pioreactor/plugins/bounded_turbidostat.py
    
  3. This opens up a text editor. Copy and paste the linked Python code.
  4. Save and exit with ctrl-x
  5. Optional: Next, distribute this to any other Pioreactors in your cluster:
    pios cp ~/.pioreactor/plugins/bounded_turbidostat.py
    
  6. Add the automation to your UI:
    nano .pioreactor/plugins/ui/contrib/automations/dosing/bounded_turbidostat.yaml
    
    and copy and paste the linked code.
  7. Save and exit with ctrl-x.
  8. 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.

1 Like

we are testing it now using WT e coli - will post results here in 5-7 days.

thanks :slight_smile:

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 : (

  1. We tried the code for the past version and it didn“t work.
  2. 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:

  1. Create a calibration curve that is above the upper threshold of 1.0. That’s a lot of work though.
  2. Choose an upper threshold below 1.0, even something like 0.95 would work.
  3. 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?