Level to HN: I constructed a sonar into my surfboard

Level to HN: I constructed a sonar into my surfboard

code is here

writeup finest viewed here

Table of Contents

(yes, I’ve rotated the text to the finest route since then)

Out browsing, I in general wonder how deep the water is, and suspect in accordance with wave habits that I’m over a deep place or a shallow place. Waves in general fracture after they enter shallow water (there are heaps of conflicting formula for knowing exactly how shallow). At beach breaks care for San Onofre Bluffs, the correct space to depend on an even wave is good over a sandbar, and the sandbars can cross round from day to day.

In some unspecified time in the future I made a decision to conclude wondering and discover. I figured I may perchance perchance perchance perchance create a depth sensing sonar into my board and perchance I’d study a thing or two about the sand under me, the dynamics of waves, and even most seemingly enhance my browsing. Along the plot in which I also learned some things about my surfboard, glue, wireless energy, and loads others. It became as soon as fun and it if truth be told works so I figured I’d fragment all the cramped print here.

  • Phillips screwdriver
  • Drill
  • Largeish drill bit
  • 1 3/4” Hole noticed (or a puny bigger I enlighten if you happen to will stumble on one)
  • Little noticed (the one on my Leatherman Wave labored neatly)
  • Dremel (I extinct the Dremel Lite. It’s pretty lame. I miss my dawdle-in Dremel which I gave away.)

Substances

Merchandise Producer Model Supply Designate Statement
Computer Raspberry Pi 4b     I started with the Pi Pico, however upgraded as soon as I noticed: a) The python libraries for the sonar would need most important transform b) It’d be reasonably nice to agree with wifi
Battery diagram PiSugar S amazon $29  
Level to Waveshare 2.13inch_e-Paper_HAT amazon $25 Appears to be to be like expansive outdoors within the sun. Somewhat slow to refresh.
Sensor Blue Robotics Ping Sonar (Ping2D) Blue Robotics $279 The model of this I sold had potted connectors on each and every ends, which became as soon as a puny of a distress to install in a board. With mine, I had to diminish a trench within the board to position the cable in there, and it became as soon as powerful longer than wanted. I figured that became all over again uncomplicated than reducing, soldering and being concerned about waterproofing the joint. Since then they’ve upgraded the sensor-aspect connector to a WetLink Pentrator – appears to be like plot extra convenient. The price has gone up a puny, presumably to yarn for the connector.
Serial to USB adapter (FTDI) Blue Robotics BLUART Blue Robotics $42 It’s seemingly you’ll perchance perchance perchance perchance potentially skip this and use a UART on the RPi
Enclosure Polycase WC-21 Polycase $12.51  
Glue Gorilla Long-established     You’d like normal, no longer definite, for repairing boards. The adaptation is normal expands (foams up) when atmosphere and fills on hand house. Here’s very finest if you happen to choose to “grow into” the foam.
Surfboard Decide Surf Odysea Log 6’0 Decide surf store here in SC   I agonized over which of my boards to utilize and within the cease made up our minds on the foamie due to 1) It’s what I coast when the circumstances are if truth be told depraved and that’s as soon as I would need time to listen to a tool. 2) Unsightly circumstances are as soon as I will most use the extra serve from a magic sandbar-spotter.
Wireless energy receiver HOMEFUNTIME Rapid QI Receiver amazon 15 Sold in packs of two however you easiest need one. Then all over again, I decrease off the outer foil layer to intention it fit higher and it took two tries to discover that right, so I became as soon as overjoyed that I got pressured into buying two!
Wireless energy transmitter TOZO W1 amazon $20  
USB cable CableCreation Micro USB to Micro USB OTG amazon $8 I created something care for this by cutting and soldering two micro USB cables collectively (with impeccable heatshrink in truth) and it labored firstly, however then easiest intermittently. I switched to combining a male micro to female USB-A cable with a routine USB-A to micro usb cable. I went by various combinations of such cables that regarded care for they could perchance perchance perchance composed work with no very finest fortune before finding one which did. In the cease I attempted buying this puny cable which has been reliable.
Grease         May perchance perchance perchance no longer be wanted, however there became as soon as a puny water within the route of the enclosure after I tested it in a single day in a shower so I added it to the gaskets. No proof of any leaking since then. I extinct a “single serving” packet of bike chain grease that came with my Aventon ebike.
Dessicant Aquapapa 2 gram silica gel amazon $8.53 / 100  
Velcro 3M       Any velcro would work beautiful potentially
Mounting tape Scotch 108-SML amazon $16.53 for an limitless provide  
Silicone sealant          

Recipe

Imprint: I swap motivate and forth bewtween imperative disturbing (Prick the outlet) to first person (I decrease the outlet) within the under. Crucial is as soon as I’m strongly recommending doing it my plot. First person is as soon as I feel care for there’s an even probability you would enhance on my systems!

  1. Spot up the RPi. Burn Raspberry Pi OS / Debian Buster to an sd card. Mount it and originate a wpa_supplicant.conf for your wifi a smooth ssh.txt on the boot partition. Solder male headers onto the head of the board if you happen to didn’t bewitch the pi with headers. Screw the PiSugar onto the bottom of the board (so the pogo pins contact solder joints on the bottom of the board). Press the expose onto the headers on the head of the board. At this point you potentially choose to ssh into the board and play with the expose a puny utilizing the python libraries and included examples.

  2. Wire it up. Join the Ping Sonar to the BLUART board with the included pins, and the BLUART board to the RPi with the male to male usb micro cable. At this point you potentially choose to ssh into the board and take a look at out the sonar utilizing the python libraries and included examples.

  3. Spot up the code. I customarily mashed collectively one in every of the e-ink examples with one in every of the sonar examples. Code is here. You potentially need the code to depart on boot. There are heaps of systems to invent this, however I extinct the rapid-and-dirty one: add an @reboot line to crontab. Flee crontab -e and add a line that goes something care for @reboot /house/pi/surfsonar/src/sonarDisp.py > /tmp/sonarOutput.txt 2>&1.

  4. Field it up. Drill a gap within the aspect of the opaque fragment of the Polycase box for the sensor cable passthrough. Careful no longer to drill too shut to the bottom of the box, due to you’ve gotten to jog away ample house to screw on the within section of the cable passthrough. (I made this mistake and had to hack away one in every of the mounting facets on the within bottom of the box in repeat to intention it fit). Stick the expose to the clear entrance of the case utilizing the mounting tape. Stick the wireless energy receiver coil there too. It’s seemingly you’ll perchance perchance well choose to diminish it out of its foil packaging first (peek substances fragment). I extinct glue follow rob a spy at to place it to the Polycase however I don’t deem that if truth be told did something – there became as soon as remnant adhesive on the coil PCB and that did the job. It’s a reasonably tight fit so factual deem the place the entire thing goes and mess round with it a puny. In particular the USB cable coming out of the RPi – I had to diminish away one of the most plastic on the connector to intention that fit. Close it all up and take a look at it.

  5. Operate.
    Earlier than you initiating butchering, study the anatomy of your board. In explain, how many stringers invent you’ve gotten, and the place are they? As a result of you should perchance perchance perchance additionally’t viewed them on a foamie, I walked into the Decide Surf store and asked. They told me I if truth be told agree with three stringers, all pretty shut to the center. I attempted a stud finder and to my surprise it became as soon as in a region to spy them.

    Prick a gap within the head of the board factual extensive ample for the Polycase box. Drill a gap within the bottom of your board with the outlet noticed to position the sonar in. At the same time as you flip the board, remember that the perimeters swap! This sounds obvious, however… looks it’s an effortless mistake to intention (embarrased face). At the same time as you happen to extinct a 1 3/4” gap noticed you’ll accumulate it’s a puny cramped and desires enlarging – I hacked away some foam and carved away one of the most plastic to amplify the circle. I decrease a channel within the bottom of the board for the cable, however didn’t jog all systems to the sensor gap. For reducing by the plastic on the bottom of the board I extinct a dremel firstly and then extinct my Leatherman Wave noticed, reducing at about a 45 deg angle to rob away a triangular prism of froth with a rectangle of slick plastic on top (the “channel lid”). Then I extinct a drill with extensive drill bit to intention the connections between the sensor gap, the channel, and the Polycase. I decrease away ample within the “channel” to fit the excess cable, and glued the “channel lid” motivate on. I sealed round the perimeters of the sensor with silicone sealant.

  6. Power Add velcro strips to the charging pad and the head of the Polycase. Now you should perchance perchance perchance additionally retain your board vertical in a board rack and slap the charger on it.

    I didn’t add an external energy swap of any kind. The PiSugar S has a characteristic the place it switches off when the battery gets down to 3V, and switches motivate on when the battery is charged to three.6V. It looks to depart for 5h or so on a price (cautious take a look at pending). So, my diagram is continuously to place the charger to it the night time before and let it depart all day till the low-voltage disconnect turns it off. The PiSugar also has a characteristic the place attaching energy may perchance perchance perchance perchance composed flip on the Pi even supposing it became as soon as shutdown in general with excessive battery voltage. To enable each and every of these auto-flip-on behaviors, there’s a confusingly labelled swap, labelled AUTO on one aspect and ON on the varied. The swap must be enviornment on the ON aspect to enable the automatic behaviors.

I became as soon as interested by compromising the watertightness of my board. Someplace on the earn I study a heretic scrutinize that foamies don’t discover waterlogged, which definite would be nice, wouldn’t it? I figured I’d strive a take a look at. I weighed the foam cylinder I decrease on scale that measures to the gram (unfortunately I don’t agree with something higher hand) and got 3g. I soaked it in water below a weight for a few days and it composed weighed 3g. Imprint that that is novel water, no longer salt water, and I believe the repeated compression of browsing on it’s a long way what if truth be told drives water into the foam, and I didn’t take a look at that.

I’ve taken it out for one take a look at surf and the numbers had been very cheap as soon as I got neatly previous the fracture. I paddled out to spy and watched the depth tick up about 2.4m to three.2m, reading 100% self perception so much of the time. Then all over again, closer to shore, near the breaking waves, I became as soon as getting nonsense readings and low self perception. I believe that is due to the acoustic energy of the breaking waves swamps the ping signal. I must spy on the stout waveform files to resolve out if I will discover very finest numbers within the surf zone. In the interactive pickle under, you should perchance perchance perchance additionally peek the two classes the place I sat waiting outdoor. The surf became as soon as too very finest to recall extra files than that!

Read Extra