Skip to main content

Hardware drivers for the PUDA platform.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

puda-drivers

Hardware drivers for the PUDA (Physical Unified Device Architecture) platform. This package provides Python interfaces for controlling laboratory automation equipment.

Features

  • Gantry Control: Control G-code compatible motion systems (e.g., QuBot)
  • Liquid Handling: Interface with Sartorius rLINE® pipettes and dispensers
  • Serial Communication: Robust serial port management with automatic reconnection
  • Cross-platform: Works on Linux, macOS, and Windows

Installation

From PyPI

pip install puda-drivers

From Source

git clone https://github.com/zhao-bears/puda-drivers.git
cd puda-drivers
pip install -e .

Quick Start

Gantry Control (GCode)

from puda_drivers.move import GCodeController

# Initialize and connect to a G-code device
gantry = GCodeController(port_name="/dev/ttyACM0", feed=3000)
gantry.connect()

# Home the gantry
gantry.home()

# Move to absolute position
gantry.move_absolute(x=50.0, y=-100.0, z=-10.0)

# Move relative to current position
gantry.move_relative(x=20.0, y=-10.0)

# Query current position
position = gantry.query_position()
print(f"Current position: {position}")

# Disconnect when done
gantry.disconnect()

Liquid Handling (Sartorius)

from puda_drivers.transfer.liquid.sartorius import SartoriusController

# Initialize and connect to pipette
pipette = SartoriusController(port_name="/dev/ttyUSB0")
pipette.connect()
pipette.initialize()

# Attach tip
pipette.attach_tip()

# Aspirate liquid
pipette.aspirate(amount=50.0)  # 50 µL

# Dispense liquid
pipette.dispense(amount=50.0)

# Eject tip
pipette.eject_tip()

# Disconnect when done
pipette.disconnect()

Combined Workflow

from puda_drivers.move import GCodeController
from puda_drivers.transfer.liquid.sartorius import SartoriusController

# Initialize both devices
gantry = GCodeController(port_name="/dev/ttyACM0")
pipette = SartoriusController(port_name="/dev/ttyUSB0")

gantry.connect()
pipette.connect()

# Move to source well
gantry.move_absolute(x=50.0, y=-50.0, z=-20.0)
pipette.aspirate(amount=50.0)

# Move to destination well
gantry.move_absolute(x=150.0, y=-150.0, z=-20.0)
pipette.dispense(amount=50.0)

# Cleanup
pipette.eject_tip()
gantry.disconnect()
pipette.disconnect()

Device Support

Motion Systems

  • QuBot (GCode) - Multi-axis gantry systems compatible with G-code commands
    • Supports X, Y, Z, and A axes
    • Configurable feed rates
    • Position synchronization and homing

Liquid Handling

  • Sartorius rLINE® - Electronic pipettes and robotic dispensers
    • Aspirate and dispense operations
    • Tip attachment and ejection
    • Configurable speeds and volumes

Finding Serial Ports

To discover available serial ports on your system:

from puda_drivers.core import list_serial_ports

# List all available ports
ports = list_serial_ports()
for port, desc, hwid in ports:
    print(f"{port}: {desc} [{hwid}]")

# Filter ports by description
sartorius_ports = list_serial_ports(filter_desc="Sartorius")

Note: The list_ports() method is also available as a static method on SerialController for backward compatibility, but the module-level list_serial_ports() function is the recommended approach.

Requirements

  • Python >= 3.14
  • pyserial >= 3.5
  • See pyproject.toml for full dependency list

Development

Setup Development Environment

# Create virtual environment
uv venv

# Activate virtual environment
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
uv sync

# Install package in editable mode
pip install -e .

Building and Publishing

# Build distribution packages
uv build

# Publish to PyPI
uv publish
# Username: __token__
# Password: <your PyPI API token>

Version Management

# Set version explicitly
uv version 0.0.1

# Bump version (e.g., 1.2.3 -> 1.3.0)
uv bump minor

Documentation

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

puda_drivers-0.0.2.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

puda_drivers-0.0.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file puda_drivers-0.0.2.tar.gz.

File metadata

  • Download URL: puda_drivers-0.0.2.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.17

File hashes

Hashes for puda_drivers-0.0.2.tar.gz
Algorithm Hash digest
SHA256 60110e6769f81a361e83c17d1a65705251eb556a2cd16181823827806c6a5328
MD5 1e5616bbf4b39d13d24916e26ed5b578
BLAKE2b-256 f13dff830793d863f64c59372154b49ad4f342ccb09453cc86cf8d798007e59b

See more details on using hashes here.

File details

Details for the file puda_drivers-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for puda_drivers-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1fddcc4d4a5075ac8afb464902c13c79788e02afdc34f5853e584d7f95e09d05
MD5 73271460f5fa7505f010140f1d707406
BLAKE2b-256 ee8e2fde5d32e506cc34801509f4b5161bded602cc00e71f3baf02cd6f6ced3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page