The Power of Raspberry Pi: the blissful beginning

When we first heard about the Raspberry Pi (RPI) credit-card sized computer we thought that it might meet the goal of a low energy usage (just over 1 Watt) server on Mahdee that ran 24-7 and performed some essential functions. Those functions included logging, serving and displaying boat and weather data, as well as monitoring that data and sounding alarms when something isn’t right.  Our first RPI took many months to arrive because of demand exceeding supply in 2013 and the RPI coincidentally arrived at the marina office on Pi day (March 14).  It was late afternoon when I excitedly went to the office to take delivery (possibly just before 1600 and presaging a near obsession with this delicious sounding device).

Screencast of weather program on Raspberry Pi

The first RPI had only 256MB of memory and saw little use before we broke the SD socket. So it was replaced by the upgraded RPI with 512MB memory. With twice the memory of the original RPI and an over-clock ability, I was full of anticipation about what this improved, yet still power sipping lilliputian computer was capable of.  In hind sight, there was much to learn about the RPI.  This is the first in a series of blog posts describing how Raspberry Pi’s are used, and how their use has evolved aboard Schooner Mahdee. For the impatient and those who prefer doing rather than reading, the latest version 2 of the Raspberry Pi (RPI-2) can be purchased here and by following that link, you get a great price and can help to support the Raspberry Pi Foundation mission as well as this site.

Weather data on Mahdee is provided by our mast-top Airmar PB-100 weather station. The Airmar PB-100 provides relative and absolute wind direction and speed, barometric pressure, temperature, humidity and dew point, as well as boat magnetic heading, pitch angle and roll angle, GPS position, GPS course and GPS speed. The Airmar data is multiplexed with some boat data such as depth-sounder, water temperature and boat speed through the water before being sent via USB to the RPI. In order for the RPI to decode the Airmar data, the ftdi_sio kernel module must be loaded. And the crucial trick after loading that module, is to execute this special command:

echo 0403 d9a8 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id

Without that change the data is not a readable serial port stream. With that change, the Airmar data is readable. We wrote a script to capture the USB serial data, time stamp each line with computer time and save it to a file. Initially, that data was saved on the RPI SD card which the RPI uses like a hard disk and also has the operating system and programs on it. SD cards have a fixed number of writes in their life, and after about a year, the limit was achieved and the SD card failed. So, we got a new SD card for the operating system and programs and a Passport USB-2 hard drive to hold data and thus preserve the life of the SD card.

When the weather and boat data are being saved, the data are forked and also sent to a serial-to-network converter that provides a pseudo serial port that is available on a network port of the RPI. We then wrote a QT-based program to connect to that port, read the data and display it on the RPI’s HDMI monitor. The QT program requires a GUI on the RPI and has many alarms including a position/anchor alarm, as well as a wind speed alarm. We cross-compiled the QT program to make different executables that run on the various computer architectures we have on Mahdee. An early version of that program was published on my GIT account, but if anyone wants a copy, please let me know so that I can update the version on my GIT account.

In the first versions of the QT program, we discovered that the displayed data was lagging further and further behind because the QT program could not always keep up with the Airmar data feed. This defect became painfully obvious during three sequential southerly gales while sailing north in March off the Oregon coast on our way to Alaska and striving to not unintentionally gibe–the displayed wind gust directions were just not matching the observed effects. It was pitch dark and freezing cold out in the cockpit with boarding seas and driving rain and we really, really wanted to steer from inside Mahdee’s warm, sheltered chart house and that required a good weather display with real-time information. We fixed that problem (later while recovering in a marina in Alaska) by allowing data to be dropped in the QT program so that the displayed data is the most recent data. If we want to analyze all data, we can then retroactively parse the saved file.

Sometimes the data capture would fail which would freeze the data displayed by the QT program. This required us to first notice the data freeze and then find the source of the problem.  We immediately noticed a data freeze when we were hit by a williwaw in a fjord in BC Canada and the displayed wind speed froze at only 56 knots even though conditions and our control of Mahdee were rapidly deteriorating. At the white-out stage, we knew something was wrong with the display.  The fix was usually to manually restart the data capture program, but there were often long gaps with no saved data because we didn’t notice the failure right away (or alternatively we were too busy fighting to control Mahdee in a williwaw). This was a big problem if we were counting on the RPI to sound an alarm–e.g. if the anchor came unset while we were asleep. So we wrote a Cron script to periodically check for file updates and if too much time passes without an update, a script automatically runs to restart the data stream. Alternatively if the external Passport USB drive becomes unavailable, the logger will automatically switch over and use the SD card for data storage. The automatic scripts greatly improved the reliability of our weather and boat data and improved confidence that the alarms will sound when they should. At this point, the RPI became a key piece of safety equipment aboard Mahdee.

Of course, we want the RPI to do more and in the next post we will discuss our experiences loading up (overloading?) the RPI.

Little by Little

We might as well start with a look at the sort of scenery I’d like to be viewing along about now–Mildred Island, ah, it was so peaceful and pretty last fall.

1

Now lets show a what I am seeing right now–yep, that’s a Dyneema core-with polyester braid splice underway (New England Rope Endura Classic) and Brion Toss’s Riggers’ Apprentice laying on my feet. I’m splicing lines for the running backstays.

Oh, yes, that’s right–forgot to mention, it’s raining outside and David is puttering around all over the place inside so my rigging station is our bed–safely out of the way. The upper running backstays are Amsteel Blue and very easy to splice but the lower portion uses the funky braid-over-high-tech line which is a little harder to splice. And to think–it’s all so the lower portion will look very “traditional” and classic rather than high tech!

2
.
3

The running backstays are interesting. We did some “quick-it-will-work-for-a-while” runners when we rigged Mahdee in 2009. It’s time to return them to more like what they were in the 1939 rig design. Originally Mahdee had running backstays with her 1931 gunter mainsail and the design was modified in 1939 when her mainmast was spliced to support a Bermuda sail rather than the gunter. She had no fixed backstay back then. The runners were removed by her owner in 1953. At that time, her owner installed a boomkin, shortened the boom and used a fixed backstay.

Her running backstays were not placed back in service until the 1960’s when she was raced for a while. Presently, she has a single upper runner and an “A” lower part that comes down to two chainplates on the deck. She is supposed to have an upside down “A” as the upper portion of the stay–attached to the top of the mast and lower near the triatic stay. We are installing that upper loop “A” with my new 3/8″ Amsteel Blue line and the lower loop “A” with the Dyneema/Endura Classic in 1/2″ (12mm).

No one seems to make a block exactly like that which Mahdee originally had (see the drawing below) to connect the two loops. Modern running backstay cascades use similar loops but most now rely on low friction rings. We could use that sort of system, but the polyester braid cover on the Dyneema really should have a sheave not just a low friction ring.

I discovered that you can connect two blocks head-to-head with something called an “upset shackle” so we may be doing that rather than fabricating specialized blocks. Initially David was going to just make a suitable wood cheeked stacking block to match our other wood blocks but we quickly realized that we’d not be certain of the load capacity of such a block set and they do need to be very strong.

The blocks will be leathered because they can touch the sails so they will happen to look pretty traditional. With the leather, it really doesn’t matter if the blocks are traditional wood or another more modern design and material. There are two makers of really lovely (and strong) wood blocks I’ve been in touch with as well as one sheave maker (in case David really wants to make blocks). It could go either way but I’m leaning towards just buying off-the-shelf blocks and upset shackles at this point.

4

Progress? I completed the splices installing the four 3/8″ thimbles in the upper backstay loops, did one of the lower backstays but stopped short of finishing the other one because I was getting sloppy. Tomorrow–finishing the other lower, and adding a couple Turks Heads to decorate the whipping required on the braid-over-Dyneema eye splices.

What does Beryl think about life aboard these days? She’s just happy when the laundry basket is empty and she can stake a claim to it. Unfortunately for Beryl, this is an older picture and our laundry basket is full-to-overflowing today.

5

Yes We’re Still Blogging

11

Beryl is dreaming of far off places; I really think she’s ready to get back out to sea where she can happily chase her toys as the winds and waves push the boat side to side in the perfect pattern to roll her favorite balls, strings, and straws across the worn teak sole. We remain in a serene marina environment, enjoying the mild weather and doing projects.

223

I’m starting to get notes that say “what’s up?” from several people. Those made me realize I’ve not updated the blog about our goings-on for over a month! Why? Well, many of our projects are amazingly ordinary, small, and boring!

In early January, David completed his project of making cabinet doors for some key shelving areas; I then varnished them and he installed them. Here’s a pic of the doors about to be installed. Suppose I should take a shot of them after the fact, too. Or perhaps just let our readers wonder how it went…

We are preparing for our northward progress this spring–what that means is we finally got an EPIRB (great deal at the end of 2013 with rebate from ACR) and we purchased a Simrad broadband radar system with B&G Zeus chart plotter. We’ve pulled, out of storage, the radar platform the previous owner had and are trying to figure out how to install it on the mainmast without putting the radar in harm’s way of the foresail gaff boom. There will surely be an interesting tale of the installation once the radar arrives here in about a week.

I’m also replacing the temporary (going on 3 years…) rope guard lines (aka lifelines and breast lines) with Dyneema ones as well as going over, with David, every inch of rig and rigging replacing any shackles or other things which seem worn or potentially under-sized. I ordered a total of 28 thimbles for the various guard lines–that means 28 splices I’ve got to do. I’ll be really good at the Mobius Brummel splice by the time that project is done! A strange combination of new and old with those guard lines–I’m using very traditional looking bronze pelican hooks combined with the Dyneema. All the parts haven’t arrived so that project is just a pile sitting in the corner right now.

A couple weeks ago, we took off the mainsail so I could put replacement batten pockets onto it (new RBS sail battens ordered via Sailrite), David sanded and then I put 6 coats of varnish on the boom. It hadn’t been varnished since 2010, so it really needed it in some spots! We then bent on our “spare” mainsail–this meant changing some hardware on the boom to fairlead the reefing lines. That means I’ve got more cleanup and varnishing to do. Sigh. It also involved seizing on all the slides on the sail’s foot. The sail previously had a thimble system on the foot where one tightened up a wire running through the thimbles and matching thimbles on the boom to manage the outhaul. That system was designed for booms without a sail track.
1
.


.


.


.

That spare sail is interesting–it is a Watts sail made decades ago for the 75′ 1958 Rhodes ketch Kamalii (Kamali’i) to serve as a spare mizzen sail during ocean races. It was never used. So, brand new Dacron that is decades old. It is also heavy 13 oz material. Our other sails are 10 and 12 oz. The sail may only last a season or it may last a long time–we don’t know. We purchased it from Minney’s in Costa Mesa, CA and had sailmaker Skip Elliott of Elliott/Pattison in Newport Beach take out the roach, shorten the foot by about 8″ and add a single reef. The sail had no reef to begin with. We had the reef placed high where our second reef is on the other main sail. We literally never use the first reef on that sail as we’ve discovered that in heavy winds the mainsail quickly overpowers foresail, staysail and jib combined.

Skip Elliot immediately recognized the sail while it was still in the bag when we took it to his shop–it turns out the lovely hand stitching was unique to a particular sailmaker that Skip knew from long ago. He said “that sail was made by Albert and will have number 7175 on it, it belonged to Kamalii and I saw it as part of a sail survey I did for the boat many years ago.” He thought the sail was well worth the work to make it fit Mahdee and that it would last quite a while.
.
34

Watts sails must be quite recognizable to people “in the know” and it seems that would not include us, the Mahdee crew. Kamalii’s sail number must also be quite familiar to people as well. While we were putting the sail up at the dock, one of San Francisco’s Master Mariners came along the dock and said “That’s a nice sail–made by Watt’s, huh?” and “7175, that’s a SoCal number–is it Kamalii’s sail number?” Go figure. I then spent 6 hours painstakingly snipping the threads to remove the sail numbers from the sail! We have no intentions of racing Mahdee but I’m beginning to think we should put her sail number on her mainsail. We’d have to research it and discover which is her earliest and proper sail number. We have seen photographs with 188 and 288. A three digit number rather than today’s four.

Perhaps instead of longing for ocean passages, Beryl is just watching the birds near the boat. In any case, the migrating birds are enjoying the sunny days as much as we are.

33

Google Analytics Alternative