Hey, I want to set up and calibrate a large number of pumps (12x Pio, so 24 pumps in total). Is there a way to speed up/streamline the calibration for multiple pumps?
Hi @Stkral,
There is a way, but what you gain in time, you lose some accuracy. This method isn’t supported out-of-the-box, hence all the little steps that use in-the-box tools.
I’ll present the idea, and then the steps required.
The pump calibration varies the duration the pump is run for, asks for the volume / weight of water expelled, and then fits a line to the data points. That line is actually fixed at (0, 0), since no duration = no volume, and is linear from there. In theory then, you really just need one data point to form a line. We can control the pumps from a single computer (the leader), perform a pump action on each Pioreactor, and record the amount expelled for each pump. Then we can upload this data point to the respective Pioreactor.
-
Let’s say we want to calibrate media pumps first. Attach the 12x media pumps power to the 12x Pioreactor PWM output.
-
Next we will prime all the pumps. Put the “source” and “sink” end of each pump into a container of water, and from the leader, run:
pios run add_media --continuously
to stop, use:
pios kill add_media --name add_media -y
-
Record the weight of 12 vials. This is required to find the delta weight. For each pump, put the pumps “sink” end into a vial. (You may want to add some water to the vial to help balance it).
-
From the leader Pioreactor, run:
pios run add_media --duration 1.5
Again, this will run each pump for 1.5 seconds. Now you need to weigh each vial again to find the delta weight.
-
At this point, you have a data point for each pump. You can continue producing data points, or you can stop and move on to uploading it to Pioreactors pump_calibration routine. See next.
-
On the leader, create a new file we’ll use as a template:
nano pump_calibration.json
and copy-and-paste the following into it:
{ "durations": [0, 0, 1.5], "volumes": [0, 0, vv], "hz": 200.0, "dc": 100.0 }
hit ctrl-x to save and exit.
-
We’ll copy this template to each worker:
pios cp pump_calibration.json -y
-
Next, we need to SSH into each worker. We can SSH from the leader, too:
ssh pioreactor@worker1.local
for example.
-
Once on a worker, we’ll replace the
vv
in the template with the correct value. Suppose the delta weight was 0.46g, so I put in:sed -i 's/vv/0.46/' pump_calibration.json
-
Finally, still on the worker, you can run the following to complete the calibration.
pio run pump_calibration -f ~/pump_calibration.json
Any questions or confusing details about the steps? Happy to help more!
Thanks a lot! One question, if I want to produce multiple datapoints for each pump in this way. What is the template in the pump_calibration.json file so that I can fill in multiple values and durations. I figure that way the calibration will be more robust as compared to one data point each.
Thanks again!
My guess would be:
“durations”: [0, 0, du1, du2, du3],
“volumes”: [0, 0, vv1, vv2, vv3],
Something like that yes!
Note that du1, du2, du3 will likely be the same for all pioreactors, so you can hardcode those.
Hey Cameron, as I understand this will be the calibration only for the add_media pumps (or at least it doesn’t specify which pump it is). I did the first steps in the same way for the waste pumps. How do I also input the calibration for the wastepumps into the pioreactors. Hope you understand the question, otherwise I can elaborate
I figured it out already! I realized that in the calibration ‘menu’ you can choose which pump to calibrate. So I can just make a second nano file for the waste pump and run the last command with that file to use the values for the waste pump.