Giter Site home page Giter Site logo

hackable-syringe-pump's Introduction

###Hackable Syringe Pump

If you want to be able to control an open source syringe pump

  • with an arduino
  • using python
  • with others
  • from anywhere

this will show you how. This modifies the open-source syringe pump (also found here) by Michigan Tech's Open Sustainability Technology Lab to use Arduino, not Raspberry Pi. Python is then used to control the motor through pithy and nodeforwarder.

###Code Examples

Instead of calculating the rpm and steps needed to control a motor, this program takes in any 2 of the following:

  • volume (mL)
  • time (min)
  • flowrate (mL/min)

calculates the remaining parameter and automatically runs the motor at the required speed and steps.

For example,

syringe(‘forward’, time=0.7, volume=10)

will push the syringe forward for 0.7 minutes (42 seconds) to dispense 10mL of liquid. The motor moves 8400 steps at 60 rpm.

syringe(direction[, time=0, volume=0, flowrate=0])

The function syringe only has 1 required parameter, direction, which is either ‘forward’ or ‘backward’. The other three default to 0 and will be changed when given.

###How it Works

Pithy writes a string to a url, which acts like a serialport thanks to nodeforwarder. Arduino then reads off the serialport and runs the motor accordingly.

###Building the Pump

Please refer to the instructions from Michigan Tech to build the open-source syringe pump.

Also refer to the documentation file for more specific details on how we printed ours.

###Additional Hardware

In addition to the parts needed to build the syringe pump, the parts for the arduino / pithy controller include:

  • Arduino Uno (we used R3, but any version works)
  • Adafruit Motor Shield v2
  • Micro-USB adaptor cable (to connect the board to the computer)
  • 4 wires to connect motor to motor shield

Attach the Adafruit Motor Shield onto the Arduino, and attach the syringe pump motor to the M3 and M4 motor ports on the shield.

###Software Prerequisites

To run this, you will need:

###Software Installation

  1. Download nodeforwarder and follow directions. Note: our arduino code uses a serial speed of 9600.
  2. Download pithy and follow directions.
  3. Clone this repository
  4. If a serialport is open using nodeforwarder, close it, as only one thing can talk to the serialport at one time. Then download sketch_aug04a_workingstepper to the arduino. The serialport should read “Stepper test successful!”
  5. Open a serialport on 9005 (or whatever number, just remember to change it in pithy) using nodeforwarder.
  6. Open syringe.py using pithy and run the code.

And that’s it!

###Special thanks to

hackable-syringe-pump's People

Contributors

lindseycadamson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.