
Show HN: FPGA Ultrasound Imaging on a Raspberry Pi - kelu124
http://un0rick.cc/FPGA-Rpi
======
cpfohl
Seems worth mentioning that incorrectly used an ultrasound can burn bones.
(Specific frequencies in bony areas moved too slowly).

I didn't do enough research to understand this (but just enough to verify it).
I learned it initially from my wife who's an NP. When I mentioned a previous
DIY ultrasound article to her she looked skeptical and mentioned the risk of
bone burns.

~~~
carbocation
I have never heard of this being an issue for diagnostic ultrasound. Since I’m
trained in (cardiac) ultrasonography, I think this would have come up... I
also did a brief lit search and didn’t identify any obvious examples.

I suspect your wife is referring to therapeutic ultrasound, which can damage
bone [1]. But this is not the ultrasound people are getting of their heart,
abdomen, or pelvis in general.

1 =
[https://www.ncbi.nlm.nih.gov/m/pubmed/11731056/](https://www.ncbi.nlm.nih.gov/m/pubmed/11731056/)

~~~
lostlogin
US Bio effects of diagnostic US are discussed at (painful) length in
undergraduate radiography training here in New Zealand. We are fairly well
aligned with the UK in our training pathway but in my (limited) experience
echo techs don’t seem to come from a radiography background while ultrasound
ones do. Could be a local situation though. Broadly, the priciples seem to be
ALARM and perhaps don’t do ‘souvenir’ scanning of foetuses. I wonder if
anywhere follows that.

~~~
carbocation
Good point, my training excludes fetal ultrasound, so this might be one reason
yours and mine differ.

------
daxfohl
The github is a little more descriptive and answers a few more questions:
[https://github.com/kelu124/un0rick/](https://github.com/kelu124/un0rick/)
(though don't expect all your questions to be answered here either).

I'm curious what the FPGA approach offers above a regular CPU/DSP approach in
plain English (quod non intellegunt: technerdese attracts followers,
latinnerdese less so). I've been interested in FPGA's since dabbling with them
a couple years ago but haven't come across a use case that's tangibly
beneficial yet. If this is one, I'd love to contribute, but I'm not so far
gleaning that from the docs. Can OP assist here?

~~~
Kelbit
Ultrasound processing is actually pretty niche: you have a whole bunch of
channels with a very high sample rate (tens of MHz). In the case of medical
ultrasound, a typical handheld ultrasound probe can have range from 50 to 150
parallel channels.

Because you need fast, parallel DSP, FPGAs actually really shine for
ultrasound. And because production volumes are relatively low, the NRE to jump
to an ASIC generally isn't justified. Just about every modern ultrasound
machine does signal processing on an FPGA.

~~~
temac
Today a graphic chip is also good to compute ultrasound images. I suspect that
you can even do it on a CPU. I'm not sure if it is _that_ practical to process
in a FPGA if you want to compute non-potato image quality: you would need to
handle tons of data by the FPGA, so either use a gigantic one (with a
ridiculous price) or somehow page the data (but that's quite complex to do
then...) -- this seems way more difficult than simply addressing the GiB that
are avail in any modern CPU/GPU.

~~~
candiodari
Not really: people have reacted to more capacity being available by getting in
more channels. You can control a 1980s 20 channel ultrasound using even an
atom cpu, not a problem (though will still get close to max cpu capacity). So
what did we do ? Well we made chips, I believe the best one now has 4000
channels and there's test models of 8000 channels. A quad xeon can't process
that. But it gets worse.

Because information is encoded both in the direct signal and in the
interference patterns between different probes you'd want to evaluate both of
those (if nothing else it gets you a wider field of view, but really it gets
you more than that, for instance you can get full 3d from a cross-shaped
array). Unfortunately that scales with the square of the number of channels.
This doesn't even work on FPGAs at the moment, so they basically limit
interference processing to only 100 or so of the 1000-2000 probes they have
these days.

This is a problem that keeps coming back. CPUs can do nearly everything in
processing, but with one exception they suck at it.

That means that when doing these things, you can use CPUs, and people are
always pushing that, if you accept to be 2-5 years behind the state of the art
for advanced applications, or you accept that you have to spend 50$ per piece
where others can get more processing done for 1$, or "much less but still
enough" processing done for 0.1$ (FPGA, DSP, microcontrollers, ...).

Good luck in the marketplace if you go CPU.

CPUs work where your complexity is above a quite high lower bound, and they
stop working once you hit a certain level of data processing. Below that lower
bound, they are absurdly expensive. Above the data speed limit they just can't
keep up.

Now there's niches where the strengths of CPUs outcompete other approaches.
For instance, you want to create stuff to interface with ancient equipment.
Lots of that is necessary, and lots of it is custom. For telecom companies,
banks, factories, ... here CPUs and the fact that you can do one at a time are
tough to beat. Sure FPGAs can do it better, but that's not the point here.
They're much harder to design, so a one-off (or couple-dozen-off) designs use
CPUs, plus they're very unlikely to hit the data rate limits.

Even there CPUs tend to have a disadvantage. Lots of environments where these
things have to operate aren't exactly pristinely clean, cooled and free of
static and interference. CPUs don't deal with it half as well as especially
FPGAs do. You want a closed box that has to operate at 70 degrees without
cooking itself with constant electrical arcing around it ? Don't go for a cpu
on a large mainboard. You can't cool because any cooler will get clogged and
destroyed in a matter of weeks at the most.

~~~
Gibbon1
" For instance, you want to create stuff to interface with ancient equipment.
Lots of that is necessary, and lots of it is custom. For telecom companies,
banks, factories, ... here CPUs and the fact that you can do one at a time are
tough to beat. Sure FPGAs can do it better, but that's not the point here."

Guy I worked with had a recurring gig interfacing FPGA's to older Telcom
equipment. Multiplexing multiple gigabit Ethernet channels into one very high
speed channel which then was fed into a microwave up converter. Last and final
one they did the FPGA put out like 25W. I can't imagine doing that with a CPU
of any type.

------
car
An amazing portable US is soon coming from Butterfly Network. The transducer
plus DSP is on a very large integrated circuit, and it can do breathtaking
stuff for a device of this size and cost, like real time Doppler US (show
blood flow in the image).

[https://www.butterflynetwork.com](https://www.butterflynetwork.com)

~~~
projektfu
I'm looking forward to the introduction of this device, but it should be noted
that color Doppler is also available on the VScan handheld. I think MEMS
sensors are going to revolutionize the industry by making the probe an
inexpensive part.

------
rwmj
It uses Project Icestorm which is absolutely great. So much better using an
open source toolchain than the proprietary horrors that FPGA vendors inflict
on us. I wrote a quick intro here:
[https://rwmj.wordpress.com/2018/03/17/playing-with-
picorv32-...](https://rwmj.wordpress.com/2018/03/17/playing-with-picorv32-on-
the-ice40-hx8k-fpga-breakout-board-part-1/)

It's a real shame that larger FPGAs aren't yet supported.

~~~
kelu124
Thanks for sharing this!

------
toasted
Cool project :)

I just got back from shenzhen where I purchased a handheld ultrasound probe
with built-in screen about the size of a really chunky smartphone for $1800
with wifi & connection to ios/android

~~~
doctoboggan
I am very interested in hacking on some ultrasound projects. Do you know if
what you have is available for online purchase anywhere?

~~~
kelu124
OP here -- I had played with a wireless probe and developed a very basic
python framework around it, see
[https://github.com/kelu124/pyUProbe1](https://github.com/kelu124/pyUProbe1) .

Same origin: Shenzen. Very friendly contacts there, always a pleasure to chat
with fabs.

------
projektfu
My understanding is that the probes are the expensive part. The rest is added
value, for sure, but there is something of a monopoly on high quality piezo
crystals used in the probes. This ensures that the current players don't
compete much on price.

~~~
kelu124
As a way to go around this issue, I sense a bit of progress through compressed
sensing, see for example
[http://advances.sciencemag.org/content/3/12/e1701423](http://advances.sciencemag.org/content/3/12/e1701423)
. This would enable one (with enough horsepower) to get 4D imaging with a
single element. This is very early, but I do plan on using this hardware to
test the feasibility of single-piezoelement pseudo-imaging.

