Jump to content

Stepping Out, Spencer Saraband, 2389


Recommended Posts

Eels in your nether regions?  Isn't that a verse from T'was On the Good Ship Venus?

Aaaaaaanyway, heater is now operational, and spinnaker socks got a test today because the river was totally becalmed and it was easy to do...

The heater is bloody fabulous.  Worked first time, not tooooo noisy once its started (first start-up is a bit like an elderly P&W turbine winding up, after that its ok), controls are easy to use once I'd youtubed some instructions.

https://photos.app.goo.gl/QRCQ9Po9C8J6vZuL7

Spinnaker socks are in two designs - one with (orange) and one without (green) an internal sleeve for the endless line.  The one without works better.

https://photos.app.goo.gl/pJhM5Bri2Zfdm74x7

https://photos.app.goo.gl/PZKAe3atvCoKs9XY8

Oh, and Mrs Aardvark has almost finished re-upholstering the squabs, and they look much better now than in the 1970's forest green vinyl they were in.

https://photos.app.goo.gl/xdn8x1A9HVmNMsMp7

Link to post

Another Saraband (funnily enough also ex Tauranga) Vitesse just popped up on TM. I remember her getting launched, and it was owned by a family we knew quite well for over 30 years. She was on the same pier as the family launch so I always cast an eye over her as we walked past. Looks like the current owners gave her a good birthday. The extra freeboard would be nice, but no walk through transom.

  • Upvote 1
Link to post

Home-spun chartplotter and autopilot on Stepping Out

In earlier episodes you will have identified that we have been working at the limits of a cellphone's navigational ability.  But SO doesn't justify a full-blown suite of electronics - even a basic chart plotter would come close to 25% of her value.

So, when I found out about OpenCPN and Openplotter and the ability for the system to be scaled around what you have, my interest was piqued.  Here's the story of the build of a basic open-source chart plotter and its attached auto-pilot control system.  This is not a recommendation that you dive in boots and all - you probably have different capabilities, interests, uses and investment profiles than me - its just a story of what we have done and what we have found.

My buld is not finished yet - I suspect it will not ever be.  The adaptability of the software is such that you will always find something else it can do.  But its far enough along that I need to document it for myself, and so I figured I'd share that around.  

Take as much or as little as you want, and remember that advice freely given is worth the price you paid, no more.

I'm going to introduce the three main systems.  One of the interesting things for me is that they are independent of each other, but are designed to be integrated.

OpenCPN

OpenCPN is opensource software that turns your cellphone, tablet, laptop or PC into a fully functional chartplotter.  If your device already has GPS built into it, the software takes that information and processes it alongside to show you where you are and where you are going on charts that you can download.  In NZ, these charts are free!  It can do a whole lot more as well, and I am not going to bore you with that here - if you want to investigate its capabilities, go to the Openplotter website or even better just download the software and try it out. 

Openplotter

Warning ahead: this is serious geek territory.  If you are not comfortable hammering out a bit of computer code and/or you don't know which end of the soldering iron is the hot bit, this may not be for you.

Openplotter is opensource software that turns a humble Raspberry Pi into a full-blown data processing hub for your yacht.  It has the ability to accept and resend NMEA 0183 and 2000 data, Seatalk, etc, as well as signals from digital and analog sensors.  Depth, speed through water, wind and navigational data can all be handled by the device.  It includes software that can recombine that data as you want it and transmit it either wirelessly or on a cable to a display.  The display can be configured to suit your needs.  You can run two displays at once.  Its freaking mindlblowing what this software will make an $80 computer do.  Again, if you are interested you should go to the Openplotter website and poke your nose in.  

PyPilot

Pypilot is opensource software designed to run on very low power Raspberry Pi with a 9-axis IMU to control the electrical drive actuators of an autopilot system. At its most basic, it has been used to drive a windscreen wiper motor attached to an endless line which in turn controls the tiller or wheel. But it can also output NMEA sentences so it can be used to drive your existing system (assuming your existing system accepts NMEA data).

Mindblow time - they all work together.

Think of Openplotter as the information management centre for your yacht.  OpenCPN has the ability to "talk" with PyPilot through Openplotter, so you can plot a course, send that to pypilot and let the autopilot do the steering.  PyPilot's magnetic compass and IMU "talks" with OpenCPN so all of the sensors are available to all of the systems.  So depending on what sensors you have on board, your autopilot knows what wind-speed and direction you are experiencing and so can emulate a windvane system.  It knows the pitch and heel in real time and so can compensate for these changes in attitude.  OpenCPN knows what the autopilot is doing including how hard its working. 

Your primary chartplotter display can be located at the nav station and a second device can be in the cockpit, either as a relay showing the same thing or displaying other information such as heading, depth, wind angle and speed, COG, SOG, engine temperature, fuel and water tank levels, distance to the nearest pub, whatever.   

There are plenty of additional bits that you may or may not already have.  We'll look at those as we go.

  • Like 1
  • Upvote 2
Link to post

Having my Business partner and I just geting back in to sailing (with an IT support company between us) and working with Pi's for various commercial appications (Voip servers etc.), we are just now investigating this setup too. Spent this evenign trying to find suitable touch screens that run off HDMI and usb power.

Likely just starting with running Navionics and a multi media function for entertainment but hoping to expand this as we learn the boat, sailing, our Raymarine sensors and so on.

I look forward to your posts on the subject.

  • Like 1
  • Upvote 1
Link to post
9 hours ago, Rgvkiwi said:

Spent this evenign trying to find suitable touch screens that run off HDMI and usb power.

I've just gone for a cheap 12v hdmi TV screen at the chart table and I will use the existing kindle display support in Openplotter to provide an easy-to-see wireless numeric display in the cockpit.  Cheap, simple, plug and play.  Keyboard and mouse are USB devices off a powered hub.

I'm not a geek at all - I needed help to write one line of code into a file!  So my descriptions will be well below your pay grade.  Feel free to comment as I go.

  • Like 1
Link to post

The Bare-Bones Openplotter build

Openplotter is the core of the OpenMarine software, so it kind of makes sense to start with that to determine what you need. I, of course, did not follow this path, instead running OpenCPN on a range of old, underpowered devices until admitting defeat.

The Openplotter official website is surprisingly obtuse about this. Its a homing beacon for tech-heads who sail. They speak an entirely different language to me. This is true both literally, since most of the writers are Spanish and French, but also metaphorically because they talk in Linux acronyms all the time and assume a pretty deep understanding of Linux, Raspberry Pi architecture, and system design.

I walked in there like a 6-year old attending their first lecture on multivariable calculus.

Dazed and confused, I metaphorically sat in the corner scribbling on the wall and drawing pictures of tractors. Eventually, I worked out what I needed. The list below is to save you that embarrassment.

Here’s what gets you set up with a core Openplotter device.

A Raspberry Pi

pi-4_1.jpg

Ideally a Pi 3 or 4. Don’t skimp, they are cheap. Openplotter will run on the lowest-powered Pi 3 or even a Pi 2 at a pinch, but there is no replacement for horsepower, so lash out and get a Pi 4 with ample RAM.

A Powered USB Hub

41+26K3TCcL._SL500_AC_SS350_.jpg

When you build up your computer, you are probably going to connect stuff to the four USB ports on your Pi. They have to supply power to what ever is plugged into them, and that power comes from the Pi’s main power supply.

At some point it is possible that, if you try to run all your USB devices directly from the Pi, power out will become greater than power in resulting in a shut-down. The Pi doesn’t like this and will ocassionally corrupt its memory leaving you dead in the water. This is not helpful.

The answer is to have any USB devices attached to a remote USB hub that has its own power supply. Problem solved.

A Power Supply or two

Your Pi will draw about 0.4A @ 5V idling, more when its pushing vector maps all over an HDMI screen. You may have one or two USB devices plugged directly into it as well. It is suggested that you get a 3A supply.

I figured I'd need two of these – one powering the Pi, the other powering the hub. So I got a fistful of 12V to 5V 3A converters from aliexpress. They were crazy cheap – about $1.50 each. So I got 10.

