# Peristaltic pumps not stopping with manual control

**URL:** <https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265>\
**Category:** Peristaltic Pumps\
**Created:** [February 16, 2021, 9:12pm UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265 "2021-02-16T21:12:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 16, 2021, 9:12pm UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/1 "2021-02-16T21:12:19Z")

</div>

When I run the pumps manually through the evolver GUI, instead of a single pumping event, they pump for the interval I specified ( e.g 1-20 seconds), wait ~ 10 seconds, and then pump again for the specified interval.  
This pattern repeats indefinitely.  
If I flick the pump array on and off, the infinite pumping continues.  
If I de-select the pumps on the GUI, and then click the pump buttons, the infinite pumping events stop.  
If I start running an experiment (chemostat / turbidostat mode), the infinite pumping also stops.  
If

Any suggestions on how this bug arose? The eVOLVER did not do this a week ago.  
Also, any suggestions on the order of powering on the eVOLVER components? As in the order of 5V, 12V, and pump switches?  
Thanks.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 12:39am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/2 "2021-02-17T00:39:59Z")

</div>

It seems like you’ve some how been sending it chemostat commands instead of turbidostat commands. The GUI should not be sending it these commands so I am not sure how/ why you are sending it.

> <https://github.com/FYNCH-BIO/evolver-arduino/blob/master/SAMD21/RS485_FLUIDICS/RS485_FLUIDICS.ino#L1>

In the command, I believe that if you send a 2|4 (e.g. in the first position on the code), you turn on the pump for 2 seconds and repeat every 4 seconds.

Again, this should not be accessible via the GUI. Did you try to run chemostat code via the DPU/ have this running in the background anywhere accidentally?

Any thoughts @heinsz ?

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 12:45am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/3 "2021-02-17T00:45:10Z")

</div>

I had previously been running a chemostat experiment through the DPU. Only 4/16 vials ended up pumping successfully.  
Now I can’t get the chemostat DPU code to run at all. I set the starting conditions to t=0 and the starting OD threshold to -1, and filled all the vials with water. The pumps don’t run at all, even when the starting conditions are passed. I set d = 1.15 with a 26 mL of fluid in the vial and .5 mL bolus rate. This should give me a bolus every minute, but nothing is happening.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 12:47am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/4 "2021-02-17T00:47:13Z")

</div>

I did not write the chemostat code, so I am not as familiar with it. Can you post what your custom script looks like here/ upload on github and link?

@cmancuso might know a bit more about the chemostat code.

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 12:54am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/5 "2021-02-17T00:54:47Z")

</div>

I’ve been using basically the same example custom script that’s currently on github, I just added some print statements for debugging.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 1:02am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/6 "2021-02-17T01:02:51Z")

</div>

What is in your pump\_cal.txt and what do you define in your rate config step?

For example:  
`rate_config = [0.5] * 16`

OR  
`rate_config = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6]`

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:06am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/7 "2021-02-17T01:06:01Z")

</div>

I use the first of those two options:  
rate\_config = [1.1538]\*16

There could be some issue with my pump calibration file, here’s what it looks like:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/f09d282436d657027d828a2de2f46fb70be1b87c.png)

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:06am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/8 "2021-02-17T01:06:52Z")

</div>

If you are curious, a few days ago all the pumps worked in turbidostat mode, and only pumps 5,6,7 and 12 worked in chemostat mode.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 1:09am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/9 "2021-02-17T01:09:26Z")

</div>

Might help to print out your pump commands to debug. You can add some debug statements on this section of the code:

> <https://github.com/FYNCH-BIO/dpu/blob/master/experiment/template/eVOLVER.py#L261>

Maybe printing the message at the end before the command is sent out or emitted would be most useful.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 1:10am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/10 "2021-02-17T01:10:44Z")

</div>

Also, power cycling your machine might also be helpful. Turn OFF for 19 seconds and then turn back ON

EDIT: Also can you report what is on your config file in your eVOLVER? You can access it by the following steps:

1. Go to Terminal and type in `ssh pi@<evolver ip address>` , for example, our evolver is 192.168.1.2 so we would put `ssh pi@192.168.1.2` The password is `DbLaoXDr`
2. Type the following: `nano evolver/evolver/conf.yml`
3. Copy and paste what is listed there to this thread.

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:21am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/11 "2021-02-17T01:21:28Z")

</div>

So for the issue with the pump pumping infinitely in a “chemostat” like mode when I manually click pump on the GUI: If the last experiment I ran was a chemostat, the infinite pump issue arises. If the last experiment I ran was a turbidostat, there is no infinite pumping issue.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 1:24am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/12 "2021-02-17T01:24:57Z")

</div>

Just to be clear, running indefinitely is the expected behavior when running chemostat, but when exiting the script, there should be a kill all command to stop the chemostat. When running a tstat command, it over writes the logged chemostat command and thus stops it from running indefinitely.

This issue is

1. why is the stop pump command not being fired at the end of the experiment
2. why did only a subset of the pumps fire as a chemostat

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:28am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/13 "2021-02-17T01:28:24Z")

</div>

Yes, the infinitely running pump occurs after I stopped the dpu scripts, and go onto the eVOLVER GUI and click “pump” ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/67a76ae10b30ea54a90bca3fcc7f5a2fa55edc7d.png)  
If the last dpu script was a chemostat, it runs indefinitely (i.e every 10 seconds). If it was a turbidostat, it only pumps for the specified time & then goes quiet.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 1:29am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/14 "2021-02-17T01:29:21Z")

