Skip to content

v1 Mantis pump: prime on a v4 and a v3, recover on a v4, with the drop sensor and input volumes - #1703

Open
BioCam wants to merge 1 commit into
mainfrom
mantis-prime
Open

BioCam wants to merge 1 commit into
mainfrom
mantis-prime

Conversation

@BioCam

@BioCam BioCam commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

The Problem

Pump.prime_chip and Pump.recover_reagent took only a volume and a liquid class for the chip already on the head: every volume had to be spelled out, the drop sensor at the waste was never read, and a v3 refused both, although the v3 captures show its prime.

PR Content

  • prime_chip(chip_number, *, volume=None, liquid_class=None, input_source="tube", verify_sensor=True, drop_detection=None, consecutive_drops=5, max_cycles=None) checks everything first, then picks up the chip in that slot (nothing moves when it is on the head) and primes it.
  • recover_reagent(chip_number, *, volume=None, input_source="tube", liquid_class=None) refuses unless that chip is on the head.
  • Pump.is_primed: set when a prime completes; cleared when a prime starts, by a recovery and by a placement.
  • Without a volume, each takes the input slot's default for input_source from the unit's inputs, else a prime takes the chip's default_prime_volume; a recovery without one refuses.
  • The v4 drop sensor is a feature (Mantis.drop_sensor: drop_detected, consecutive_run, reset). drop_detection primes until consecutive_drops cycles in a row saw a drop, at most max_cycles (the unit's Dispense.config cap), with the waits the device makes; verify_sensor raises after a fixed prime whose sensor saw no drop.
  • A v3 primes a high volume chip as captured: from idle, whole large drops, along a waste path at Z's flag, back to (15, 30) at Z's flag. Anything else on a v3 refuses before it moves; a v3 recovery is not captured and stays refused.
  • The waste path is the one the unit's Dispense.config names.
  • After a failure or a cancel the pressure is released and the head stays where it stopped, possibly in the waste; recover_from_fault brings it back.
  • Tests: the v4 primes, recoveries and drop-detection cycles and waits against the captured ones; a prime's pick-up against the captured slot 1 pick-up; the v3 prime against the captured v3 prime; the default volumes against the captured 100.4 uL prime and 400 uL recovery; refusals that send nothing.
  • design.md and the hello-world notebook: prime and recovery, the choices made where the captures leave one, and the open points.

🤖 Generated with Claude Code

…rop sensor and input volumes

The Problem
Pump.prime_chip and Pump.recover_reagent took only a volume and a liquid class, for the chip on
the head. Every volume had to be spelled out, the drop sensor at the waste was never read, and a
v3 refused both, although v3 captures show its prime.

What changed
- prime_chip(chip_number, *, volume, liquid_class, input_source, verify_sensor, drop_detection,
  consecutive_drops, max_cycles) checks everything first, then picks the chip in slot chip_number
  up (nothing moves when it is on the head) and primes it. recover_reagent(chip_number, *,
  volume, input_source, liquid_class) refuses unless that chip is on the head. Pump.is_primed
  says whether the chip on the head was primed: a prime sets it when it completes, a prime's
  start, a recovery and a placement clear it.
- Without a volume, each takes input slot chip_number's default for input_source from the unit's
  inputs block (System/Inputs/Input<n>.config, now kept per input source); a prime without it the
  chip's default_prime_volume, a recovery refuses.
- The v4 drop sensor (board 12, command 53 at setup; board 0's input 0 per drop) is a feature with
  drop_detected, consecutive_run and reset. drop_detection primes until consecutive_drops cycles
  in a row saw a drop, at most max_cycles (Dispense.config's cap), with the waits of
  260811_startup_dispense_0.5_2.5uL_shutdown; by default it is on
  with a sensor, no volume and a low volume Hi-Fi chip. verify_sensor raises MantisPrimeError after
  a fixed prime whose sensor saw no drop.
- A v3 primes a high volume chip as captured: from idle, whole large drops, along a waste path at
  Z's flag, without the v4's valves-closed write and vacuum 0 step, back along CHIP_CHANGER_ROUTE
  at Z's flag (V3_CHIP_CHANGER_ROUTE); otherwise it refuses and nothing moves. A v3 places its chip
  from where the prime left the head. A v3 recovery is not captured and stays refused.
- The waste path is the file Dispense.config names, as the vendor reads it, else the generation's.
- Tests pin the v4 prime, recovery and drop-detection frames as before, a prime's pick-up against
  the captured slot 1 pick-up, the v3 prime against 260601_homethenprime, and the defaults against
  the captured 100.4 uL prime and 400 uL recovery.
- design.md lists the choices made where the captures leave one, and the open points.
- design.md and the hello-world notebook describe the prime and the recovery and their open points.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BioCam
BioCam requested a review from a team as a code owner November 27, 2026 18:45

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant