Sonicator
Description
Represents a Qsonica Sonicator tool integrated with the Jubilee system. Controls ultrasonic sonication operations through either a Raspberry Pi Pico (via serial) or a Raspberry Pi Hat (via GPIO + DAC).
Supports precision-controlled sonication at specified power levels, duty cycles, and pulse intervals, including well-based targeting and cleaning protocols.
Constructor
Sonicator(index, name, mode, port=None)| Parameter | Type | Description |
|---|---|---|
index | int | Tool index for the sonicator. |
name | str | Tool name. |
mode | str | 'Pico' or 'Hat' depending on control hardware. |
port | str, optional | Required for 'Pico' mode: serial port path to connect to microcontroller. |
Assertion:
modemust be'Pico'or'Hat'. Assertion:portmust be specified if using'Pico'.
Key Properties
| Property | Type | Description |
|---|---|---|
interface_mode | str | Hardware mode for sonicator control ('Pico' or 'Hat'). |
serial_interface | Serial | Serial interface for Pico communication (if applicable). |
plunge_depth | float | Last used plunge depth into well. |
cleaning | dict | Cleaning protocol settings. |
Important Methods
| Method | Returns | Description |
|---|---|---|
_raspberrypi_hat() | None | Initializes DAC and GPIO for Raspberry Pi Hat control. |
_raspberrypi_pico(port) | None | Sets up serial connection to Pico microcontroller. |
_set_sonication_power(power) | None | Set sonication power level (0.4–1.0). |
_sonication_on() | None | Start sonication. |
_sonication_off() | None | Stop sonication. |
_sonicate(exposure_time, power, pulse_duty_cycle, pulse_interval, verbose) | None | Execute a complete sonication sequence. |
sonicate_well(location, plunge_depth, sonication_time, ...) | None | Sonicate a specific well at controlled depth and timing. |
set_cleaning_protocol(wells, power, time, plunge_depth=None) | None | Define a reusable cleaning sequence. |
perform_cleanining_protocol(plunge_depth=None) | None | Run the defined cleaning sequence across multiple wells. |
Method Details
Set Sonication Power
_set_sonication_power(power)Set the sonication amplitude. Valid range: 0.4 (minimum effective) to 1.0 (maximum).
Perform Sonication
_sonicate(exposure_time, power, pulse_duty_cycle, pulse_interval, verbose)Perform sonication with defined exposure time, pulse frequency, and power level. Handles both continuous and pulsed sonication modes.
Sonicate a Specific Well
sonicate_well(location, plunge_depth, sonication_time, ...)Move to a target well and sonicate at a controlled depth for a specified time.
- Checks if plunge depth is valid.
- Supports autocleaning after sonication.
Set Cleaning Protocol
set_cleaning_protocol(wells, power, time, plunge_depth=None)Define a sequence of cleaning sonications across multiple wells.
Perform Cleaning Protocol
perform_cleanining_protocol(plunge_depth=None)Automatically sonicate across specified wells following the cleaning protocol.
- If
plunge_depthis not specified at call time, uses the preset depth.
Usage Flow Example
# Initialize Sonicator with Pico connection
sonicator = Sonicator(index=1, name="qsonica_tool", mode="Pico", port="/dev/ttyUSB0")
# Sonicate a well at 10 mm depth for 5 seconds
sonicator.sonicate_well(my_target_well, plunge_depth=10, sonication_time=5.0)
# Set a cleaning protocol
sonicator.set_cleaning_protocol(
wells=[well1, well2],
power=[0.5, 0.6],
time=[5, 7],
plunge_depth=10
)
# Run the cleaning sequence
sonicator.perform_cleanining_protocol()Important Notes
- Minimum effective power: 0.4. Below this, the sonicator will not engage.
- Always validate that the plunge depth is appropriate for the target labware.
- Communication latency may occur with serial-controlled sonicators (
Picomode); small wait times are built-in. - Autocleaning protocols are strongly recommended after heavy sonication use to prevent contamination.