Precision weighing and dosing system for microplate automation.
A Python package for automated gravimetric workflows combining precision weighing, plate handling, and optional CNC or Opentrons integration.
MicroDoser is a weighing station that can optionally integrate with dosing systems:
MicroDoser = Balance + Plate Loader + Optional Dosing System
- ✅ Sartorius Balance - Precision gravimetric measurement
- ✅ Motorized Plate Loader - Automated plate handling with collision avoidance
- ⚙️ CNC Dosing System (optional) - Automated solid dispensing
- ⚙️ Opentrons Integration (future) - Liquid handling support
On Raspberry Pi 5 (default):
git clone https://github.com/AccelerationConsortium/dose_every_well.git
cd dose_every_well
# Install (includes all Raspberry Pi dependencies by default)
pip install -e .On other platforms (development/testing only):
# Hardware features will not work without Raspberry Pi
pip install -e .Manual dosing with automated weighing:
from dose_every_well import MicroDoser
doser = MicroDoser(
balance_port='/dev/ttyUSB1',
plate_type='shallow_plate'
)
doser.load_plate()
input("Add material, press Enter...")
mass = doser.read_balance()
print(f"Mass: {mass * 1000:.2f} mg")
doser.unload_plate()
doser.shutdown()Full automation with gravimetric verification:
from dose_every_well import MicroDoser, CNCDosingSystem
# Initialize dosing system
dosing_system = CNCDosingSystem(cnc_port='/dev/ttyUSB0')
dosing_system.initialize()
# Initialize MicroDoser
doser = MicroDoser(
balance_port='/dev/ttyUSB1',
plate_type='shallow_plate',
dosing_system=dosing_system
)
# Dose with verification
doser.load_plate()
result = doser.dose_to_well('A1', target_mg=5.0)
print(f"Target: {result['target_mg']:.2f} mg, Actual: {result['actual_mg']:.2f} mg")
doser.unload_plate()
doser.shutdown()- Simple, intuitive Python interface for common workflows
- REST API for remote control via HTTP
- Automatic coordination of all hardware components
- Built-in gravimetric verification
- Sartorius balance integration
- Automatic taring and measurement
- mg-level precision
- Motorized loading/unloading
- Collision avoidance for different plate types
- Configurable via YAML
- Measure before and after dosing
- Calculate actual dispensed amount
- Track dosing accuracy
- Works standalone or with CNC
- Future-ready for Opentrons
- Modular architecture
- Comprehensive error handling
- Detailed logging
- Safe shutdown procedures
| Document | Description |
|---|---|
| Quick Start | Installation, setup, and basic usage |
| Python API | Complete Python API reference |
| Web API | REST API service for remote control |
| Architecture & Configuration | System design and configuration |
| Examples | Detailed workflow examples |
Pre-built example scripts in examples/:
# Standalone weighing
python examples/example_standalone.py
# CNC automated dosing
python examples/example_with_cnc.py
# Calibrate flow rate
python examples/example_calibration.py- Raspberry Pi 5 (primary target, or Pi 3/4)
- Sartorius precision balance (USB serial)
- PCA9685 16-channel PWM HAT (I2C 0x40)
- 3× Servo motors (plate loader)
- 5V 5A power supply
- MicroSD card (32GB+ recommended)
- Raspberry Pi OS (64-bit recommended)
- CNC controller (GRBL-compatible, USB serial)
- 1× Servo motor (gate control)
- 1× 5V relay module (motor control)
- 1× DC motor (auger/feeder)
- Opentrons OT-2 robot
- Network connection
┌─────────────────────────────────────────────────┐
│ MicroDoser │
│ (High-level orchestration & coordination) │
└────────┬────────────────────────┬───────────────┘
│ │
┌────▼─────┐ ┌──────▼────────┐
│ Core │ │ Optional │
│Components│ │ Dosing System │
└────┬─────┘ └────────┬───────┘
│ │
┌────▼─────────┐ ┌──────▼────────────┐
│ Balance │ │ CNCDosingSystem │
│ (Sartorius) │ │ (CNC + Solid │
├──────────────┤ │ Doser) │
│ Plate Loader │ └───────────────────┘
│ (PCA9685 + │
│ 3 Servos) │
└──────────────┘
dose_every_well/
├── docs/ # Documentation
│ ├── getting-started.md # Installation & setup
│ ├── api-reference.md # Complete API docs
│ ├── configuration.md # Config guide
│ ├── examples.md # Example workflows
│ └── architecture.md # System design
│
├── examples/ # Example scripts
│ ├── example_standalone.py # Weighing station
│ ├── example_with_cnc.py # Automated dosing
│ └── example_calibration.py # Calibration
│
├── src/dose_every_well/ # Main package
│ ├── core.py # MicroDoser class
│ ├── dosing_system.py # CNCDosingSystem
│ ├── config/ # YAML configs
│ │ ├── standalone.yaml
│ │ └── with_cnc.yaml
│ ├── cnc_controller.py # CNC control
│ ├── plate_loader.py # Plate loader
│ ├── solid_doser.py # Solid doser
│ └── sartorius_balance.py # Balance
│
└── README.md # This file
- User doses materials by hand
- System handles plate loading and weighing
- Ideal for method development
- CNC positions over wells
- Solid doser dispenses material
- Balance verifies each dose
- Ideal for high-throughput workflows
- Opentrons handles liquids
- MicroDoser verifies masses
- Combined liquid/solid experiments
| Platform | Status | Notes |
|---|---|---|
| Raspberry Pi 5 | ✅ Primary Target | Full hardware support with rpi-lgpio |
| Raspberry Pi 3/4 | ✅ Supported | Full hardware support with standard GPIO |
| Linux (Ubuntu/Debian) | Development/CNC control only | |
| macOS / Windows | Development/CNC control only |
Note: This package is designed for Raspberry Pi hardware. Other platforms can be used for development and CNC control, but full functionality requires Raspberry Pi.
Important Safety Practices:
- ✅ Test in simulation before hardware execution
- ✅ Verify movement boundaries match your machine
- ✅ Keep emergency stop accessible
- ✅ Clear work area before automated runs
- ✅ Monitor first runs carefully
- ✅ Python API for direct hardware control
- ✅ REST API for remote control
- ✅ Automated plate loading/unloading
- ✅ Precision gravimetric measurement
- ✅ CNC-based solid dosing
- ✅ Gravimetric verification
- ✅ Auto-start service on boot
- 🔲 Predefined workflow templates
- 🔲 Custom workflow builder
- 🔲 Workflow validation and testing
- 🔲 Batch processing optimization
- 🔲 Error recovery strategies
- 🔲 Workflow logging and replay
- 🔲 PID controller for gravimetric dosing
- 🔲 Real-time weight feedback control
- 🔲 Adaptive dosing based on target
- 🔲 Flow rate auto-adjustment
- 🔲 Precision tuning parameters
- 🔲 Target accuracy improvements
- 🔲 Web-based dashboard for system control
- 🔲 Real-time status monitoring
- 🔲 Interactive well plate visualization
- 🔲 Dosing workflow builder interface
- 🔲 Historical data visualization
- 🔲 Mobile-responsive design
- 🔲 WebSocket support for real-time updates
- 🔲 Job queue for long-running operations
- 🔲 Database logging of all operations
- 🔲 User authentication and authorization
- 🔲 API rate limiting
- 🔲 Multi-user support
- 🔲 Opentrons OT-2 integration
- 🔲 Combined liquid + solid workflows
- 🔲 Unified control interface
- 🔲 Protocol import/export
- 🔲 Iterative dosing with feedback control
- 🔲 Multi-tool support (hot-swappable)
- 🔲 Cloud data synchronization
- 🔲 Machine learning for dose optimization
- 🔲 Integration with LIMS systems
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For major changes, open an issue first to discuss.
This project is licensed under the MIT License - see the LICENSE file for details.
If you use this package in your research, please cite:
@software{dose_every_well,
author = {Cao, Yang},
title = {Dose Every Well: Precision Dosing and Weighing System},
year = {2025},
url = {https://github.com/AccelerationConsortium/dose_every_well}
}Yang Cao
Email: yangcyril.cao@utoronto.ca
Built for laboratory automation workflows with a focus on microplate gravimetric applications.
Need help? Check the documentation or open an issue on GitHub.