Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I built a sonar into my surfboard (foobarbecue.github.io)
332 points by foobarbecue on Oct 18, 2021 | hide | past | favorite | 91 comments



If you're interested, a research group at UC Santa Barbara put together an open source web application [1] prototype specifically for doing visualization and mapping of Ping echosounder data from an autonomous surface vessel[2]. You could almost certainly do the same with your set-up once you add a GPS. The data gets written into a GeoJSON FeatureCollection, which can then be imported into the page using OpenLayers and is displayed as a series of points with a color gradient based on the min/max of the imported points.

I did the echosounder integration and data collection, and helped build the mapping app's prototype. If you're interested in trying it out, feel free to reach out (email in profile) and I'd be happy to help!

[1] https://github.com/ucsb-coast-lab/sams-mapping

[2] https://github.com/aqualinkorg/asv


Interesting work. I would have expected the data visualization README to have an example of what you seen when it runs.


Oh cool! Hopefully I'll have time to try this out this weekend.


As a surfer at crowded breaks, I've often thought it would be cool to build a little drone submarine early warning system - it would navigate itself out a half mile or so offshore, just under the surface. Then, when a big set comes, I would get a little buzz from a smart watch or ankle band, and casually paddle out past the crowds and get my pick of the good stuff :)


"Casually paddle out past the crowds" ... C'mon, you know surfers are herd animals! Any hint that of someone paddling further out is likely to trigger a stampede.


So you're saying what I really need is a decoy surfer that I can send further out so I get the nearer spots to myself?


True :) I would have to time it just right.


I used to think about similar things, then I just moved continents. Now I surf breaks where more than one other person is a busy day :)


Can I ask where? I'm in San Clemente (near Trestles) and I've found one break I love that's consistently uncrowded.


Anywhere in the world, with maybe two exceptions, has surf that is less crowded than the OC!


Sweet. I surfed Trestles once a long, LONG time ago :)

I've just come back to Australia. I paddled out at 8am yesterday on a great reef break, the only other surfer joined me after 45 minutes alone. Alone besides the dolphins, that is :)


Can these be identified optically from the air over a wide area? If no, then maybe with a broad lidar sweep looking at returns as wave heights?


I think the image processing required would be a lot more difficult than a little floater that measures its current depth over time.


Not knowing anything about surfing, why can't you casually paddle out anyway, and get your pick of the good stuff when it comes. Do you not know it's good until it's further in?


You can, but there is variability and it's not entirely predictable. So you can be sitting alone out the back waiting for that odd big wave to come along while other smaller waves pass you by and are caught by surfers closer to shore. But you could be waiting 20 minutes between waves, or you could be out there for more than an hour waiting for that bigger wave never comes.


Not a surfer, but isn't the unpredictability part of the joy? I'm an avid amateur photographer and a huge part of the enjoyment comes from the fact that you don't know what you're going to see or when.


It is part of it. But consistent perfect waves is even more joyful.


Kelly’s Surf Ranch has shown that this probably isn’t true after all.


I'd argue to opposite - surfing in the ocean is free, but people pay ridiculous amounts of money to surf at the ranch.


Because you’re probably waiting with the crowd near where the smaller waves are breaking so you can catch those. Some people do just wait further out for the bigger waves, but they miss out on all the smaller waves breaking closer to the beach in the meantime. If you had more warning you could go out before anyone else sees the larger set coming in. Other people will usually see it in time to get there, but you’ll be first in line.

That said, I don’t think it would be worth it. You usually don’t want to take the first wave in a big set anyways, because if you miss it then you can get stuck in the impact zone for the whole set.


Big sets like the one he’s talking about don’t come by very often. If you sat outside waiting, you’d miss 20 minutes of catching smaller waves.

And if you just watch for bigger waves from where you can catch the normal ones, then you’ll have a dozen other guys to fight for it when it comes, since that’s what everybody else is doing.


I wonder when projects like this one, featuring semi-autonomous drones, will become commoditised enough to be feasible. There are lots of cool use cases for agents that wait for an event to happen, or monitor an area, or track something, with the ability to make some rule-based decisions automatically.



Could you share some of your ideas?


A small drone surface boat would be more effective for detecting large swells than a submarine. A neutrally buoyant sub won't feel much difference as a swell passes by. With a surface boat you could use the same sensors as an on NOAA buoy.

A sub would also need a floating antenna on the surface to receive GNSS signals for station keeping, and to transmit alerts. Those signals are blocked by water.


