KevinMatt KizaricJerry Miao
Published © GPL3+

UW-Makeathon Bio-View: A modular bioreactor for cell culture

Multichamber real-time imaging device for cell cultures under different conditions. For: Isthmus Engineering Award, Best Project Award.

IntermediateWork in progressOver 1 day4,006
UW-Makeathon Bio-View: A modular bioreactor for cell culture

Things used in this project

Story

Read more

Custom parts and enclosures

Laser Cutting Template - Acrylic Clear Base

160mm x 160mm template to laser cut acrylic clear bases, 0.001 pt red border, no fill, and .ai format were for laser cutter file requirements

Laser Cutting Template - Top Layer - Outer

Laser cutting template for the outer lid part of the top layer with markings to show where to attach inner layer

Laser Cutting Template - Top Layer - Inner

Inner insert of the top layer for acrylic laser cutting

Laser Cutting Template - Camera Platform base

Laser cutting template for the camera platform base which includes two small 33 mm holes for stabilizing rods and cutouts to insert hexagonal nuts to attach screws for up and down movement of platform

Bioview base structure

Bioview body structure

Bioview top structure

Code

temp_sensor.py

Python
Used for decoding serial coms from the arduino sensor
from .commonio import init_serial
from time import sleep
import json

s = init_serial(0, 9600)


def get_temp_hum():
    raw = s.readline()
    t = None
    while not t:
        try:
            t = json.loads(raw.decode("utf-8").strip(), encoding="utf-8")
        except Exception:
            sleep(1)
            continue
    if raw != b'':
        return t
    else:
        return None

Main Flask app

Python
from flask import Flask, render_template, request
from sensors.temp_sensor import get_temp_hum
import subprocess
from threading import Thread
from main import main_display_loop
from sensors.lcd_i2c import main

app = Flask(__name__)
main()
def start_display():
    subprocess.call(["python3", "main.py"])

t = Thread(target=start_display)
t.start()

@app.route('/')
def index():
    return render_template("teststreaming.html")

@app.route('/hum')
def hello_world():
    print("Humming")
    return "{0}".format(get_temp_hum()["humidity"]), 200

@app.route('/temp')
def temp():
    return "{0}".format(get_temp_hum()["temp"]), 200

@app.route('/motor')
def move():
    steps = request.args.get('steps')
    direction = request.args.get('dir')
    print(steps)
    print(direction)
    subprocess.run(["../motor", steps, direction])
    return "OK", 201

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5000)

main.py

Python
main lcd loop
from sensors.temp_sensor import get_temp_hum
from sensors.lcd_i2c import lcd_string, LCD_LINE_1, LCD_LINE_2, main

temp_sensor = (get_temp_hum, 2, 5)


def main_display_loop():
    top_row = "BioView"
    lcd_string(top_row, LCD_LINE_1)
    while True:
        th = get_temp_hum()
        print(th)
        temp = "T:{0}C".format(th["temp"])
        hum = "H:{0}%".format(th["humidity"])
        bottom_row = temp + " " + hum
        lcd_string(bottom_row, LCD_LINE_2)


if __name__ == '__main__':
    main_display_loop()

Credits

Kevin

Kevin

1 project • 2 followers
Matt Kizaric

Matt Kizaric

0 projects • 3 followers
Jerry Miao

Jerry Miao

0 projects • 2 followers

Comments