Skip to content

chory-lab/transfer_station

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repository holds the code (and previously used test code) for the functioning of the transfer system, or just the step motor rail. There are two parts to this README detailing the software components, and the hardware components of the transfer station system.

Software

This section details the usage of the code.

api_step_motor.py

The system is setup in such a way where the majority of the fucntional code is in api_step_motor, which creates a UI through flask (and handles subsequent interactions with said UI) that the user can input commands to.

A4988.py

In order for the stepper motor to connect to the Raspberry Pi 4 it is necessary to utilize a A4988 controller, and the python file of the same name holds all the function definitions utilized in api_step_motor.py and the microswitches, and handles the connection between the Raspberry Pi 4 and the stepper motor on the rail.

FLow Chart

image

Installation

  • Install flask (make sure it is ver 2.2.2 or newer otherwise --app feature won't work, check this by running flask --version):

    pip install --upgrade Flask

  • Install reddis:

    pip install redis

  • Install flask_caching:

    pip install flask_caching

Setup (Skip if setup already running)

The first step is to get start the flask and redis server, the redis server handling multiple calls at the same time to allow asynchronous running of the code.

  1. Activate the Virtual Environment

    • Navigate to the location of the virtual environment:

      cd /home/git/transfer_station

    • Activate the virtual environment:

      source foobar/bin/activate

  2. In another terminal, start the redis server:

    redis-server

  3. Run the code through flask (on the previously setup virtual environment) and open the outputted link (first one is for the local machine, second is for a different machine on the same wifi):

    flask --app api_step_motor run --host=0.0.0.0

Hardware

The hardware can be categorized into two parts, the actual circuitry required to run the transfer station, and then the physical components that actually make up the parts of the transfer station itself.

Transfer Station Circuitry

The transfer station consists of a step motor rail connected through a motor driver (A4988 Stepper Motor Driver) to a computer (Raspberry Pi Zero 2 W) on which the code is running. The wiring diagram can be seen below:

image

A4988 Stepper Motor Driver

image

Pin Index:

  • ENA -> Enable pin. When low A4988 is enabled, when high A4988 is disabled
  • RES -> Reset pin
  • SLP -> Sleep pin (connected to RES so SLP triggers code RES)
  • STP -> Step. Reads how many steps requested for the step motor to take
  • DIR -> Direction.
  • VMT -> Energy supply to power step motor
  • GND -> Ground
  • 2B, 2A, 1A, 1B -> Control for Bipolar Step Motor (Power, Step, Direction)
  • VDD -> Power for A4988

Raspberry Pi Zero 2 W

image

image

Pin Index:

  • 2 -> 5V Power to supply A4988
  • 6 -> Ground
  • 15 -> GPIO22, programmable pin
  • 16 -> GPIO23, programmable pin
  • 18 -> GPIO24, programmable pin

Any GPIO can be used as they are all programmable

Transfer Station System

The system is composed of 4 core components, these consist of the tray, tray platform, step motor rail system, and the mount. All components were printed with PLA plastic, and default 3D printer settings. Screws used were the default ones that come with the Hamilton Star, and the default bolts that came with the incubator mount.

Tray

This is holds the 96 well plate (or equivalent size) when delivering the plate to the incubator, and vice versa.

image

Tray Platform

This raises the tray to the needed height for the incubator to be able to reach the plate.

image

Stepper Motor Rail System

This comprises of a stepper motor, connected to a rail system (screw) that spins moving a cart that is already on the screw.

image

Mount

This is what the stepper motor rail system is screwed onto connecting/supporting the stepper motor rail system on the incubator.

image

Assembly

The final assembly consists of:
  1. Screw mount onto incubator with M6 x 12mm screws (x2)

  2. Screw stepper motor rail system to the mount with M3 x 12mm screws (x4)

  3. Screw tray platform onto cart with M4 x 8mm screws (x4)

  4. Slide tray onto pegs on tray platform

image

IMG_2489

Parts List

1. 3D Printed Pieces
  • Mount

  • Tray

  • Tray Stand


2. Screws
  1. A4988 Stepper Motor Drive -> Needs seperate power cable

  1. Raspberry Pi Zero 2 W -> Needs seperate power cable, and male header pins to solder on
  1. Stepper Motor Rail System
  1. Powered USB hub with mini USB connector -> Used for connecting keyboard and mouse to raspbery pi zero 2 w

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages