For a school project, my group and I have decided to make a weather buoy to put in the ocean. We have several parts available to make the buoy, including 2 Raspberry Pis (One version 2 model B, and one version 3 model B), an Arduino Uno, and an ESP8266 for IoT. We are having a hard time figuring out how we are going to connect to this buoy though, considering it will be anywhere between 150 to 500 meters off shore (nothing in between us and the buoy). We have looked into just using WiFi, but it isn't the best solution considering the furthest it could possibly go would be around 100 meters. The next solution we looked into was using a type of satellite or antennae, but our knowledge in this field is low, and resources are scarce. Any insight on this topic or any of its solutions would be greatly appreciated. Cheers!
Wow... Interesting project! You're lucky to be involved in something like this as it's the best learning experience. Anyway - to your question:
The problem of communicating with oceanic sensors has been extensively studied, and there are a variety of solutions that have been developed. The NOC lists a few on their website, and they might be willing to offer you some advice. You can find a lot more information if you want - academics need to publish, and consequently there are many, many approaches that have been tried. The trick would be finding one that matched your requirements and your budget.
But that's more along the lines of advice, and we're supposed to provide answers in this forum, so here's mine, in two parts:
Part 1 - WiFi Solutions:
School is all about learning, and that's why you're involved in this project. And so, you must learn some fundamentals to be successful (we can't give you all the answers here :). The first thing you must learn is that rf propagation follows well-known physical laws, and there are tools available to help you understand how to engineer a system to meet your requirements. In this case, the Friis equation (a.k.a. link budget) will help you determine what components you need to meet your range requirement. Here's an online Link Budget Calculator that looks easy enough to use. Here's another one from Pasternack, an rf hardware vendor. And you'll likely need to make some rf measurements of wifi signal strength... the netstumbler software will be a big help to you in making these measurements; it's free and easy enough to use... for Macs there's macstumbler, and for *nix there's kismet... or etc, etc.
With that in mind: As @dlu suggested, you can definitely add an external, high-gain antenna to your RPi, and cover your range requirement of 500 meters - but don't take my word for it! Once you've verified my claim with your own analysis, it's time to give some thought to the tradeoffs.
To "close" your rf link at 500 m, you need a certain amount of signal strength at the receivers at both ends. Having done some reading and studied the tools recommended above, you'll now understand that there are several ways to deliver the required signal strength to the receiver; e.g. more transmit power, higher gain transmit antenna, and higher gain receive antenna. Now think for a moment: which of these is the best or easiest to accomplish?
Since your telemetry station will be mounted on a buoy, and your data terminal will (presumably) be on land, maybe it's a good idea to keep the hardware on the buoy to a minimum. In other words, do you really want to mount a high-gain directional antenna or a power amplifier on a buoy? If not, then you may be able to have all of the "range-extending" hardware at your land-based data terminal. The link equation doesn't care where you put the equipment after all!
Enough with the pedantics; let's look at some solutions:
Higher gain antenna for the RPi:
There's a how-to for wiring an external antenna to the RPi 3 on the dorkbotpdx blog that looks straightforward, if not a little messy.
For the RPi 2 (no built-in wifi), there are USB dongles available from several sources; e.g. a small unit with a removable antenna that's compatible with RPi. Note that this one has an rf connector that could be mated to a directional (high-gain) such as the one mentioned below.
Higher gain antenna for the land-based data terminal:
- The "Cantenna" might be a reasonable solution for the 2.4 GHz wifi band. It has 12 dbi gain, not too expensive, can be mounted on a tripod, and connected to the rf connector on the USB wifi in the RPi.
- For the 5 GHz band, this unit from ventev offers a little more gain (16 dbi), and a more rugged package for permanent outdoor mounting.
- And of course there are many, many more wifi antennas that you can peruse through a simple Google search, so I'll stop here.
Part 2 - Software Defined Radio (SDR) Solutions:
This is IMHO the "leading edge" of communications technology, and much of it is currently available and usable with RPi! Really exciting stuff going on several fronts. Because this post is getting quite lengthy, and since I feel that the WiFi solutions in Part 1 will meet the requirements you've given us, I'll keep Part 2 brief and topical. Don't misunderstand please; an SDR solution will definitely work in your application, but it may require more effort in hacking the hardware and software than a WiFi solution. Also, the WiFi solution will not be viable at ranges much further than your 500 m requirement, and so you will need to look more closely at SDR if your requirements change.
I'll start by defining "Software Defined Radio" as simply radios in which many of the hardware components have been replaced by software. There's a Wikipedia page on it, and tons of blog posts and videos documenting functioning prototypes built by experimenters using Raspberry Pis. Many of them are receiver-only implementations, and not particularly useful for your weather buoy application, but incredibly, transmitters can and have been built and demonstrated using nothing but RPi hardware, and in this case - a multi-band transmitter!!. And here's an article on setting up an RPi-based "SDR Server" module.
To conclude this section, I'll mention briefly an area in which I'm personally interested, and I'll confess that it's this interest that led me to respond to your question. Very briefly then, lower-frequency RF signals find application for "non-line-of-sight communications". They have been used for many years by "Ham Radio" operators to communicate across very long distances - long before satellite communications and international telecom networks existed. It is the nature of rf waves at certain frequencies to "bend" and "bounce", and keep going with lower losses than higher frequencies.
Traditionally, ham radio operators transmit voice, and often use powerful transmitters and extremely large antennas to launch their broadcasts. However, Joe Taylor developed a communications protocol called "WSPR" that allows short messages to be be transmitted over long distances at extremely low power levels. How "low"? (Glad you asked :) Reliable reports state WSPR transmissions have reached distances of 10,000 miles using only 0.2 watts (23 dbm) of rf power. The (hardware) PWM pin on a Raspberry Pi is capable of producing 0.1 watts (20 dbm), and so is capable of reaching great distances with no additional "active" hardware (amplifiers).
And to conclude finally: WSPR is not suited well at all to communicate data; it may be able to manage 1 bit per second! However, as these things usually go, the technical breakthrough that WSPR made has yielded other protocols that are capable of more data throughput - not a lot more, but enough to be useful in some applications. For example, one of these protocols, EXchat is claimed to have sufficient bandwidth to support "text messaging" applications (that would be SMS - not MMS!)
Part 2.5 - SATCOM Solutions:
In my opinion, this really doesn't have anything to do with Raspberry Pi, since AFAIK there are no RPi-based satellite transmitters so I'll give it short shrift. But since you mentioned it and just for completeness, it's certainly possible to use a RPi with an Iridium SATCOM modem, and uplink data transmissions from your buoy. But that seems like such an over-kill for this project. And by the way, SATCOM time is expensive!
So that's it - I hope this has helped. I'm done except for one final word of caution: The rf spectrum is controlled by government entities who write laws and regulations that govern its usage. Pay attention to all of the warnings and admonitions you see.
As Chad commented, a ham radio license (http://www.arrl.org/getting-licensed) would be useful. Here's a vid for moding the chip you have: https://www.youtube.com/watch?v=7BYdZ_24yg0 by adding an external antenna. They get a range of 480 meters with their antenna. Technically, such a modification would likely take the ESP's gain out of the legal limits if you didn't have a license.
Also, consider using 2G/3G if there's a cell tower nearby your launch point. The hologram nova (https://hologram.io/nova/) integrates T-mobile and AT&T networks, so if they have a nearby cell tower it could be a solution. As far as the range goes, I think one mile is a safe bet and a few miles is more optimistic. Worth doing some research.
Finally, if you had one more ESP8266, you could do two buoys. One of them would stay between your router and the other buoy and act as a repeater.
You will need to find a suitable radio technology to do this, and depending on what is available it could get expensive.
Edit: since you are most likely just doing basic text reporting, a far easier and cheaper option would be a pair of 433Mhz transceivers. They are cheap, don’t use a lot of power when idle, and when paired with a micro controller board like the arduino you have a neat low-power low-cost option. It doesn’t require w point to point connection, allows for omnidirectional antenna on the buoy, and perhaps might not even need a directional antenna on land. One of the modules that would work for a bi-directional serial link might be: https://m.seeedstudio.com/productDetail/1733
This would also work with a Pi since you can run a serial console this way.
First thing to check would be GSM / GPRS / UMTS coverage. If there is a mobile network available, you could get away with a small MiFi router. If you need low power, a serial GSM modem would do, using GPRS or SMS you can get small amounts of data to and from in a cheap way.
Another option might be LoRa WAN, which has a long reach while also being low power. You another option is a satellite modem from the likes of Iridium or Astra.
Keep in mind that the thing you are trying to do is (so far) mostly done in large governmental or commercial projects and the resulting existing technology (mostly satellite com) is rather expensive. Alternatives have not yet had a clear winner or good example implementation.
WiFi and the likes are not suitable due to the nature of a floating device. Trying omnidirectional serial communication radio devices (and perhaps RTTY) might be your best bet apart from a 2G/3G/4G modem.
If you have a clear shot to the buoy you should do some tests. You may be able to get considerably more than the nominal range with no obstructions in the way. Do a test on the beach or in a field where you don't have to go for a swim...
On the shore side there are "tricks" you can do to improve the efficiency of the antenna. That would also help with your range. A search on
wifi directional antenna diy will net you lots of ideas to try.