Yeah I'd love to have an "incoming set" warning system... Sub might work, drone might work, boat might work, but I think what you really want is a personal bouy anchored to the seafloor a bit like the NOAA ones, but way closer to shore. Can anyone here comment on the practical, safety and / or legal aspects of doing that?


I’ve often thought about something like this. I think pro surfers could use this to “cheat” (really depends on the rules) in competitions, but would be really nice to have for the casual surfer.


Same problem here. LMK when you get your kickstarter up, I'll be first money in!


Setting up a Kickstarter for this kind of defeats the utility of the device.


This is very impressive.

I have no expertise here, but I was wondering if the low confidence in surf is due to bubbles? (I took a quick look at the transducer and software docs, but did not see anything explicit about the confidence figure.) If it is due to bubbles on the underside of the board, perhaps putting the transducer in the middle or behind would help? If it is due to bubbles in the water column, it reminds me of something I learned about lidar mapping: you may get reflections from the tree canopy, the understory or the ground, but in any small area, one can assume the longest-in-transit is probably the ground (and you can sometimes figure out the height of the other layers as a bonus.)


I have some expertise here (have used sonar under breaking waves) and I'd say you're spot on. Bubbles act like acoustic black holes, they absorb sound like crazy. Whether you're trying to ping through them in the water, or also if they get stuck on the transducer. The lidar analogy seems apt. The OP speculates that wave breaking noise might be causing interference, but the noise will be way lower frequency than the sonar (ie audible frequencies) so masking by bubbles makes more sense. Any new ideas to mitigate this would be a big deal for sonar!

Also, very cool idea and project!


> bubbles act like acoustic black holes, they absorb sound like crazy. Whether you're trying to ping through them in the water, or also if they get stuck on the transducer.

I have no idea about nautical applications but in medical imaging you use a phased array ultrasonic transducer which is really a set of single-beams with deterministic phase firing of the ultrasound.

You could probably implement a similar phased array principle by coupling multiple 'ocean grade' single beams. That would give you both beam directionality and I suspect higher immunity to bubble artefacts if you play with it in the time domain.


Trying to figure out how medical ultrasound works is a rabbit hole I'm still trying to claw my way out of. While there are phased arrays, most handheld imagers you would be familiar with are simply linear arrays of approx 100-150 transducer elements. While there is likely some simple phasing going on with adjacent elements firing together, a better model mental model for these would be the transducers firing one by one to produce a scan of individual beams. Before linear arrays, there was actually a single transducer that mechanically scanned back and forth to produce the same effect.


Air bubbles in the bloodstream show up clearly on medical ultrasound. Doctors use this to diagnose atrial septal defects.


This isn’t as relevant to bubbles but a transducer phased array is what is used in multi-beam echosounders[1], which provide a swath of depth readings perpendicular to the ship’s path.

[1] https://en.m.wikipedia.org/wiki/Multibeam_echosounder


The navy uses the effect of the bubbles being acoustic black holes in their Prarie-Masker[0] system to hide surface ship noise from submarine sonar. To sonar, the system sounds like rain hitting the surface.

[0]https://en.wikipedia.org/wiki/Prairie-Masker


Of course! Bubbles! I didn't even think about that. I'm going out with some goggles next time to see if I can see the bubbles.


Bubbles will come and go, unless you're really in the white water (where you probably aren't interested in depths anyway). You'll likely have success if you make a simple software filter like "take the max depth over the past 30 seconds" with some tweaking. You'll get brief glimpses through clear water that you can capture as actual depths. People do this with sonar from jet skis, so don't despair it's a surmountable problem. (Of course those jet ski systems are big and clunky which is why your stuff is cool.)


>Note: I switch back and forth bewtween imperative tense >(Cut the hole) to first person (I cut the hole) in the below. Imperative is when I’m strongly recommending doing it my way. First person is when I feel like there’s a good chance you could improve on my methods!

I thought this was interesting.


Using imperative mood for normative direction and indicative mood for description of fact that isn't directive is just standard English.


Describing it is a way to more strongly invite, and target, suggestions. I like it.


Do sharks (or other sea predators) respond to sonar? Is this more likely to make you prey or would it actually help with annoying them away?


My first thoughts actually were, that it was build to detect (and maybe drive off) sharks.

And dolphins and co. are sensitive to sonar and you would likely drive them away. Sharks not so much. But I lack detail knowledge.


Sharks are sensitive to electrical signals, so it would be interesting to see if we could generate ones they don't like.


There are lots of shark repellent products already on the market, some of them electric:

https://www.hakaimagazine.com/news/many-shark-repellents-don...

And some of them magnetic, similar to those anti-nausea magnet bands. Some of them work, some don't.

Just waiting for someone with a magnet on their ankle to get it bitten off and sue the manufacturer...


if built into (some) void-free/void-consistent substrates, like high density foams or fiberglass, many sonar transducers can be tuned to ignore the hull and provide feedback of the underwater surface without a 'thru-hull' opening on the underside of the craft.

This is useful for boats, but maybe useful as an idea for a project like this as well?


Yes! I've been considering putting this into one of my hard boards, in which case I'd want to fiberglass over it. I've been wondering how well it would work.


Look up acoustic impedance matching. By analogy, your ultrasound technician needs to smear ky jelly (or similar) on your skin to ensure a good connection between the transducer and your flesh. You need an analogous material to make the sonar transmit efficiently into water. You can get special epoxy that works, but off the shelf fiberglass will likely not be very good.


Are you thinking you could just duct tape one to the top of the board? That certainly seems like a lot less work and a lot less worry about damaging the seaworthiness of the board.


Why not use a ZeroW instead of a 4B... the power consumption is like 7-10x less!

Maybe they are hard to get hold of, but so are the 4B now.


Oops! I did use a Zero W, and I don't know why I wrote it wrong in the table. Thanks for catching.


Seen the battery solution I was confused... but all good in the end. And yes the Pico really is a hard contender to find a worthwhile challenge for, so far the only use I found for it is a keyboard driver. What I would love is a Pico/ESP-like device with a proper OpenGL ES GPU with proportional performance! But I guess it has no real application either.


OP here. Thanks so much for the fun discussion. A few things:

1. I forgot to set the repo to public -- was only meant to be private while I was writing it up! Fixed now.

2. Somehow I put in the table that I used an RPi 4b but this is actually a RPi Zero W.

3. Lots of great related ideas here! One project I've been thinking about lately but would probably work best as a community effort is a a water auto sampler to build into your board for getting an idea of e. coli and stuff e.g. to investigate the "don't surf after a rain".


I wonder if there is some way you could pull data from the sound of the waves breaking instead of an active ping? That might be the only reasonable way to get accurate readings in that zone.


FWIU, EM backscatter can be used for e.g. gesture recognition, heartbeat detection, and metal detection. https://en.wikipedia.org/wiki/Backscatter

Entropy of wave noises may or may not be the issue.

Edit: (NASA spinoff) "Radar Device Detects Heartbeats Trapped under Wreckage" https://spinoff.nasa.gov/Spinoff2018/ps_1.html

> The Edgewood, Maryland-based company is developing a line of such remote sensing devices to aid search and rescue teams, based on advanced radar technologies developed by NASA and refined for this purpose at the Agency’s Jet Propulsion Laboratory (JPL).

> NASA has long analyzed weak radio signals to identify slight physical movements, such as seismic activity seen from low-Earth orbit or minor alterations in a satellite’s path around another planet that might indicate gravity fluctuations, explains Jim Lux, JPL’s task manager for the FINDER project. However, to pick out such faint patterns in the data, these devices must cancel out huge amounts of noise. “The core technology here is measuring a small signal in the context of another larger signal that’s confusing you,” Lux says.

(FWIW, some branches may have helicopters with infrared that they can cost over for disaster relief.)


That could be really interesting. A friend of mine did some volcano seismic tomography this way, using the constant eruptions from the lava lake as a sort of background noise source. The theory used is called "equipartition wave theory" IIRC.


Awesome idea man. As an avid water sports guy and an avid shark phobia guy, could you use sonar to detect large moving objects at distance?


You don’t want to know. There are probably a lot more sharks near where people swim than you realize, but they generally aren’t interested in us.


There are some sweet side scan sonar systems that send out ~ 200khz chirps to give you a pretty good picture of the sea floor. It might make for a nice map of the bottom, but I think they are a bit pricey.

https://www.google.com/search?q=side+scan+sonar+images&clien...

My depth sounder doesn’t like water that churned up with sand (e.g. prop wash + sandy bottom). Maybe the waves are kicking up sand around the break?


Super cool project!

At first I was thinking how hard it must to get value from the confidence reading in real-time. But I was imagining looking at readings while riding a wave. That was silly of me. I guess you use it while paddling, don't you.

One thought, would etiquette allow you to change the links to smile.amazon.com/... ?

Maybe even suggest Surfrider?

https://www.surfrider.org/coastal-blog/entry/give-a-gift-wit... /



This is a really cool project! Thanks for sharing.


