Smart Buoy [Summary]

19,887

99

25

Introduction: Smart Buoy [Summary]

About: Somebody once thought they could fix a plug socket using chopsticks. They caused a meltdown and burnt down a town. If only they'd watched T3ch Flicks!

We all love the seaside. As a collective, we flock to it for holidays, to enjoy water sports or to make our livelihood. But the coast is a dynamic area at the mercy of waves. Rising sea levels nibble at beaches and powerful extreme events like hurricanes completely decimate them. To understand how to save them, we need to understand the forces driving their change.

Research is expensive, but if you could create cheap, effective instruments, you would be able to generate more data – ultimately improving understanding. This was the thinking behind our Smart Buoy project. In this summary, we give you a quick run down of our project and break it down into design, the make and data presentation. Oh buoy, you’re going to love this..!

Supplies

For the complete Smart Buoy build, you need a LOT of stuff. We will have the breakdown of specific materials required for each stage of the build in the relevant tutorial, but here’s the complete list:

All the code used can be found at https://gitlab.com/t3chflicks/smart-buoy.

Step 1: What Does It Do?

The sensors on board the Smart Buoy enable it to measure: wave height, wave period, wave power, water temperature, air temperature, air pressure, voltage, current usage and GPS location.

In an ideal world, it would also have measured wave direction. Based on the measurements the Buoy did take, we were quite close to finding a solution which would enable us to calculate wave direction. However, it turned out to be pretty complicated and it’s a massive problem in the actual research community. If there’s anyone out there who can help us out and suggest an effective way to get wave direction measurements, please let us know — we’d love to understand how we could get it to work! All the data the Buoy collects is sent via radio to a base station, which is a Raspberry Pi. We made a dashboard to display them using Vue JS.

Step 2: Build - Buoy Casing

This Buoy was probably the most difficult thing we’ve printed so far. There were just so many things to take into consideration as it was going to be in the sea, exposed to the elements and a lot of sun. We will talk more about that later in the Smart Buoy series.

In brief: we printed a near hollow sphere in two halves. The top half has slots for the solar panels and a hole for a radio aerial to go through. The bottom half has a hole for a temperature sensor to go through and a handle for a rope to be tied to.

After printing the Buoy using PETG filament, we sanded it, spray painted it with some filler primer, and then put on a couple of layers of epoxy.

Once the prep of the shell was complete, we put all the electronics inside and then sealed the water temperature sensor, radio aerial and solar panels using a glue gun. Finally, we sealed the two halves with StixAll glue/adhesive (super aeroplane glue).

And then we hoped it was waterproof…

Step 3: Build - Buoy Electronics

The Buoy has lots of sensors on board and we go into detail about these in the relevant tutorial. As this is a summary, we’ll try to keep this informative, but brief!

The Buoy is powered by an 18650 battery, which is charged by four, 5V solar panels. Only the real time clock is constantly powered, however. The Buoy uses the real time clock’s output pin to control a transistor allowing power to enter the rest of the system. When the system is turned on, it starts by getting measurements from the sensors — including a voltage value from the power monitor module. The value given by the power monitor module determines how long the system sleeps for before taking the next set of readings. An alarm is set for this time, then the system turns itself off!

The system itself is a lot of sensors and a radio module connected to an Arduino. The GY-86 module, RealTimeClock (RTC), Power Monitor module, and I2C multiplexer all communicate with the Arduino using I2C. We needed the I2C multiplexer is required because the GY-86 and the RTC module we used both have the same address. The multiplexer module allows you to communicate with no extra hassle, although it might be a bit overkill.

The radio module communicates via SPI.

Originally, we had an SD card module as well, but it caused so many headaches because of the size of the SD library that we decided to scrap it.

Take a look at the code. It’s likely that you have some questions — probably lingering doubts as well — and we’d be happy to hear them. The in-depth tutorials include code explanations, so hopefully they will make it a bit clearer!

We tried to logically separate the code files and use a main file to include them, which seemed to work pretty well.

Step 4: Build - Base Station Electronics

The base station is made using a Raspberry Pi Zero with a radio module attached. We got the casing from https://www.thingiverse.com/thing:1595429. You’re fab, thanks so much!

Once you have the code running on the Arduino, it’s quite simple to get the measurements on the Raspberry Pi by running the listen_to_radio.py code.

Step 5: Dashboard

To show you how we made the entire dash would be a bit of an Odyssey because it was a pretty long and complicated project. If anyone wants to know how we did it, do let us know — the T3ch Flicks resident web developer would be more than happy to do a tutorial on this!

Once you put these files onto a Raspberry Pi, you should be able to run the server and see the dashboard with the data coming in. For development reasons and to see what the dash would look like if it were supplied by good, regular data, we added a fake data generator into the server. Run that if you want to see what it looks like when you have more data. We’ll also explain this in some detail in a later tutorial.

(Remember you can find all the code at https://github.com/sk-t3ch/smart-buoy)

Step 6: Version 2?? - Problems

This project is absolutely not perfect — we like to think of it more as a prototype/proof of concept. Although the prototype works on a fundamental level: it floats, takes measurements and it able to transmit them, there are lots of we’ve learned and would change for version two:

  1. Our biggest issue was not being able to change the code for the Buoy after gluing it shut. This was really a bit of an oversight and could be solved very effectively with a USB port covered with a rubber seal. That, however, would have added a whole other layer of complexity to the 3D print waterproofing process!
  2. The algorithms we used were far from perfect. Our methods for determining wave properties were pretty crude and we ended up spending a lot of our time reading up on math for combining the sensor data from the magnetometer, accelerometer, and gyroscope. If someone out there understands this and is willing to help, we think we could make these measurements much more accurate.
  3. Some of the sensors acted a little bit weirdly. The water temperature sensor was the one which stood out as being particularly dodgy — almost 10 degrees out from the real temperature at times. The reason for this could have been it just being a bad sensor, or something was heating it up…

Step 7: Version 2?? - Improvements

The Arduino was good, but as mentioned before we had to scrap the SD card module (which was supposed to be the data backup if radio messages weren’t able to send) due to memory issues. We could change it to a more powerful microcontroller like an Arduino Mega or a Teensy or just use another Raspberry Pi zero. However, this would have increased cost and power consumption.

The radio module we used has a limited range of a couple of kilometres with direct line of sight. However, in a hypothetical world where we were able to put (very) many Buoys around the island, we could have formed a mesh network like this. There are so many possibilities for long range transmission of data, including lora, grsm. If we were able to use one of these, maybe a mesh network around the island would be possible!

Step 8: Using Our Smart Buoy for Research

We built and launched the Buoy in Grenada, a small island in the south Caribbean. While we were out there, we had a chat with the Grenadian government, who said that a Smart Buoy like the one we created would be helpful in providing quantitative measurements of ocean characteristics. Automated measurements would cut out some human effort and human error and provide helpful context for understanding changing coasts. The government also suggested that taking wind measurements would also be a helpful feature for their purposes. No idea how we’re going to manage that one, so if anyone has any ideas…

An important caveat is that although it’s a really exciting time for coastal research, particularly involving tech, there’s a long way to go before it can be fully adopted.

Thanks for reading the Smart Buoy series summary blog post. If you haven’t already, please take a look at our summary video on YouTube.

Sign Up to Our Mailing List!

Part 1: Making Wave And Temperature Measurement

Part 2: GPS NRF24 Radio and SD Card

Part 3: Scheduling Power to the Buoy

Part 4: Deploying the Buoy

Check out T3chFlicks.org for more tech-focused educational content (YouTube, Instagram, Facebook, Twitter).

Sensors Contest

Second Prize in the
Sensors Contest

Be the First to Share

    Recommendations

    • Make It Bridge

      Make It Bridge
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • For the Home Contest

      For the Home Contest

    25 Comments

    0
    muhammadhijaziaidil
    muhammadhijaziaidil

    Question 1 year ago

    Hello! 😁
    What a interesting project you guys have. I've been following this porject for a while now, it's fun. But can you guys tell me more about the code used for radio receiver? Because i can't get raspberry pi on my hand, so the serial monitor is the only way for me to get the data 🥲. Thanks.. 🙏

    1
    bruzzese953247
    bruzzese953247

    1 year ago

    Hi!
    I have a question about the temperature sensor in the bottom of the buoy. I imagine that you made an hole in the bottom part of the buoy in order to install the sensor. Is this a way to enter water into the buoy? I did not find any documented part you used to seal this sensor from entering water into the buoy. Thank for your answer

    0
    NatháliaC4
    NatháliaC4

    3 years ago on Step 5

    About the Dashboard you created, please have the developer make a tutorial, it looks very clean and easy to work with, it must have been a lot of work, congratulations for the entire project!

    0
    NatháliaC4
    NatháliaC4

    3 years ago on Step 2

    It looks great! Your design is smart and beautiful, do you make it available for downloading? The 3D printing model I mean, I would be amazing if you could share at least a simpler version of it!

    0
    needfulthing
    needfulthing

    3 years ago

    I really like your project. For issue number one you could switch from Arduino Nano to an ESP system. There are a lot of articles explaining how you can program an ESP OTA (over-the-air). It also offers more memory and can be programmed with the Arduino IDE. It can have I2C on all pins which would save you the multiplexer and it runs on 3.3V. The are people claiming it does not work that good with batteries, but I wouldn't be sure about this. When running WiFi an ESP8266 consumes about 700 mA, so you would have to find a way to trigger wireless just for the time of programming.

    0
    SyedM34
    SyedM34

    3 years ago on Step 8

    i am new to raspberry pi and vue js server kindly help by guiding me how to upload your files in raspberrypi and run the vue js server.

    0
    DwayneJ
    DwayneJ

    Question 3 years ago

    Very nice project and one I've been thinking about for a while.
    What was your infil percentage for the 3D Printed shells? And what was the grey ring about the buoy?

    0
    t3chflicks
    t3chflicks

    Answer 3 years ago

    Thank you! We ended up printing at 60% and with four perimeters but i think we were just being ridiculously over cautious.

    0
    pwhazel
    pwhazel

    3 years ago

    Try putting a cylindrical sun shield around the temperature sensor with space between the sensor and the shield walls. You'll need to leave openings for the water to flow freely through it so you don't get a cool or warm pool trapped in it, but because the buoys sit so shallow in the water, if the buoy tilts with a passing wave the sun may be causing your temperature anomalies even if the sensor is still submerged. You might also consider having several temp sensors mounted down the anchor line to help eliminate spurious signals. This would also provide more detailed data over a broader range, but the wiring may prove troublesome because it will flex with the anchor line with each passing wave.

    Are you also measuring the air temperature above the water?
    The power coming from the solar cells can give you an indication of insolation - useful by itself, but especially when compared with the air temperature. (You might need to mount one flat across the top or use a light sensor on top to help get good data. Of course, a light sensor won't help charge your battery.)

    I don't know, but it seems to me that at such a low height above the surface, the wind direction and wave direction should be pretty much the same, not counting random gusts. A given volume of water is more massive than air, so the waves should push/pull surface air a lot more than the air will push the waves by the time they are reaching landfall. The most likely time for a change in this might be when a weather pattern changes and the momentum of the waves has not responded yet to the change in wind direction. This could be fairly important in itself I suppose, but still the waves should be pushing/pulling the air at the surface along with them. Maybe that changing interaction and resultant turbulence is important enough to warrant the work necessary to measure it? I read somewhere once that the wave/atmosphere boundary was not well understood for climate and weather modeling.

    0
    pwhazel
    pwhazel

    3 years ago

    Really cool project! You got my brain cooking on this. Here are some possible ideas:
    1.) Your solar panels are mounted in a horizontal orientation - try mounting them in a vertical orientation (rotate them 90 degrees). You should be able to get at least 2 and maybe 3 more cells in the same space and this will help with keeping your battery charged.
    2.) Don't print the solar cell mounts leaving a large open "window" behind them - you just need a hole large enough for the connecting wires which should be much easier to seal (and stay sealed after long months at sea.) If the solar cells themselves need to be sealed, you should probably seal them individually and then attach them to the buoy.
    3.) If possible, see if you can connect all the solar cell wires into one bundle - then you only need to seal one hole.
    4.) Try printing the bottom half with a conical profile (so the buoy looks like an ice cream cone) - the buoy will still float upright but this will help keep the buoy directionally oriented with the wave direction especially with a keel or vane down the side and reduce some random motion - easier to crunch the data, and reducing computer time reduces power use.
    5.) All electronic components need to be firmly attached to the buoy on the inside - months of battering by the waves will eventually break things that aren't secure, especially solder joints. Directly attach all wires to the circuit board or other hard mounts with zip ties.
    6.) Consider mounting the electronics in a separate water proof container inside the waterproofed buoy and fill the left over space with closed cell foam so that even if the buoy leaks, there is nowhere for the water to go, and there is still waterproof protection for the electronics in their own little box.
    7.) Maybe paint everything below the water line on the outside with anti-fouling paint. Barnacles and other critters will grow on anything in the water given enough time, so make them work for their free ride - their weight could eventually sink the buoy.
    8.) Basically everything should be behind 2 (or more) waterproof barriers. Don't let the success of your mission ride on a single point of failure (flooding.) Consider printing the top section with a large threaded opening. An insert to hold the electronics box could be screwed, glued, and sealed into the opening from the inside with the buoy's top cap screwed on from the outside, creating a separate sealed container to place the waterproof electronics box in. Kind of like having a buoy inside of a buoy. (Oh boy, won't that be fun to 3D print!)
    9.) Either hard mount the electronics box or put a lot of padding in with it to keep it from bouncing around much - actually, you will ultimately want to keep it from moving at all.
    10.) Use "O" rings and sealant.
    11.) The waterproof USB port should be under that outside top cap, and the entire electronics box should be able to be removed through the top opening, leaving the buoy body on the deck when the insides need to be taken out for maintenance or upgrades on the workbench. (Which means you will need a disconnect for the solar cell wires.)

    I think you've got an awesome idea, but I keep remembering that ideally these buoys will be in the sea for years, through all kinds of weather including hurricanes. You can't imagine or prevent all possible problems that could occur, but it is definitely easier and cheaper to fix things before they break, so make them modular, robust, and easy to repair.

    The biggest cost of a system like this isn't the buoys themselves - it is the maintenance costs; costs of having to retrieve the buoys, repair the buoys, and replace the buoys - worker's wages will be the single biggest cost item of operating and maintaining this system, so make them modular, robust, and easy to repair. An electronics module should be able to be pulled from a buoy, replaced with a working one, and the buoy dropped back in the water in a few minutes from a boat, and the retrieved module can be returned to the shop while the buoy continues operating.

    Modular, Robust and Easy to Repair. Modular, Robust, and Easy to Repair. Modular, ......

    Well, if nothing else, I hope these ideas will at least help you to come up with even better ones.

    Cool idea! Good Luck!

    0
    pbyrns1
    pbyrns1

    3 years ago

    Very cool project!
    I haven’t given the problems a lot of thought but there are a couple of ideas which you may have already considered:
    1) a floating object in waves moves in an elliptical pattern on a plane mostly perpendicular to the wave direction. Monitoring this pattern and tracking it and applying some averaging math might give you a reasonably reliable wave direction.
    2) for wind direction, possibly creating a shape to the buoy that presents itself to the wind in a reliable orientation might work. Think of a wind vane. The waters surface should produce enough drag and at the same time, create a pivot. The shape will take some experimenting.
    Good luck and have fun with it!
    Feel free to involve me in any brainstorming sessions you think I might be of use in.

    0
    t3chflicks
    t3chflicks

    Reply 3 years ago

    Some great ideas in here. And a brainstorming session seems like a good idea - we might try and do that on a platform like gitlab - unsure if most people would have an account

    0
    pbyrns1
    pbyrns1

    Reply 3 years ago

    If you are going to use gitlab, I would try the free trial and join in.
    Let me know.
    Thanks!

    1
    memjr73
    memjr73

    3 years ago

    If you buoy is fixed with an anchor, you can measure wave direction placing a keel in the bottom, from the center to one side, then tie the buoy from the center (also the bottom) or from the opposite side of the keel. As the waves go by, the keel will be pushed by the wave flow and the keel will point in the same direction as the waves are flowing to. Now you add an magnetometer to your buoy, align it with the keel, and as the buoy rotates you can measure the waves direction from the magnetometer.

    If your buoy is not anchored, you can still use the keel, but something in my brain is telling me that a V snapped keel would be better then a straight one.

    you can do the same thing on top of the buoy, but the keel would be attached to a pole (possibly even to the antenna) instead of to the buoy itself, and you can use that one to measure the wind's direction.

    If you do any of this, I'd love to hear from you how it turns out.

    0
    memjr73
    memjr73

    Reply 3 years ago

    I thought about this women more today and there is an issue with my idea. If the wind is stronger than the water flow/wave, you'll get wrong readings.

    But it's a start :)

    0
    t3chflicks
    t3chflicks

    Reply 3 years ago

    When we make a version 2 we'll be sure to let you know. These are some good bits of advice. Thanks! We're probably going to try and do some maths to fix this stuff because we've seen the same tech used in places like VR design programs