</div>

Before we proceed more, can you please add the debug lines to your code to print the message and paste the config file, as requested earlier in the thread?

EDIT: Also, are you sure there are no scripts actively running in any terminal anywhere? It seems like if your scripts haven’t be exited properly (control + C) it might still be running and explain a lot of the issues?

try this command on terminal to see if anything is still running:

` ps -ax | grep eVOLVER`

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:31am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/15 "2021-02-17T01:31:51Z")

</div>

Yes here is the config file, will show the debuggin / print statements in a moment

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/c40859aa98e267f359486ee9a67f3d937cd4167f.png)

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:49am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/16 "2021-02-17T01:49:04Z")

</div>

Will check if scripts are stopped in a moment. I’m using pycharm, so that could be an issue. Going to restart my computer and then run scripts through the terminal.  
In the meantime, here’s the output of the debugging. I added a line shown in the photo ![image](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/9dc9aeb59bf4b3583424e69226cef56fe525b191.png)  
e]0;eVOLVER EXPERIMENT: PRESS Ctrl-C TO PAUSEa  
Connected to eVOLVER as client  
Calibrate vials to blank? (y/n): y  
Calibrations recieved  
Test8\_Feb\_16\_Chemo\_expt: 0.0038 Hours  
Message sent vial {‘fields\_expected\_incoming’: 49, ‘fields\_expected\_outgoing’: 49, ‘recurring’: True, ‘immediate’: False, ‘value’: [‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘0|0’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’], ‘param’: ‘pump’}  
Test8\_Feb\_16\_Chemo\_expt: 0.0095 Hours  
Test8\_Feb\_16\_Chemo\_expt: 0.0152 Hours  
Test8\_Feb\_16\_Chemo\_expt: 0.0206 Hours  
Test8\_Feb\_16\_Chemo\_expt: 0.0262 Hours  
Test8\_Feb\_16\_Chemo\_expt: 0.0318 Hours  
Chemostat updated in vial 0  
Chemostat updated in vial 1  
Chemostat updated in vial 2  
Chemostat updated in vial 3  
Chemostat updated in vial 4  
Chemostat updated in vial 5  
Chemostat updated in vial 6  
Chemostat updated in vial 7  
Chemostat updated in vial 8  
Chemostat updated in vial 9  
Chemostat updated in vial 10  
Chemostat updated in vial 11  
Chemostat updated in vial 12  
Chemostat updated in vial 13  
Chemostat updated in vial 14  
Chemostat updated in vial 15  
Message sent vial {‘fields\_expected\_incoming’: 49, ‘fields\_expected\_outgoing’: 49, ‘recurring’: True, ‘immediate’: False, ‘value’: [‘0.64|60’, ‘0.65|60’, ‘0.66|60’, ‘0.66|60’, ‘0.64|60’, ‘0.62|60’, ‘0.64|60’, ‘0.65|60’, ‘0.65|60’, ‘0.67|60’, ‘0.66|60’, ‘0.62|60’, ‘0.65|60’, ‘0.64|60’, ‘0.64|60’, ‘0.67|60’, ‘1.28|60’, ‘1.30|60’, ‘1.32|60’, ‘1.32|60’, ‘1.29|60’, ‘1.23|60’, ‘1.27|60’, ‘1.31|60’, ‘1.30|60’, ‘1.33|60’, ‘1.32|60’, ‘1.25|60’, ‘1.29|60’, ‘1.28|60’, ‘1.27|60’, ‘1.33|60’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’, ‘–’], ‘param’: ‘pump’}

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 1:54am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/17 "2021-02-17T01:54:14Z")

</div>

![20210216_174927](https://canada1.discourse-cdn.com/flex035/uploads/evolver/original/1X/2959861691c8c008eb950229e9711e9511db3f7a.jpeg)

Is that what you were looking for?

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 2:00am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/18 "2021-02-17T02:00:02Z")

</div>

Regarding 2) - I was running a chemostat over the weekend. Another lab member exited my pycharm tab which had the DPU script running on it. When I can into the lab on Monday, the chemostat was still running, even though the pycharm IDE was closed. I thought this was pretty strange. What you are suggesting about scripts still running in the background could make sense.  
I’ll try running experiments through the terminal and see if issues still arise.

---

<div class="post-metadata">

**Author:** ![bgwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/www.evolver.bio/bgwong/32/262_2.png) [@bgwong](https://www.evolver.bio/u/bgwong)\
**Post date:** [February 17, 2021, 2:02am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/19 "2021-02-17T02:02:07Z")

</div>

great please keep us updated. Everything looks OK otherwise. Others have used the c-stat code more than I have so maybe others can chime in.

---

<div class="post-metadata">

**Author:** ![ericlyall](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@ericlyall](https://www.evolver.bio/u/ericlyall)\
**Post date:** [February 17, 2021, 2:09am UTC](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265/20 "2021-02-17T02:09:13Z")

</div>

Will do. Just now I had done the following:

1. run a chemostat experiment in pycharm
2. pressed the stop button in pycharm
3. closed pycharm
4. restarted computer, powercycled all evolver components.
5. powered on computer
6. pressed pump 1 second on evolver GUI  
and the system went on the infinite pumping schedule again.

[Next page](https://www.evolver.bio/t/peristaltic-pumps-not-stopping-with-manual-control/265.md?page=2)
