Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 2.04 KB

File metadata and controls

83 lines (61 loc) · 2.04 KB

Pressure Syringe Pump

Pressure-control application for a syringe-pump setup using a Fluigent pressure sensor on the PC and an Arduino-controlled stepper motor.

Architecture

  • Python reads pressure from Fluigent.SDK
  • Python sends serial commands to the Arduino
  • Arduino performs stepper moves and returns explicit acknowledgements
  • Closed-loop pressure control runs in Python

Position convention:

  • position 0 is the empty-syringe / plunger-down start
  • B increases tracked position
  • F decreases tracked position

Pressure convention:

  • F raises pressure
  • B lowers pressure

Project Layout

pressure_syringe_pump/
├─ app.py
├─ config.py
├─ control.py
├─ fluigent_reader.py
├─ gui.py
├─ motor_controller.py
├─ pressure_pump_control_app.py
├─ legacy_tests/
└─ syringe_simple_controls_sketch/

Setup

  1. Create and activate a virtual environment.
  2. Install Python dependencies:
pip install -r requirements.txt
  1. Install the Fluigent SDK Python package into the environment.

The Fluigent package is not listed in requirements.txt because it is typically installed from Fluigent's local SDK distribution rather than from PyPI.

  1. Upload the Arduino sketch in pressure_syringe_pump/syringe_simple_controls_sketch/syringe_simple_controls_sketch.ino.

Serial Protocol

Python sends:

  • F100
  • B50
  • ZERO
  • POS?

Arduino replies:

  • READY
  • OK CMD=F100
  • OK CMD=B50
  • DONE POS=1234
  • OK ZERO POS=0
  • POS=1234
  • ERR INVALID_STEPS
  • ERR UNKNOWN_CMD

The Python controller waits for DONE POS=... and OK ZERO POS=... instead of relying on a fixed sleep.

Running the App

From the repo root:

.venv\Scripts\python.exe -m pressure_syringe_pump.app

Or via the compatibility launcher:

.venv\Scripts\python.exe pressure_syringe_pump\pressure_pump_control_app.py