You put 12V into one side, it puts a regulated 5V out through a standard USB port on the other side.

While I was on aliexpress, I also got a Li-on power pack. This gives the computer its own built in UPS (uninteruptable power supply). So now, if the power is accidentally disconnected, my Pi will not corrupt its memory and I have about 8 to 10 hours to fix the problem.

The UPS has its own built in BMS (battery management system) to make sure the batteries are charged and discharged safely and evenly, so I don’t have to think about a separate 12V supply to it with an external regulator. Its fantastic technology and was about $25 all up.

A GPS Receiver

G-mouse-U-blox-Microchip-USB-GPS-Receive

I didn’t have one. You might. Again, aliexpress supplied a GPS/GLONASS receiver that plugs into a USB port. U-blox 7 G-Mouse is the device’s model name and they are ubiquitous. It plugged and played. You can’t ask for more for $13 eh.

An IMU (Inertial Measurement Unit)

I2C-IIC-SPI-MPU9250-Sensor-Module-MPU-92

The picture makes it look big.  Its actually about the size of your thumbnail.  This is the bit that tells everyone which way up you are, what direction you are heading, and how fast and in which direction you are pitching or rolling. The industry standard is a device called MPU 9250 or its younger brother the MPU 9255. Again, aliexpress, and the item I received works flawlessly.

Other Stuff

You’ll need those special little leads that connect computer bits to other computer bits, a few bits of wire and some solder to assemble the power supply if you follow my path, some stand-offs to mount all the circuit boards to something rigid, and a box or something to put it all in.

Get two 32Gb microSD cards, Grade 10 or slightly better.  One will be your "in-service" memory, the other will be backed up and stored so you have a spare.

If you don’t do the aliexpress thing, there are plenty of local suppliers but the costs treble. Trade Me is the lazy man’s go to and you should find everything you need there.

  • Like 1
Link to post

It's Boxing Day! 

This is the bit I find hardest - laying out the components and making a decision on an enclosure.  I've taken 3 years or more to do it with valve amps I build, this one was relatively quick.  It was going to be i na fancy perspex enclosure with backlighting and chrome.  In the end its in a $4.95 Sistema sandwich box.

The layout is pretty straightforward.  Your main constraints are where all the ports are on the boards you have.  Make sure that getting to the RPi's microSD card is easy, and keep the IMU as far from power wiring as possible (it affects the compass).

 

In mine, the biggest board is the UPS (blue outline).  You can see the 12v supply wires (red and black) coming in from a pair of 3.5mm DC sockets.  This feeds both the UPS and the 12v-5v converters directly.

The 12v - 5v converters (red outline) have small bus bars joining them in parallel on the 12v supply side.  One converter supplies the RPi, the other supplies the USB hub.

The RPi (green outline) has the IMU (yellow outline) piggybacking off its standoffs.  At the moment, I'm only using one USB 3.0 port, the mini HDMI port and the USB-C power supply port, so there is a bunch of networking and connectivity capacity still available.

The powered USB hub (purple outline) was located where I could easily cut access holes for the four USB ports it serves.

Nothing is externally hard-wired.  The hdmi signal is fed by cable to a pair of chassis mount full HDMI sockets, and the screen plugs into that.  GPS, mouse and keyboard plug into the hub, and power comes in on a 3.5mm DC jack.  Unplug everything and I can take the box away.

As you see it now in the images, its running.  This post is being written on it.  This is proof that it doesn't have to be fancy.  It DOES have to be robust though - this is a part of your navigation suite so don't skimp on getting the right connectors, mounting stuff securely, etc.  Think about how you can build redundancy into it eg a spare 12v to 5v converter already wired and in place provides simple cheap power supply redundancy.

future work: I have a toggling main power switch device that will sit (electrically) between the UPS and the converters.  This will automatically shut off the power when the RPi is shut down, and a single press button will safely turn everything back on again when I want.  Otherwise, it either runs 24/7 at about 300ma, or I have to open the box and pull out the USB cable to the RPi - not very practical or elegant. 

openpi_outside.png

openpi_highlighted.png

Link to post

I would caution against simply shutting the Pi off via a power switch. They can and do scramble themselves if not shut down properly.

It is my understanding that there are 2 pins on the GPIO that can be switched to create a proper shutdown command that will prevent a damaged Boot Operating system.

If you google that, its something like that.

 

 

  • Upvote 1
Link to post
2 hours ago, Rgvkiwi said:

I would caution against simply shutting the Pi off via a power switch. They can and do scramble themselves if not shut down properly.

It is my understanding that there are 2 pins on the GPIO that can be switched to create a proper shutdown command that will prevent a damaged Boot Operating system.

If you google that, its something like that.

 

 

yup - that's what will be happening.  The software shutdown will trigger a GPIO pin to go high, that triggers the switching board that then turns the power off, a simple momentary N/O switch triggers the board to restart.

  • Like 1
Link to post

The hardware is the easy bit.  I mean, you can see it, touch it, fiddle with it, drop it and pick it up again, brush cat fur off it and generally mess with it.  Software -  eeeeeeew.  Messy.  Not so bad, but you have to follow instructions closely - not my strong point as the dedicated reader should already understand.

Not helped by me operating almost exclusively on a chromebook - those little joke laptops put out so millenials can watch youtube and tweet each other, and not much else.

However, it can't be too bad because I made it, so you can too.

Start by downloading the latest build of openplotter from the openmarine website.  If you are smart, you will download the basic build and not have to think too much.  If you are clever-clogs, you may want to select one of the confugureable builds.

Your choices for burning the downloaded zip files as a bootable Raspberry Pi disc (actually a microSD card) will depend on your equipment, so I won't cover that here except to say that if you are using a chromebook it takes pretty much every resource your chromie has, so you'd better have backed up your files before you descend into resource deprived hell.  Its doable, but a struggle.  I ended up removing every non-system app, and using chrome recovery to do the conversion.  The zipped files were on a 32gb USB drive, and the microSD is a 32gb item. 

Once I got it working, I burned two copies because I wasn't going through that sh*t again. 

But then the light - plug that tiny bit of plastic into your pi, power it up, and it springs into life!  

Link to post

On a separate matter, the house battery faded slowly and then gave up suddenly in the last couple of weeks.

Being a tightass, I shopped around for a replacement. AGM was just not justifiable, and I was about to drop $320 on a flooded cell deep cycle battery when I thought (duh) what about the guys who supplied our solar system?

So I dropped in there - its just around the corner from me here in Papakura - and picked up this.  Lead Acid Gel, sealed, 85a/h at 10-hour rate so similar capacity to the DC31 it is replacing, 1-year full replacement guarantee, followed by 3 more years pro-rata, $249.00 including Grab Snatch and Take.

 

IMG_20211203_105345_1.jpg

Link to post

Fitting up the TP32 tiller pilot, and I found the swan-neck tiller on SO is waaaay too low at the required mounting point.  Something needed to be fabricated to lift the mounting pin about 100mm.

I flirted with making a nice timber riser, but ultimately it was a lot of faffing around.  What about a stainless tube or similar though...  hmmmmn.

In the end the easiest was to buy a 316 150x12mm bolt and cut the head off, so I did that and started the drilling.  Except once I had done the pilot hole, I couldn't get the cutting speed slow enough so I kept galling the drill bits.

Right idea, wrong execution.

I tracked down a guy around the corner - trade qualified fitter who does home-jobs.  Dropped him a new bolt yesterday with a hand-drawn sketch, and picked this up this afternoon.  Then he almost apologised for charging me $10.  I gave him $20.

I've found my new go-to fabricator/engineer.

IMG_20211219_151402_1.jpg

IMG_20211219_151413_1.jpg

IMG_20211219_152645_1.jpg

  • Haha 1
Link to post

back to the computer.

The Sistema box wasn't working out.  It took up a lot of real estate and looks naff, so with a bit of spare time on my hands, I pulled it all apart, got an offcut of 5mm acrylic from the local acrylic guys (free!) and put together an enclosure that will sit in an existing recess in front of the chart table.

The recess is just over 400mm long, 165mm high and 35mm deep.  The new enclosure is sized to fit snug at one end and provide space to store the keyboard and mouse next to it.  It is removable so it can come home for software updates etc.

The RPi now has a heatsink and fan fitted to cool it - it was reaching thermal throttling temps before, not now.

The layout is a basic stack.  The bottom layer holds the 12v>5v converters and the main power switching circuit.  The middle layer is the domain of the RPi and IMU, and the top level houses the UPS and the USB hub.  The HDMI socket is fitted to the cover because I couldn't get it in anywhere else.

Entire thing measures 165 X 80 x 105.

Images here

  • Like 1
Link to post

While we were at it, some LED strip lighting has been installed in the pelmet over the cabin windows.  Turns out, its a bit bright and draws a surprising amount of current.

So today I made up some dimmers - aliexpress low voltage PWM boards, mounted on a black acrylic panel.  One for port, one for starboard, fore and aft circuit on each.  Each panel is 50 x 45mm

The green LED is a power indicator and helps find them in the dark!

Problem solved.

 

IMG_20220122_210511.jpg

Link to post

^They work great!  Unfortunately, double-sided foam sticky tape is not sufficient to keep them on the bulkhead, so I am going to have fix them with screws from behind.

If anyone needs a pulse-width modulation dimmer for DC circuits to 30V and about 1.5A I have a few more of the complete circuit boards hanging around (no face plate or LED, but does include the control knob).  $3 per board plus postage at cost, PM me if you are interested.

Link to post

While out last weekend we ran into a fuel problem.  Engine starts and runs and then after a couple of hours it just lost speed and died.

Approaching Music Point. Grrrrr.

I bled the low pressure system and it restarted and ran all the way to PYBC for haul out.  The next day we motored down the Tamaki, sailed to the back of Ponui, and waited for the tide to get into the Clevedon River (Wairoa River).  We sailed over and about half a kilometre off the first approach stake we fired up the engine and got ready to pull in the sails.

Just as we were about to drop the main, the engine died.  Fast about face and back out to sea, and again bled the low pressure side and the engine started and ran fine at 2000rpm. 

As we approached the dock at Brooklands we had wind and tide behind us so gave a bust of reverse, moved back into forward... and it died.  Fortunately no-one else was tied up and we had the entire length of the jetty to slow to a halt.

There was a primer bulb in the old low pressure line from the filter/separator to the lift pump, and the line was that grey plastic stuff that had gone stiff with age.  The bulb had a mist of diesel on it so it all came out and was replaced with a brand spanking new 3/8" you-beaut rubber line.

Wooohooo!!!  I bled it, it started first crank and settled to a steady 1500rpm.  For 8 minutes.  Then it died.

Diesels are simple things.  Put clean fuel into them, they mix it with air, squeeze it hard and turn it all into smoke, noise and vibrations and some leisurely motion.  If they stop going permanently, its probably lack of squeeze - thats expensive.  If the stop like ours, thats lack of fuel (or air in the fuel line) and that is simple.  There are not many places air can get in after all.

One of them is the lift pump.  And it turns out, that was the key problem.  

So, SO now has a pair of these things running in parallel. I'm not a BIG fan of electric fuel pumps on diesel engines, but I am also not a fan of spending $400 NZD and waiting 8 weeks for a new pump, so we have an electric solution that has two pumps on two separate 12v circuits.  At $20 each for the pumps, that's affordable redundancy.

The new pumps are located below the main fuel tank so they are self-priming.  And the old mechanical pump is sitting on the engine still to keep the oil inside.  Everyone is happy.  Especially Mrs Aardvark.

ZOO_S13083_01.jpg

  • Like 1
Link to post
On 10/02/2022 at 2:10 PM, w44vi said:

First thing I would have done is put in a new fuel filter, If that is cloged it creates a vacum and could allow air in to the system  

Fair point w44vi.  The filter was sufficiently clear to allow a steady flow to the original pump inlet when it was disconnected, and it really pi$$e$ out now with the electrics!

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...