-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up Opentrons Flex #150
Comments
Documentation: Setting up the pressure sensor of OpenTronsFlex (aiming at #141)
Reading pressure sensor from python without cli
from opentrons_hardware.sensors.types import SensorDataType, EnvironmentSensorDataType
from opentrons_hardware.drivers.can_bus import DriverSettings, settings, build
from opentrons_hardware.drivers.can_bus.can_messenger import CanMessenger
from opentrons_hardware.drivers.can_bus.abstract_driver import AbstractCanDriver
from opentrons_hardware.firmware_bindings.constants import NodeId, SensorType, SensorId
from opentrons_hardware.sensors import sensor_driver, sensor_types
driver_settings = DriverSettings(
interface=settings.DEFAULT_INTERFACE,
port=settings.DEFAULT_PORT,
host=settings.DEFAULT_HOST,
bit_rate=settings.DEFAULT_BITRATE,
channel=settings.DEFAULT_CHANNEL,
)
node_id = NodeId.pipette_left # from https://github.com/Opentrons/opentrons/blob/edge/hardware/opentrons_hardware/scripts/sensors.py
pressure_sensor = sensor_types.PressureSensor.build(SensorId.S0, node_id)
s_driver = sensor_driver.SensorDriver()
async def track_pressure():
async with build.driver(driver_settings) as driver:
messenger = CanMessenger(driver=driver)
messenger.start()
for i in range(10):
data = await s_driver.read(messenger, pressure_sensor, offset=False, timeout=10)
print("current pressure (in ?):", data.to_float())
await messenger.stop()
await track_pressure() reading pressure sensor while aspirating and dispensingfrom opentrons_hardware.sensors.types import SensorDataType, EnvironmentSensorDataType
from opentrons_hardware.drivers.can_bus import DriverSettings, settings, build
from opentrons_hardware.drivers.can_bus.can_messenger import CanMessenger
from opentrons_hardware.drivers.can_bus.abstract_driver import AbstractCanDriver
from opentrons_hardware.firmware_bindings.constants import NodeId, SensorType, SensorId
from opentrons_hardware.sensors import sensor_driver, sensor_types
import time
driver_settings = DriverSettings(
interface=settings.DEFAULT_INTERFACE,
port=settings.DEFAULT_PORT,
host=settings.DEFAULT_HOST,
bit_rate=settings.DEFAULT_BITRATE,
channel=settings.DEFAULT_CHANNEL,
)
node_id = NodeId.pipette_left # from https://github.com/Opentrons/opentrons/blob/edge/hardware/opentrons_hardware/scripts/sensors.py
pressure_sensor = sensor_types.PressureSensor.build(SensorId.S0, node_id)
s_driver = sensor_driver.SensorDriver()
async def track_pressure(duration_s = 1, debug = False):
async with build.driver(driver_settings) as driver:
t_start = time.time()
times = []
pressures = []
messenger = CanMessenger(driver=driver)
messenger.start()
while time.time()-t_start < duration_s:
data = await s_driver.read(messenger, pressure_sensor, offset=False, timeout=10)
if debug:
print("current pressure (in ?):", data.to_float())
times.append(time.time()-t_start)
pressures.append(data.to_float())
await messenger.stop()
return(times,pressures)
import asyncio
from threading import Thread
import time
def aspirate_dispense_sensed():
results = []
def track_pressure_sync(exchange_list):
loop = asyncio.new_event_loop()
times, pressures = asyncio.run(track_pressure(duration_s = 20))
results.append((times, pressures))
def aspirate_dispense():
for i in range(3):
position_1 = plate["A2"].bottom(z=2) # tip is 20 mm above well bottom
print("aspirate")
left_pipette.aspirate(100, position_1)
time.sleep(1)
position_2 = plate["A1"].bottom(z=2) # tip is 20 mm above well bottom
print("dispense")
left_pipette.dispense(100, position_2)
time.sleep(1)
t = Thread(target=track_pressure_sync, args = [results])
t.start()
aspirate_dispense()
print("waiting for sensing to finish")
t.join()
times_ret, pressures_ret = results[0]
return(times_ret, pressures_ret)
times, pressures = aspirate_dispense_sensed() working with pip install
TODO: install git on the OT Flex@sgbaird and @Neil-YL can you by chance point towards an easy solution? |
Measuring the pressure while tapping with the finger on the open pipette tip: Measuring pressure while pipetting water from one well to another (waiting for 1s after aspirating/dispensing): Pressure curve during actual aspiration: Exponential decay after aspiration: Comment: the calculated decay time here is 0.58 s which is much higher than in previous syringe experiments. Possible reasons:
|
Wow! Very impressive you got this to work. Sounds like it took a lot of troubleshooting and I'm sure a lot of digging through the codebase. Thank you for the thorough documentation of steps, too 🙌 I'll look into installing git. Could you comment on what you intend to use it for? E.g., pushing changes to a repo while you're developing vs. cloning packages, etc. This might help during my search. |
In this article
|
Thanks!
Intended use:
|
It has to be a single python file only if it is started via the display on the machine, right? (which I agree is very useful) When connecting to OT Flex via jupyter lab, however, I can execute single movement commands within cells (video will follow) |
In the same article above:
I realized it is talking about through app. |
For handling raw materials a Rack with holders for larger vials would be useful. |
I think the vial rack I am using now is printed by other scientist. I don't have the CAD file either, but I can make one quickly for you now. |
@cyrilcaoyang I believe you might have the CAD file for the vial holder with six slots that fits the pioreactor vials? |
I measured the current one and sent it to print. Would you like to pick it up tomorrow? @MatPopp |
great, thanks! :) |
|
Fixing pressure leakage issuesproblem description
Documentation of opening and fixing the pipette:
|
The Opentrons Flex should still be in its box on the first floor. It will need two people to unpack and lift it onto one of the benches, but the rest should be OK to set up with a single person. I'm having a router sent over there (2-5 day shipping), so you should be able to connect the Flex to that network. There are two Flex pipettes and a Flex gripper that can go over with you.
The text was updated successfully, but these errors were encountered: