Hardware Setup Guide¶
Connect and configure Openwater hardware devices.
Overview¶
This guide covers physical hardware setup for OpenLIFU and OpenMOTION platforms.
Simulation Mode Available
You can use all software features in simulation mode without hardware. Hardware is only required for actual experiments.
OpenLIFU Hardware Setup¶
Required Hardware¶
- Ultrasound transducer (H317 or compatible)
- USTX transmit module
- 12V power supply
- USB-C cable (for communication)
- Computer (Windows/Linux recommended)
Connection Steps¶
1. Power Connection¶
- Connect 12V barrel jack to USTX module
- Connect transducer to USTX output
- Connect USB-C cable from USTX to computer
2. Driver Installation¶
- Download FTDI drivers from ftdichip.com
- Install drivers
- Restart computer
- Verify COM port in Device Manager
3. Verify Connection¶
import openlifu
# List available devices
devices = openlifu.hardware.list_devices()
print(f"Found {len(devices)} device(s)")
# Connect to first device
if devices:
ustx = openlifu.hardware.USTX(devices[0])
print(f"Connected to {ustx.get_info()}")
Transducer Configuration¶
import openlifu
# Load transducer configuration
transducer = openlifu.xdc.Transducer('H317')
# Or create custom configuration
custom_transducer = openlifu.xdc.Transducer(
name='Custom',
frequency=500000, # Hz
element_count=256,
element_size=0.001, # meters
)
# Connect hardware
ustx = openlifu.hardware.USTX('COM3') # or '/dev/ttyUSB0'
ustx.set_transducer(transducer)
OpenMOTION Hardware Setup¶
Required Hardware¶
- Optical sensor module
- LED illumination system
- ESP32 controller
- 5V power supply
- USB cable
- Sensor mounting
Connection Steps¶
1. Hardware Assembly¶
- Connect LED system to ESP32
- Connect optical sensor to ESP32
- Connect USB cable to computer
- Power on system
2. Firmware Flash¶
# Clone firmware repository
git clone https://github.com/OpenwaterHealth/motion-sensor-fw.git
cd motion-sensor-fw
# Flash firmware (requires esptool)
pip install esptool
esptool.py --port COM4 write_flash 0x0 firmware.bin
3. Verify Connection¶
import openmotion
# List available sensors
sensors = openmotion.list_sensors()
print(f"Found {len(sensors)} sensor(s)")
# Connect to sensor
if sensors:
sensor = openmotion.Sensor(sensors[0])
print(f"Connected: {sensor.get_info()}")
# Test acquisition
data = sensor.acquire(duration=1.0)
print(f"Acquired {len(data)} samples")
Troubleshooting Hardware¶
OpenLIFU Issues¶
Device not detected:
# Check COM ports (Windows)
import serial.tools.list_ports
ports = serial.tools.list_ports.comports()
for port in ports:
print(f"{port.device}: {port.description}")
Connection errors: - Verify 12V power supply connected - Check USB cable is data-capable (not charge-only) - Try different USB port - Restart device
Transducer not responding: - Check transducer connection to USTX - Verify transducer configuration matches hardware - Test with known-good transducer
OpenMOTION Issues¶
Sensor not found: - Check USB connection - Verify ESP32 powered on (LED should be lit) - Re-flash firmware if needed
Poor signal quality: - Check LED illumination - Verify sensor positioning - Clean optical surfaces - Adjust exposure settings
Calibration¶
OpenLIFU Calibration¶
import openlifu
# Connect to hardware
ustx = openlifu.hardware.USTX('COM3')
# Run calibration sequence
calibration = ustx.calibrate(
reference_hydrophone=True,
water_tank=True
)
# Save calibration
calibration.save('calibration_2025-12-17.json')
OpenMOTION Calibration¶
import openmotion
# Connect to sensor
sensor = openmotion.Sensor('COM4')
# Dark frame calibration
sensor.calibrate_dark(duration=10)
# Flat field calibration
sensor.calibrate_flat(duration=10)
# Save calibration
sensor.save_calibration('motion_calibration.json')
Safety Checklist¶
Before Each Use¶
- Inspect all cables for damage
- Verify power supply voltage (12V for USTX, 5V for ESP32)
- Check transducer/sensor connections
- Test communication before experiment
- Review safety protocols for your application
During Use¶
- Monitor device temperature
- Watch for error messages
- Keep backup power supply available
- Log all experiments
After Use¶
- Disconnect power
- Store hardware properly
- Clean sensors/transducers as needed
- Document any issues
Next Steps¶
✅ Hardware connected!
What's next?
Support¶
Hardware questions?
- GitHub Issues: Hardware issues
- Discord: #hardware channel
- Email: hardware@openwater.health