Satellite Comm

A project log for SolarSurfer

A robotic solar-powered surfboard that will travel from LA to Hawaii! It's Arduino-powered, satellite connected, and collects ocean data.

josh-villbrandtJosh Villbrandt 09/15/2014 at 00:210 Comments

Since the trip to Hawaii is going to take many weeks, one of our requirements for the SolarSurfer is to have two-way satellite communication during the journey. We decided to use the RockBLOCK modem from Rock Seven to fulfill this requirement. The RockBLOCK features a modem which can talk with the Iridium satellite constellation. The Iridium satellite network is unique in that it can reach everywhere on Earth and not just terrestrial locations like many other satellite constellations. This is important to us, because the SolarSurfer will be operating out in the open ocean.

By using the IridiumSBD library for Arduino, we were able to start sending messages over the air the day we got the modem. This library employs a callback function to enable processing during the possibly-long message sending process. To play nicely with the Iridium callback, we organized our control code into a function that could be called from the Iridium callback and from the normal Arduino loop function. This allows the SolarSurfer to operate normally whether sending an Iridium message or not. You can check out the full implementation in the src/solarsurfer.pde file of our SolarSurferCore repository.

On the ground side, the Rock Seven Core service allows users like us to configure message handlers. Specifically, you can add email addresses, which are great for debugging, and HTTP services, which are great for actually building a service around your Iridium-powered device. We created a database-backed API called SolarSurferAPI to listen to the Rock Seven service. This allows us to record all of the messages that we receive from the SolarSurfer so that we can analyze them later. The SolarSurferAPI project listens to HTTP POST requests from RockSeven and stores the Iridium payloads in a MongoDB database. The API is written in JavaScript with NodeJS and is designed to run on Heroku.

One of the limitations with the Iridium service is the extremely small amount of data that can be sent and received. Iridium messages can be up to 340 bytes, although Rock Seven charges for every 50 bytes. Since messages can be up to 20 cents each (if you prepay for only 50 messages) we opted to build our messages around a 50 byte limit. To put that in perspective, the size of this log post is about 3500 characters or 14,000 bytes. It would cost a whopping $41 to send this content over Iridium through Rock Seven's service. It's a good thing normal Internet access doesn't cost that much...

With this data limitation, every single byte counts. In order to make passing information between the API and the surfboard as painless as possible, we created another repository called SolarSurferMessage solely to define message types and their content. This repository defines the message formats in a JSON text file and can automatically serialize and deserialize messages. Since SolarSurferMessage is also written in JavaScript, it is included directly in SolarSurferAPI. However, SolarSurferMessage also includes a script that generates an equivalent C++ message library for SolarSurferCore.

With everything in place, the end-to-end communication looks a bit like this:

We had this setup built in time to try out for our Ocean Test No. 3, and the setup worked great! We were even able to make auto-updating maps and graphs using data from SolarSurferAPI that we used to follow the surfboard while it was out in the ocean overnight - but more on that in a future post.

Thanks for reading, and stay tuned for more SolarSurfer updates!