This is technically very cool, but (as someone who surfs himself)for the purposes of surfing it strikes me as pretty useless. If you spend enough time surfing you learn how to read the water in a way that will tell you much more than this device ever will.


But in general you can only learn by getting confirmation or rejection.

I mean, it is nice to learn how to see a sandbank by the way waves break. But you only know that the waves break that way on a bank, if there is confirmation of that bank. On many surfspots, this knowldge is often handed down: maybe a diver checked the rocks below, maybe someone saw it during clear water etc.

So anything that confirms 'yes, you are right, waves are breaking there, because there ís a bank at X' is, IMO useful.


Does this "Ping Sonar" thing do side scans?

I actually don't really understand the mechanics/mathematics of sidescanning, but it produces some compelling images. I'm not sure if it's feasible at this price point though


They do sell a scanning one, but it's $2k instead of $300, and big enough to be a little more annoying to get into the surfboard. It'd be fun to have though!


The 2K one is a mechanically rotating thing. I don't think that's sidescan - though I could be wrong.


Ah right. I don't actually know how sidescan works -- phased array or sth?


Yeah, I was hoping someone would chime in and explain. I'm honestly not quite sure. This is one of those things where all the explanations are very hand-wavey

https://en.wikipedia.org/wiki/Side-scan_sonar

"The intensity of the acoustic reflections from the seafloor of this fan-shaped beam is recorded in a series of cross-track slices. [..] Next the transducers evolved to fan-shaped beams to produce a better "sonogram" or sonar image"

Okay.. but how does it actually accomplish that..? My initial guess was that it's one transmitter and then an small array of receivers (to make a phased array) - however subsequent descriptions seems to say it can be accomplished with one transceiver

"The earliest side-scan sonars used a single conical-beam transducer"

Maybe a synthetic aperture...? Though the descriptions don't seem to match that either - and it describes it being directly drawn on paper "The early paper records were produced with a sweeping plotter that burned the image into a scrolling paper record".

I've also had zero luck trying to find the math behind synthetic apertures (radar/sonar)


$42 for a USB to UART adapter???


Crazy! Looking just now, there are a bunch on eBay around AU$8!


I love this so much.


Side thought: if you had a little buddy drone you tossed into the water (torpedo type) talked to your surfboard, that would be neat.


I worked on a project that did this for the Navy while I was in university 20 years ago. Handheld units and buoys could get other's range and send text messages with sonic clicks.


That's really cool, yeah that seems to be a thing you have to deal with the changing medium (air and water).


Very cool. At first I assumed it would show you what else is swimming beneath you... something I think might be best left unknown.


You can get little transducers from Garmin/Raymarine that will render a 3D view on your chart-plotter where you can pick out individual fish swimming beneath you in real-time.


Years ago I was a quarter mile off shore at Bolinas. I was just on my body board.

This was before I knew about the amount of sharks out there.

I told my chain smoking buddy to hold on to my Bullmastiff. She was at least 160lbs.

I casually noticed black shadows under my board. I thought maybe Batrays. I thought if it was a shark, I'd see the fins. (Wasn't thinking right. Recovering from a nervous breakdown.)

All of a sudden I see my dog swimming towards me. I didn't even know she could swim. They were both just tiny specks at the beach, but she was coming out.

I paddled towards her. We met in the middle. She put her two paws on my board, and we both kicked in. She was tired, and panting.

I got to shore feeling relieved. My buddy said he saw a fin moving towards my dog when she was swimming out.

I haven't been out since.


To me it seems its working perfectly. 0 confidence on the surfing spots means you just have to look at the other number :)


Some UX/UI design comment: The screen is oriented to be read from the side - why not from where the user is?


It looks like it was fixed already:

> (yes, I’ve rotated the text to the correct direction since then)

However, on the page I find the plot pretty hard to read. How about plotting the confidence as the color of the distance?


he might have updated this recently, but right under the picture it reads

"(yes, I’ve rotated the text to the correct direction since then)"


This is surely a fun niche to build a startup around. Have this problem been addressed commercially before?


Yeah actually I considered just using a commercial "fish finder" which is common on boats. Probably could have made that work, but generally their display units aren't waterproof enough to submerse, they want 12V power, and they're not a great size / form factor for a surfboard.


Most boats have depth finders


I used to read about how to make sounds which frightened sharks away


I'd want one to warn me if there is a shark nearby. =)


It’s a shame no ones built a sonar transducer from scratch.


Super cool!

P.s. it seems the repo with the code is private.


Oops!!! I'll fix it


Brilliant work, well done.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: