Skip to content

Low-cost, High-performance Syringe Pumps for Microfluidics Applications

License

Notifications You must be signed in to change notification settings

Georg-Auer/delta-microscope

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Low-cost, automated microscope stage

PureData Version

This page describes how to build an automated inverted 3d printed microscope for observing microfluidics chips.

This is a SPOC lab project. Original source code of the project is provided under MIT License. The source may contain code under a different license, if this is the case it is stated in the LICENSE file. This page describes how to create a simple het cam robot.

If not stated otherwise, the designs and documentation in this repository are made publicly available under a Creative Commons Attribution 4.0 International (CC BY 4.0) License.

images/3dprinted_microscope.jpg

Image of the 3D-printed microscope.

Introduction

The microscope is designed to be as cheap and quick to manufacture as possible, and still achieve high accuracy. Due to the chosen delta kinematics the device has a very small footprint, and is also suitable for use in an incubator. incubator. In the SPOC lab, the microscope is used to observe and monitor the generation of spheroids in self-constructed chips and monitor the process. The microscope can be controlled directly or automated via a program to observe an experiment over time.

Mechanics - Files and Bill of Materials

Pump Design files (openSCAD)

The microscope model was designed in openSCAD in parametric form. For each part, an stl file was created and all files where then sliced with Prusa Slicer and sent to print on an 3D filament printer (Prusa MK3). For the ease of reproduction of the slicer files are also saved within the directory.

images/openscad_microscope.png

A screenshot of the microscope in openSCAD (for the file see ./files/3d/openscad-microscope.scad).

Bill of Materials

itemnumberpurposebought frompart-nocosts in €
Allegro A4983 Based Stepper Boards: here the ‘Big Easy Driver’3stepper boardTechnobots2900-445~ 70
Teensy 4.0 or 4.1 Microcontroller1stepper controlConrad2269230~ 30
Nema 17 Steppers (0.9° 2.4 A)3stepper motorAct-motor1402-050~ 60
Fine Hex Adjuster, 1/4”-80, 4” Long3leadscrewThorlabsF25SS400~ 40
Locking Phosphor-Bronze Bushing with Nut, 1/4”-80, L=0.50”3leadscrewnutThorlabsN80L6P~ 28
Linear Guide Rails (min 200 mm)3slides platformAmazonCNBTR214~ 45
Universal Coupling Body3motor-screw-connectorTechnobots4604-050~ 12
Universal Coupling Insert - 5 mm3motor-sideTechnobots4604-059~ 8
Universal Coupling Insert - 1/4”3screw-sideTechnobots4604-066~ 8
OTHER SMALL ITEMS
160 mm x 100 mm Copper Clad Stripboard1mount for electronicsConrad~ 2
Male & Female PCB Headers 2.45 mm pitchsomesimple connectorsConrad~ 10
Screws M3 (10 mm): 12 for motors, 6 for sliders, 15 for guides33mount slider & motorsBauhaus
Nuts M333fixing screwsBauhaus
Screws M6 (15 mm)12suspensionBauhaus
Screws M6 (60 mm)6suspensionBauhaus
Nuts M6 (end nut)6suspensionBauhaus
Neodymium bullet magnets ⌀ 10 mm6suspensionBauhaus
USB (micro) cable1Conrad~ 3
6 wire colored ribbon cable3 mConrad~ 3
12 V / >=5 A power supply1Conrad~ 20
197 g 3D-printer filament (PLA 1.75 mm)1*250 gmicroscope structure3d jake~ 10
USA Digital Microscope 40x-1000x1microscope cameraBysameyee~ 20
< 400

Companies:

All components but the optics-screws (Thorlabs) can be obtained commercially. If other leadscrews are used, the software has to be adapted to the distance/revolution grading.

Machines (and/or):

  • FDM 3D-printer (we use an Prusa MK3, but any model with an similar precision would do)

images/robot.jpg

Image of the robot.

Introduction

Biocompatibility is of new untested materials is an important field. This robot is a proposal of an automated het-cam experiment.

Mechanics - Files and Bill of Materials

Design files

Bill of Materials

  • PLA
  • stepper motor driver
  • stepper motor
  • arduino
  • raspberry 4
  • raspberry hq video camera

Machines (and/or):

  • FDM 3D-printer (Prusa MK3, but any model with an similar precision would do)

Tools:

  • Soldering iron
  • Hand tools (screwdrivers etc.)

Mechanical Assembly

Pre-Assembly of Parts

Motor Part
  • tin the leads of the motors with solder, add a male PCB-connector (or any other connector of your choosing. On our motors the colored leads are GREEN, BLACK, BLUE, RED).
  • we use heatshrinking tube to electrically isolate the connectors at the end.
  • add the connector for the leadscrew (5 mm brass insert) to the motor - you might not have space to do that later.
Leadscrew Part
  • add the brass insert to connect the motor onto the leadscrew
  • insert the screw VERY carefully to avoid damaging the thread which can happen rather easily.
Camera

The Microscope can be exchanged with an variety of solutions. We tried an Raspberry HQ Camera v1.0 with SM1 to C-mount adapter (thorlabs, SM1A9) to 1 inch optics connected to an Zeiss Plan 2,5 objective, but eventually ended up with an 25€ USB microscope camera that has a 40x-1000x zoom option for maximal flexibility.

Assembly of the microscope

The STL files for the microscope where sliced in Prusa Slicer 2.2.0 and printed in ecoPLA NeonOrange with 20% infill. The linear guide rails where screwed onto the main part, and the top part was then screwed onto the guide rails with 15xM3 screws and nuts. For correct assembly, the top part has to end on height of the guide rails. The three stepper motors where then screwed (12xM3) onto the bottom part. The bottom part needs to be screwed on the other end of the guide rails (3xM3). Now the universal couplings are screwed onto the motors and the optical fine threaded rods are fixed on the other side of the universal couplings. For better durability, the plastic part of the universal couplings are glued to the metallic part with epoxy glue. Six M6x15 mm screws are glued into the three slider parts, and M6x15 mm are glued into the platform as preparation for the magnetic joints. The slider parts are now joined with their threaded insert and can be screwed onto the guide rails. The end nuts are now placed on the M6 screws (60 mm) and the microscope stage is completed by putting the neodymium magnets in the joint positions. Finally, the microscope-camera can be put in the ring on top where it is held in position with the printed clamp.

Electronics

