Smart Buoy [Summary]

13,252

88

23

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!

Hi everyone! This is a brief(ish) summary of our smart buoy project. We’ll break down the technical build into separate posts, to explain: electronics, 3d print, and dashboard.

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 for some context, here’s the complete list:

Please use our link <3

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 it was able to take, we were quite close to making it work. However, it turned out to be pretty complicated and it’s actually 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 in another episode 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 - a method which worked perfectly.

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.

One member of the T3ch Flicks team is a web developer who has recently learnt Vue JS. They got very excited when we decided we needed a dashboard and blew us away by making this pretty legit dash.

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 also explain this in some detail in a later episode.

(Remember you can find all the code at https://gitlab.com/t3chflicks/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 glueing 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 math for combining the sensor data from the magnetometer, accelerometer, and gyroscope. It wasn’t super helpful in the end, but we did find this interesting video. 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 kilometers with direct line of sight https://www.youtube.com/watch?v=57pdX6b0sfw . However with (very) many Buoys around the island we could have formed a mesh network such as https://www.youtube.com/watch?v=xb7psLhKTMA . 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 water 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 the video for this on our youtube channel. In part one of the series, we’ll be showing you how we took wave and temperature measurements.

Sign Up to Our Mailing List!

Part 1: Making Wave and Temperature Measurements

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

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    23 Discussions

    0
    NatháliaC4
    NatháliaC4

    8 months 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

    8 months 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

    1 year 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

    1 year 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 1 year 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 1 year 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

    1 year 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

    1 year 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

    1 year 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 1 year 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 1 year ago

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

    1
    memjr73
    memjr73

    1 year 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 1 year 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 1 year 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

    0
    Bundolo
    Bundolo

    Question 1 year ago

    I'm working on a similar project - actually a crabcam that has a camera in the crabtrap that captures live images and broadcasts them to the cottage. I'm wondering about your battery/solar system. It seems quite modest for what it has to do. Do you find that the solar charging can keep the electronics running? I have a relay switch that I can transmit a command to turn on the camera (and off) to try and keep my power consumption down, but still find that I get only about 12 hours on a 6800maH 12v battery pack.

    0
    t3chflicks
    t3chflicks

    Answer 1 year ago

    Our next part in the tutorial series will explain how we powered the buoy successfully. But here goes: we had a single 18650 battery connected to a charge controller and 4 mini solar panels 5V 60mA => 240mA peak. However, even though our system managed to pull 300mA at points, we were able to control its on time by putting it to sleep (power off except to RTC) and having an alarm set for when you next want the RTC to trigger the system to turn back on. This mean we could configure Alarm times of a range of times to days based on battery voltage - because we'd rather it not die.