Home Forums Software Creating a custom program

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #956
    Constant
    Participant

    Hi everyone,
    I’m just making this post to present myself, and tell you I am open to some forms of cooperation.

    I am an engineer in a startup using the chi.bio system, we have one beaglebone computer and 8 reactors, all from Labmaker.
    I added wifi to the board to be able to have it run on our network.

    I recently began to read all of the app.py code, and I start to understand how the code is made.
    My goal is to completely re-write the main experiment as a custom experiment, to have complete control over what’s happening inside the test tube.

    A quick list of what I will be using:
    4 pumps setup (3 inputs and 1 waste) with the ability to inject any three liquids in given proportions when I see fit.
    Calibrate the pumps at a lower PWM voltage to have more accuracy over the volume, and try to work with transferred volumes instead of “time ON”.
    Alternate between OD turbidostat and OD dithering modes on certain conditions.
    Some amount of UV mutagenesis at strategic moments in time.

    The current structure of the code uses A LOT of python threads, and I’m not completely familiar with those, so I’m having a hard time understanding everything that’s going on.
    I would love to write some sort of library to make the system more user-friendly, but at the moment the structure seems too complexe for that.
    The idea would be to encapsulate the complex functions in a few user-friendly commands, such as “reactor1.pump1.inject(milliliters=0.5)” or more realistically with the current structure: “usePump(M1, pump2, flow_in, 0.5)” with 0.5 being a value in milliliters, and the option to flow_in or flow_out.

    As for the numerous threads, I understand it helps parallelizing the reactors, but I wonder if 8 threads wouldn’t be enough if using object oriented programming.
    My guess is that this could make the programmation more straight forward, but it would require a lot of refactoring of the code.

    That’s about it, I am very open to cooperation if anyone is currently working on hacking the chi.bio software or hardware.

    I work near the Université Paris Saclay in the southern Paris Area in France.

    Speak soon !
    Constant

    #958
    harrison
    Keymaster

    Hi Constant,
    These sound like interesting software goals, and I’d be glad to help!
    Writing an API for the software is on my to-do list for this summer, since I figured this would be useful for people developing custom experiments like you describe.

    Many of your ideas are good ones, and I think you will find it isn’t that hard to implement most of them once you are familiar with the code. Changing between different modes/actuators is generally pretty straightforward, even with complex control calculations going on. As to the pumps, while lower PWM voltage may help slow down the rotor in the pump, in my past experience I found that this may also increase the pump-to-pump in variability (i.e. the rates are more variable at lower voltages). So, there is some trade-off there between reducing on time, and reducing rate while the pump is on.

    As to the threads – you are probably right. Potentially many of these could be removed. That said, for most cases there should only be 2-3 threads running per reactor at any given time, unless I am mistaken. I basically implemented the control like this since it seemed conceptually the most straightforward, and since I had not seen the software put a massive burden on the Beaglebone CPU I never felt the need to make it significantly more efficient. If you can think of benefits to implementing this in a different way I’d be happy to hear, and to help!

    Best wishes,
    Harrison

    #1357
    lachlan
    Participant

    Hi Constant, did you make any progress on this? I would be very interested to hear, as I am also beginning to write custom programs into the chi bio.

    Best,

    Lachlan

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log in/Register
Scroll to top