To drive the stepper motors we use a A4983 stepper driver chip from Allegro Microsystems (datasheet http://www.technobotsonline.com/Datasheets2/1518-009-A4983SETTR-T.pdf). For convenience we use one ‘Big Easy Driver’ for each motor (http://www.technobotsonline.com/big-easy-driver.html, http://www.schmalzhaus.com/BigEasyDriver/). The ‘Big Easy Driver’ boards are nice, because they default to 16 step microstepping mode, when the ‘MS1, MS2, MS3’ pins are left unconnected (which means that less soldering has to be done). With 16-step microstepping, one revelation of the leadscrew (318 micrometer movement) is divided into 400*16=6400 steps resulting in a stable flow even at very low flowrates. The stepper drivers are controlled with a teensy 4.0 or 4.1 microcontroller.

images/Electronics.jpeg

Left: Images of the electronics board with three stepper driver boards mounted. Right: Schematic diagram.

Make the board

  • solder connectors onto the driver board (e.g. PCB-connectors)
  • layout the parts on a stripboard and drill holes so that you can mount the board with screws to an enclosure (e.g. from laser-cut acrylic).
  • solder female PCB-connectors on the board for the teensy and the stepper boards (don’t forget to cut the traces on the stripboard underneath).
  • make all the necessary connections (see layout…)
  • we made the system as simple as possible:
    • no connection to MS1, MS2, MS3 - all are pulled high when not connected (means the driver defaults to 16 microstep-mode
    • no connection to sleep (slp) and reset (rst) - if powered the system will be on all the time. If you want to shut down the motors, turn off the power.
    • this leaves only the following connections to be made:
      • enable (en) is pulled low on all by connecting to ground (this is important, else the pins float).
      • shared GND between teensy and the quadstepper board (or single big easy drivers)
      • step-pin (stp): if high for >1 microsecond, the motor will step
      • direction-pin (dir): high/low sets the direction (if one of the motors steps the ‘wrong’ direction, just reverse the connections of the leads from (e.g. green, black, blue, red –> to red, blue, black, green).
    • Teensy is powered by a USB connection and the motors are powered separately (we use a 12V 5A power supply).
  • Don’t forget to adjust the current supplied to the motor with the small potentiometer on the stepper driver board. On max, the chip gets hot and the motor might have enough torque to continue beyond the end-stop, damaging the microscope assembly.

Software for the Microscope

Introduction - mode of operation and choice of tools

The microscope motors are controlled with a microcontroller (a ‘teensy’ 4.0 or 4.1) and a software front end written in Pure Data (PD). The teensy (https://www.pjrc.com/teensy/teensy31.html) is a 3.3V, 32-bit ARM based microcontroller that is compatible with the Arduino toolchain (https://www.arduino.cc/en/Guide/HomePage) and therefore easy to program. The prime reason to use a teensy is the high speed USB data transfer they allow (https://www.pjrc.com/teensy/benchmark_usb_serial_receive.html). Apart from controlling machinery, the teensy is well suited for data acquisition tasks.

Pure Data (PD, https://puredata.info/) is an open source dataflow programming language used primarily for music and video applications. It runs on nearly every computing platform, is straightforward to learn and can be modified ‘live’.

The communication protocol between the microcontroller and PD is OSC (‘Open Sound Control’, https://www.opensoundcontrol.org). It is a very flexible, easy to use two-way communication.

images/SoftwareWorkflow.png

System diagram.

Install the Software Toolchain

Arduino/Teensyduino

The easiest way to program teensy microcontrollers is to use the Arduino IDE (download:https://www.arduino.cc/en/Main/Software). For the teensy microcontrollers to be recognised by the Arduino IDE, one must additionally install ‘Teensyduino’ (download: https://www.pjrc.com/teensy/td_download.html). There is a detailed tutorial on software installation and its use on the webpage. Most of the Arduino libraries are compatible with teensy, Teensyduino itself comes with many optimized ones (full install recommended).

Setting up the System

  • program the teensy
  • open the webpage

How the System Works

In the frontend control on the webpage, the rotation movement of the individual of the individual motors is calculated. This number of steps is now sent to the microcontroller, which in turn controls the motor driver via the Step/Dir protocol.

Getting it to Run

To get a debian system to run all necessary programs, use the new-raspi.sh shell script.

images/software-screenshot.png

Screenshot of the program.

images/boxplot.png

The microscope stage can now be controlled via an additional python script. At first, an experiment to run to different x/y positions and back to the origin has to be created and executed. After reaching the origin again, a picture of a raster is taken and saved in the experiment folder.

After running the experiment 25 times (n = 25), this resulting boxplot was calculated automatically with the calibration.py script.

Assembly

Software for the Microscope

Introduction

git clone –recurse-submodules [email protected]:spoc-lab/delta-microscope.git

pip install -r requirements.txt for torch on armv7l: https://github.com/Kashu7100/pytorch-armv7l

sudo apt install libopenblas-dev libblas-dev m4 cmake cython python3-dev python3-yaml python3-setuptools cd ~/Downloads git clone https://github.com/Kashu7100/pytorch-armv7l.git cd pytorch-armv7l/ sudo pip3 install torch-1.7.0a0-cp37-cp37m-linux_armv7l.whl sudo pip3 install torchvision-0.8.0a0+45f960c-cp37-cp37m-linux_armv7l.whl

sudo pip3 install -r requirements.txt

How to make the script run on startup: sudo nano /etc/rc.local insert: cd home/pi/het-cam-dashboard sudo CAMERA=opencv python3 run.py &

sudo nano ~/.profile git –git-dir=/delta-microscope/.git pull main

or for additional logging: sudo CAMERA=opencv python3 run.py & > /home/pi/Desktop/log.txt 2>&1

https://blog.miguelgrinberg.com/post/flask-video-streaming-revisited

to start an OpenCV session from bash, you can do this:

$ CAMERA=opencv python3 run.py

From a Windows command prompt you can do the same as follows:

on windows run: $ python run.py CAMERA=opencv $ py -3.7 run.py CAMERA=opencv

or: $ set CAMERA=opencv $ python run.py $ py -3.7 run.py

or on linux with gunicorn:

About

Low-cost, High-performance Syringe Pumps for Microfluidics Applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 97.1%
  • Python 0.8%
  • CSS 0.6%
  • HTML 0.5%
  • SCSS 0.5%
  • OpenSCAD 0.3%
  • Other 0.2%