Opentrons Hacks

I know people have hacked their Opentrons robots in mind-blowingly creative ways. What are the coolest hacks that you have created or seen? Software and hardware modifications are all welcome.

This colony picking OT-2 is an oldie but one of my favorites. From iGem in 2019, features a 3d printed light box module and an integrated camera onto the pipette gantry.

Takes a picture of the colonies and decides which ones to pick, grab them and transfers to a plate.

1 Like

The 2019 Marburg project is also a great resource for 3D-printable labware adaptors!

2 Likes

I had to go back and find it, didn’t even realize there were so many adapters! https://2019.igem.org/Team:Marburg/Hardware

Some years ago I was trying to get the Opentrons to move smoothly in 3 dimensions for a bio-printing application. I figured it should be possible because the driver is a 3D printer board, which can run GCODE, and GCODE is designed to work with CNC machines generally. This code worked, with the one caveat that I had set the current too high for my pipette, so I actually misaligned the shaft inside and it would no longer home.

So that was bad. Set the current correctly for each motor.

Trying to implement this with the latest update, I realized that anything sent to the motor controller has to be done with an async function, so there’s an extra layer to add in. If someone gets it going on the latest version, I’d love to hear about it!

from opentrons.drivers.smoothie_drivers.driver_3_0 import GCODE, _command_builder
metadata = {"apiLevel": "2.9"}

def run(protocol):
    # Labware Setup
    command = _command_builder()
    command.add_gcode(
        gcode=GCODE.SET_CURRENT
    ).add_float(
        prefix="A", value=0.1, precision=None
    ).add_float(
        prefix="B", value=1.0, precision=None
    ).add_float(
        prefix="C", value=0.05, precision=None
    ).add_float(
        prefix="X", value=0.3, precision=None
    ).add_float(
        prefix="Y", value=0.3, precision=None
    ).add_float(
        prefix="Z", value=0.2, precision=None
    ).add_float(
        prefix="P", value=0.005, precision=None
    ).add_gcode(
        gcode=GCODE.MOVE
    ).add_float(
        prefix="B", value=-85.0, precision=None
    )
    protocol.comment(command.build())
    if not protocol.is_simulating:
        protocol._hw_manager.hardware._backend._smoothie_driver._send_command(command)
6 Likes

Oh also I made an art robot: BioArtBot

If you have an OT2 and want help doing it yourself, shoot me an email! tim@bioartbot.org

1 Like

BioArtBot is amazing!! And incredibly well documented. Thanks for sharing!

Hey Everyone
wanted to ask about a specific Opentrons need,
i found the hack to run an audio file from the Raspberry Pi in the Ot2 - the “speaker-test.mp3” is cool
but i was wanting to use a file with less Celine Dion, and more of an actual bell alert!
can anyone direct me to how to upload specific mp3 files to the OT2 ?

2 Likes

Late but I just make a disco with its built-in speaker and rail lights. Can now give any youtube link, the computer downloads it as mp3 and analyses the beats in the song, uploads it to opentrons then the opentrons play it, with syncing light on and off, following the music beats.

Adding fun in the lab… the speaker is loud enough to cover a medium-sized lab.

2 Likes

@hazlamshamin Please share this!

I remember for our cheap, time sensitive processes where fitting as many runs as possible in a day was important we deliberately downgraded our API to a version that enabled dual pipetting on the Opentrons.

I believe newer versions have this feature disabled but when you’re working with time-consuming mixing steps it comes in handy.

Also using the Opentrons on-deck camera to create videos and error logging is a cool thing you can hack as well

You can run any program you want on the Flex screen as long as it supports Wayland. For example you can run a web browser like Midori quite easily.

  1. Run systemctl stop opentrons-robot-app to close the default Electron app
  2. Download aarch64 Midori (or a better browser, I didn’t look much)
  3. Save this script as launch.sh:
#!/bin/sh
if test -z "$XDG_RUNTIME_DIR"; then
    export XDG_RUNTIME_DIR=/run/user/`id -u`
    if ! test -d "$XDG_RUNTIME_DIR"; then
        mkdir --parents $XDG_RUNTIME_DIR
        chmod 0700 $XDG_RUNTIME_DIR
    fi
fi

# wait for weston
while [ ! -e  $XDG_RUNTIME_DIR/wayland-0 ] ; do sleep 0.1; done
sleep 1

$HOME/midori/midori "$1"
  1. Run it like ./launch.sh https://en.wikipedia.org/wiki/Banana
3 Likes

Nice! I will now proceed to abuse this to play gifs at my users

1 Like