Democratizing Ultrasound Hardware: The pic0rick Open-Source Platform
Ultrasound hardware has traditionally been the domain of specialized medical device manufacturers and industrial NDT (Non-Destructive Testing) firms. The high cost of entry—driven by the need for precise timing, high-speed analog-to-digital conversion, and high-voltage pulse generation—has made it difficult for independent researchers and hobbyists to experiment with sonic imaging.
Enter the pic0rick, an open-source hardware platform designed to bring ultrasound acquisition into the realm of accessible, low-cost electronics. By shifting from FPGA-based architectures to the RP2040/RP2350 microcontroller, the project significantly lowers the barrier to entry for anyone interested in pulse-echo systems and tomography.
The Architecture of pic0rick
The pic0rick is not a single board but a modular three-part system designed to handle the entire signal chain of an ultrasound acquisition:
- The Main Board: This is the brain of the operation. It features an RP2040 microcontroller and a 60 Msps 10-bit ADC. To handle the attenuation of ultrasound waves as they travel through materials, it includes an AD8331 Time Gain Compensation (TGC) amplifier, which allows for variable gain (7.5 dB to 55.5 dB) controlled via an SPI DAC.
- The Pulser Board: Ultrasound requires a high-voltage trigger to excite the transducer. This PMOD-based board uses a combination of MD1210 and TC6320 components to generate three-level pulses.
- The HV Board: A dedicated power board that provides the necessary $\pm 25 ext{V}$ rail to the pulser board.
The Signal Chain
The flow of data is deterministic and linear:
RP2040 $\rightarrow$ PIO triggers pulse $\rightarrow$ Pulser board $\rightarrow$ Transducer $\rightarrow$ Echo returns $\rightarrow$ HV clipping (protection) $\rightarrow$ AD8331 TGC $\rightarrow$ 60 Msps ADC $\rightarrow$ RP2040 $\rightarrow$ USB $\rightarrow$ Computer.
Replacing the FPGA with PIO
One of the most significant technical achievements of the pic0rick is the replacement of the Lattice iCE40 FPGA (used in previous iterations like the un0rick and lit3rick) with the RP2040's Programmable Input/Output (PIO) state machines.
In ultrasound acquisition, sub-microsecond timing is critical. Traditionally, this requires an FPGA to ensure that the pulse trigger and the ADC sampling start in perfect synchronization. The RP2040's PIO allows developers to write small, deterministic programs that run at the system clock rate, effectively acting as a "good enough" FPGA for this specific use case.
As one community member noted on Hacker News:
"In many cases it seems to be a PIO is a ‘good enough’ FPGA on absurdly cheap hardware."
By moving to PIO, the project eliminates the need for complex HDL (Hardware Description Language) toolchains like Verilog or VHDL. Users can now modify acquisition timing and pulse patterns using standard C/C++ in an Arduino-like environment, drastically reducing the development cycle.
Extensibility and Use Cases
To ensure the platform remains useful for more than just simple pulse-echo tests, the pic0rick includes double PMOD connectors for various extensions:
- VGA Output: Uses PIO1 to provide real-time visualization of the ultrasound data on a monitor.
- MUX Board: A multiplexer that enables the use of multiple transducers, opening the door to array imaging and synthetic aperture techniques.
- PSRAM: Provides additional memory for longer acquisition buffers, which is essential for imaging deeper objects.
Practical Applications
While the hardware is versatile, the primary applications for this platform include:
- Pulse-Echo Testing: Measuring the distance to an object or detecting flaws in a material.
- Non-Destructive Testing (NDT): Checking for structural integrity in industrial components without damaging them.
- Tomography: Creating cross-sectional images of an object based on ultrasound reflections.
Comparison with Legacy Boards
For those coming from the older un0rick family, the pic0rick represents a shift toward accessibility. While the legacy boards offered full FPGA flexibility and, in some cases (like the lit3-32), a higher gain range of 92 dB, the pic0rick offers the lowest cost and the simplest programming model. It is the recommended starting point for any new project unless extreme gain or FPGA-level timing control is strictly required.
Conclusion
The pic0rick project demonstrates a powerful synergy between open-source hardware and modern microcontroller features. By leveraging the RP2040's PIO, it transforms a complex, high-speed acquisition system into a modular, affordable tool for education and research. Whether you are building a custom NDT scanner or experimenting with sonic imaging, the pic0rick provides a robust, open-source foundation to build upon.