What is this project? (@description Pitch/Intro of the project)
This project has a specific target of providing a low-cost, open source technological kit to allow scientists, academics, hackers, makers or OSHW fans to hack their way to ultrasound imaging - below 500$ - at home, with no specific equipment required. For complementary sources of information, you can visit:
- the github repo, for the source files, raw data and raw experiment logs;
- the online manual/book for a easily readable and searchable archive of the whole work;
- the hackaday page, where I tried to blog day-to-day experiments in a casual format;
- an article summarizing the experiment on the Journal of Open Hardware - DOI:10.5334/joh.2;
- the slack channel if you want to discuss;
- the Tindie store for the analog processing unit and the unipolar pulser or the motherboard.
- And of course, the ice40 research board, on un0rick.cc and its doc or even its github. It's a bit cheaper, and has better specs.
- Disclaimer #0: This is not a medical ultrasound scanner! It's a development kit that can be used for pedagogical and academic purposes - possible immediate use as a non-destructive testing (NDT) tool, for example in metallurgical crack analysis. As in all electronics, be careful.
- Disclaimer #1: though an engineer, this project is the first of its sort, I never did something related. It's all but a finalized product.
- Disclaimer #2: Ultrasound raises questions. In case you build a scanner, use caution and good sense!
- Disclaimer #3: This project is not part of echopen.
Principles of ultrasound imaging
General principles of ultrasound imaging
Using echoes to map interfaces
Medical ultrasound is based on the use of high frequency sound to aid in the diagnosis and treatment of patients. Ultrasound frequencies range from 2 MHz to approximately 15 MHz, although even higher frequencies may be used in some situations.
The ultrasound beam originates from mechanical oscillations of numerous crystals in a transducer, which are excited by electrical pulses (piezoelectric effect). The transducer converts one type of energy into another (electrical <--> mechanical/sound).
The ultrasound waves (pulses of sound) are sent from the transducer, propagate through different tissues, and then return to the transducer as reflected echoes when crossing an interface. The returned echoes are converted back into electrical impulses by the transducer crystals and are further processed - mostly to extract the enveloppe of the signal, a process that transforms the electrical signal in an image - in order to form the ultrasound image presented on the screen.
Ultrasound waves are reflected at the surfaces between the tissues of different density, the reflection being proportional to the difference in impedance. If the difference in density is increased, the proportion of reflected sound is increased and the proportion of transmitted sound is proportionately decreased.
If the difference in tissue density is very different, then sound is completely reflected, resulting in total acoustic shadowing. Acoustic shadowing is present behind bones, calculi (stones in kidneys, gallbladder, etc.) and air (intestinal gas). Echoes are not produced on the other hand if there is no difference in a tissue or between tissues. Homogenous fluids like blood, bile, urine, contents of simple cysts, ascites and pleural effusion are seen as echo-free structures.
Creating a 2D image
If the process is repeated with the probe sweeping the area to image, one can build a 2D image. In practice, in the setups we'll be discussing, this sweep is done with a transducer coupled to a servo, or using a probe that has an built-in motor to create the sweep.
A critical component of this system is the ultrasound transducer. A typical ultrasound imaging system uses a wide variety of transducers optimized for specific diagnostic applications, but in our case, we'll limit the costs.
A digital transmit beamformer typically generates the necessary digital transmit signals with the proper timing and phase to produce a focused transmit signal. High-voltage pulsers quickly switch the transducer element to the appropriate programmable high-voltage supplies to generate the transmit waveform. To generate a simple bipolar transmit waveform, a transmit pulser alternately connects the element to a positive and negative transmit supply voltage controlled by the digital beamformer. More complex realizations allow connections to multiple supplies and ground in order to generate more complex multilevel waveforms with better characteristics.
The LNA in the receiver must have excellent noise performance and sufficient gain. In a properly designed receiver the LNA will generally determine the noise performance of the full receiver.
The VGA, sometimes called a time gain control (TGC) amplifier, provides the receiver with sufficient dynamic range over the full receive cycle. Ultrasound signals propagate in the body at approximately 1540 meters per second and attenuate at a rate of about 1.4dB/cm-MHz roundtrip. Immediately after an acoustic transmit pulse, the received "echo" signal at the LNA's input can be as large as 0.5VP-P. This signal quickly decays to the thermal noise floor of the transducer element. The dynamic range required to receive this signal is approximately 100dB to 110dB, and is well beyond the range of a realistic ADC. As a result, a VGA is used to map this signal into the ADC. A VGA with approximately 30dB to 40dB of gain is necessary to map the received signal into a typical 12-bit ADC used in this application. The gain is ramped as a function of time (i.e., "time gain control") to accomplish this dynamic range mapping.
The AAF in the receive chain keeps high-frequency noise and extraneous signals that are beyond the normal maximum imaging frequencies from being aliased back to baseband by the ADC. Many times an adjustable AAF is provided in the design. To avoid aliasing and to preserve the time-domain response of the signal, the filter itself needs to attenuate signals beyond the first Nyquist zone. For this reason Butterworth or higher-order Bessel filters are used.
The ADC used in this application is typically a 12-bit device running from 40Msps to 60Msps. This converter provides the necessary instantaneous dynamic range at acceptable cost and power levels. In a properly designed receiver, this ADC should limit the instantaneous SNR of the receiver. As previously mentioned, however, limitations in the poor-performing VGAs many times limit receiver SNR performance
Ultrasound hardware structure
(@description Short description of the organization of modules)
To produce an image, the modules have to create a high voltage pulse, which excites a transducer. Echoes coming from the body are amplified using a TGC + LNA, which cleans the analog signal, which itself gets digitalized.
The diagram is represented below:
Un0rick, the ice40 board
Why a FPGA board ?
Non destructive testing and imaging ultrasound modalities have been around since the '50s in . More and more ultrasound-based initiative are emerging, mostly focusing on image processing - while hardware has been left behind. Several teams have produced succesful designs for the different possible uses, mostly efforts from research laboratories. Most have been used on commercial US scanners, traditionaly used as experiment platforms, but they are not cheap, and yield very little in terms of data access and control. Others have been developped in labs, but, sadly, very few have been open-sourced. Let's tackle this!
It has also been shown that simple (be it low-power, low-cost and small) can be achieved - and this, even for relatively complex systems, based on 16 to 64 parallel channels front-end processing and software back-end processing (embedded PC or DSP). This makes it a bit more complex for the layman, hobbyist, or non-specialist researcher to use, not to mention the very little information that is accessible.
Hardware specifications and features
- FPGA: Lattice iCE40HX4K - TQFP 144 Package
- 8 Mbit SRAM, 10ns, 512 k x 16, equivalent:
- 65 full lines of 120us at 64Msps
- 840 lines of 120us at 10Msps, 8 bits
- 8 Mb SPI Flash for FPGA configuration
- Ultrasound processing:
- VGA: AD8331 controled by DAC
- Pulser: MD1210 + TC6320
- ADC: 65Msps ADC10065
- 10 bits of data / sample
- 2 bits of line counters
- 4 bits of IOs (counters, ...)
- Parameters: Settings programable via USB or Raspberry Pi
- Type of acquisition (one line / set of lines)
- Number of lines
- Length of lines acquisitions
- Delay between acquisitions
- Pulse width
- Delay between pulse and beginning of acquisitions
- 200us time-gain-compensation programmable (8 bits, from 0 to Max), every 5us
- 2 x Pmod connectors
- SMA plug for transducers
- RPi GPIO
- User Interfaces:
- 2 x PMOD for IOs
- 3 x push button (with software noise debouncing)
- Jumpers for high voltage selection
- Input Voltage:
- 5 V from RPi or USB
- Uses 350mA-450mA at 5V
- Fully Open Source:
- Hardware: github repository
- Software: github repository
- Toolchain: Project IceStorm
- Documentation: gitbook
- Operating Voltage:
- FPGA and logics at at 3.3 V
- High voltage at 25V, 50V, 75V
- Dimensions: @todo!
- Weight: @todo!
|ADC||20Msps||1Msps to 24Msps||65Msps up to 100Msps|
|Onboard memory||300 Mb||10 Mb||20Mb|
|Price of a set||400$||450$||400$|
What are the arduino-like ultrasound module ?
Creating modules to facilitate ultrasound hacking : the principles of the echOmods is to enable a full chain of ultrasound image processing and hardware control.
We have chosen to use a module approach to make sure that each key component inside ultrasound image processing can easily be replaced and compared with another module, while providing logical logic blocks and corresponding interfaces for these modules to communicate. There's a module for high-voltage pulsing, one for the transducer, one for the analog processing, one for data acquisiton, ... and many more!
What images does it give ?
What does it look like?
The modules sit on a breadboard, and communicate through the tracks laying below. The configuration represented below show the Basic dev kit.
and used in a wider context:
A recap of the modules
|wirephantom: Just a phantom for calibrated signals||
|elmo: The aim of this module is to achieve 20Msps, at 9bits or more.||
|doj: Getting a motherboard: that's fitting all the modules in an easy way, with an easy access to all tracks. See this for the Kicad files.|
|matty: The aim is to summarize all modules in a all-inclusive board. Fast ADC, good load of memory, good SNR.. the not-so-DIY module, as it comes already assembled with nothing to do =)|
|retroATL3: The aim of this echOmod is to get the mechanical movement of the piezos. Salvaged from a former ATL3.||
|goblin: The aim of this echOmod is to get the signal coming back from a transducer, and to deliver the signal, analogically processed, with all steps accessible to hackers.||
|lite.tbo: The aim of this echOmod is to get the HV Pulse done.||
|silent: The aim of this echOmod is to simulate a raw signal that would come from the piezo and analog chain.||
List of experiments
- 2016-08-09: Goblin tests: Testing the goblin board with the silent emulator. (20160809a)
- 2016-08-14: RPi: Testing the acquisition with the BeagleBone DAQ. (20160814a)
- 2016-08-22: BBB+Probe: Images acquired from a BeagleBone black with a probe (20160822a)
- 2016-12-17: Croaker: Testing the acquisition with the croaker module. (20161217a)
- 2017-06-11: Croaker: Testing the acquisition with the croaker module. (20170611a)
- 2017-07-13: Elmo: Testing the new DAQ with two ADCs. (20170713a)
- 2017-07-15: RetroATL3 acquisition: Getting an image from the retroATL3 probe. (20170715a)
- 2017-09-30: Alt.tbo: Testing new pulser again 1/4 (20170930a)
- 2017-10-01: Alt.tbo: Testing new pulser again 2/4 (20171001a)
- 2017-10-01: Alt.tbo: Testing new pulser again 3/4 (20171001b)
- 2017-11-11: Alt.tbo: Testing new pulser again 4/4 (20171111a)
- 2017-11-12: Probe: Testing new probe with new pulser (20171112a)
- 2017-11-24: Impedance matching: Doing some tests for impedance matching. (20171124a)
- 2018-01-03: Felix experiment: Testing Felix setup with previous Bomanz module. (20180103a)
- 2018-01-15: Matty: Receiving the first matty. (20180115a)
- 2018-02-16: Alt.tbo and Elmo: Testing alt.tbo and elmo new boards. (20180216a)
- 2018-02-17: Alt.tbo and Elmo: Testing alt.tbo and elmo new boards for pulser issues (there is not positive and negative pulse, only goes in direction). (20180217a)
- 2018-02-24: Matty speed tests: Testing matty s acquisition at different speed, 12Msps to 24Msps. (20180224a)
- 2018-02-24: Matty Gain: Testing matty's fixed gain settings. (20180224b)
- 2018-02-25: Matty and RetroATL3: Acquisition of a probe image with matty. (20180225a)
- 2018-03-10: Matty DAQ: testing the programmation of matty DAC control for the TGC. (20180310a)
- 2018-04-03: Voltage checks: Testing matty at different voltages. (20180403a)
- 2018-04-03: Matty TGC test: Testing matty 's TGC, including playing with the gain DAC and pulse control. (20180403b)
- 2018-04-03: Tomas first acq: Tomas, a user, is getting a first image from a NDT setup with a block of steel. (20180403t)
- 2018-04-15: Test of new batch 1/2: Testing the goblin board with silent, then test of the new lite.tbo pulser with a piezo. (20180415a)
- 2018-04-15: Test of new batch 2/2: Testing the lite.tbo, goblin and elmo boards done at the fab - on a doj v2 motherboard. (20180415r)
- 2018-04-17: echomods vs MATTY: Comparing the performances of the modules vs the FPGA board Matty (20180417a)
- 2018-04-30: JSON and Servo: Better file management and servo control using Matty. (20180430a)
- 2018-05-06: SPI timing on Raspberry: Checking SPI bottlenecks on Matty (20180506a)
- 2018-05-11: Enveloppe detection: Checking different ways to rebuild enveloppe (20180511a)
- 2018-05-16: Matty file format: Testing to format the data for experiments to be easily reproduced (20180516a)
- 2018-06-20: Uwe setup: Testing ADC with Uwe setup with elmo and a 250khz source (20180620a)
- 2018-07-21: pyUn0 python lib and TGC: Testing class-approach for acquisition and processing. Also tested Gain setup. (20180721a)
- 2018-08-07: ADR Ultrasound probe: Photo reportage of opening an ADR Ultrasound probe. (20180807a)
- 2018-08-07: InterspecApogee: Opening an InterspecApogee probe (20180807b)
- 2018-08-09: kretz AW14/5B/A: Opening a kretz AW14/5B/A ultrasound probe (20180809a)
- 2018-08-09: Ausonics 7.5MHz probe: Getting in a Ausonics 7.5MHz probe (20180809b)
- 2018-08-11: Kretz-Echo: Find echoes on a kretzaw145ba probe (20180811a)
- 2018-08-11: Kretz-Motors: Finding the motors on a kretzaw145ba probe (20180811b)
- 2018-08-12: KretzImage: Getting an image with a kretz AW14/5B/A ultrasound probe (20180812a)
- 2018-08-13: pyUn0 lib glitches: Experiment to capture glitches. Now captured (bugs with timing), pending is increasing NCycles above a 8 bit count. (20180813a)
- 2018-08-14: Reaching 128msps: Trying to experiment getting 128Msps (20180814a)
- 2018-08-25: 2D images building: Testing new functions to unpack images (with N lines) (20180825a)
- 2018-08-26: 16bits n-cycles: Testing if the 16bits n cycles works (20180826a)
- 2018-08-31: wirephantom and retroATL3: wirephantom and retroATL3 (20180831c)
- 2018-09-01: wirephantom and kretzaw145ba: wirephantom and kretzaw145ba (20180901a)
Here's a couple of things we're working on, for which you could help as well.
- Boosting the 6Msps croaker acquisition (see Wayne?) to the full 6Msps
Todos from Modules
- None (in wirephantom)
- See the next steps (in matty)
- Having it work with a retroATL3 (in matty)
- Test Goblin v2 (in goblin)
- Review a bipolar design (originally alt.tbo -- but double the components and hence the price) (in lite.tbo)
Todos from worklog
- Add a documentation server
- Display IP on the OLED.
- test some compressed sensing using golay codes on a single element piezo
- senjak 15:07 In Which a PDF is a Git Repository Containing its own Latex Source and a Copy of Itself -- https://github.com/ESultanik/PDFGitPolyglot/blob/master/make_polyglot.sh
- classifier articles with link Article: =)
- a page sumarizing the experiments (as in the Experiments page in the gitbook)
- use General Design Procedure for Free and Open-Source Hardware for Scientific Equipment as a reference
- for matty Rip this intro?
- decrypt the connector for the Bard probe
- Loved Nasa: add to un0rick
- Community: list the contributors in a page + add the experiment. Individual page to point to experiment.
- Rewrite the Chapters Readme -> "This chapter is dedicated to the brain_dumps "
- contact the author !
- contact the guys from https://www.iith.ac.in/~raji/Cpapers/LPFB.pdf (check their prices)
- add Anna and Matthew to users list
- idea for the ultrasound phat : QuietShark (see https://twitter.com/Dymaxion/status/962385327599112193?s=19 )
- Add new un0rick code, and documentation (both FPGA side, FPGA SPI level, Python)
- article un0rick article and pics
- add the MSAS principles to the un0rick article
- try and get to artsens
- ebay Follow up Having a go on babay at a "ATL 720A", and two unspecified 5 and 10MHz probes.
- ebay followup on 720, 724, AUSONICS
- document ATL Apogee Ultrasound, ATL ADR 5.5 MHz / 7 mm
- get in touch with this teardown : http://electronicsplayground.blogspot.com/2018/02/toshiba-ultrasound-machine-teardown.html
- ebay Followup on the DIASONICS C PROBE FREQUENCY 10 MHZ P/N 100-1071-00 S/N 1466
- use MAX5025 to test a HV runner ?
- Check for un0rick github badges, such as
The echOmods project and its prototypes are open hardware, and working with open-hardware components.
Licensed under TAPR Open Hardware License (www.tapr.org/OHL)
Copyright Kelu124 (email@example.com) 2015-2018
The following work is base on a previous TAPR project, Murgen - and respects its TAPR license.
Copyright Kelu124 (firstname.lastname@example.org) 2015-2018
This project is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE.
A recap of our retired modules
|sleepy: The aim of this echOmod is to encase the whole modules object in a neat case, making it transportable.||
|tobo: The aim of this echOmod is to get the HV Pulse done.||
|alt.tbo: The aim of this echOmod is to get the HV Pulse done.||
|cletus: The aim of this module is to interface the transducer and the servo, aka the physical parts, to the analog part of the modules chain. More to come with the Loftus head.||
|tomtom: The aim of this echOmod is to digitalize the signal, and to control the pulser, servo, ...||
|oneeye: The module aims at making a microcontroler, for the moment the
|croaker: The aim of this echOmod is to receive the signal and process it, then stream it over wifi.||
|toadkiller: The aim of this echOmod is to simulate the enveloppe (or maybe soon the raw signal) that would come from the piezo and analog chain.||
|retro10PV: The aim of this echOmod is to get the mechanical movement of the piezos. Salvaged from a former ATL10PV.||
|loftus: The aim of this module is to recycle a previous head||
|mogaba: The aim of this echOmod is to get 3.3V and 5V done.||
Progress on modules
Progress on building the modules
Note that the 'BONUS!' represents something that could be done, and does not count as a strict TODO.
|Name of module||ToDo||Done||Progress|
(@autogenerated - invisible comment)