Instructables

Making an autonomous boat using a Raspberry Pi (WiP)

Featured
The wave of enthusiasm for the Raspberry Pi has driven many people to wonder at the possibilities, and marvel at it's simplicity. The credit card sized SBC is perfect for just about anything. Maybe even for crossing the Atlantic Ocean.

FishPi is a project with the goal of doing just that and crossing the Atlantic, using the Raspberry Pi to pilot the craft. The first step in this project is the Proof-Of-Concept Vehicle (POCV).

The POCV will test the basic principles of autonomous control with a Raspberry Pi, and I'm going to show you how to make your own.

 
Remove these adsRemove these ads by Signing Up

Step 2: The Incredible Hull

The hull I am using for the POCV is based on the Cygnus Marine DS25 Fishing Boat. It is made by a company called Models By Design, they specialise in G.R.P. model boats. The hull costs a little over £20, perfect for low budgets.

To begin with the basic components going into the hull are the Motor, Kort Nozzle, Propshaft, Propeller, and servo. The DS25 is not designed to run a Kort nozzle, but as this system works well at low RPM and high torque, I decided to trial the Kort system with a view to using it in our larger vessels.

The first step is to find the centre line of the hull. To do this is I simply held a ruler against one side of the keel and carefully drew a line along the underside of the model. Repeating this on the opposite edge put two lines on the underside. Next it was just a case of measuring the distance between the two lines and marking up the centre.

To locate holes for the Kort nozzle I had to approximate where the nozzle would be best situated, I did this by viewing the hull side on and taking measurements to get the correct distances.

Inside the hull is a wooden support. This support forms the upper brace for the Kort nozzle, and provides the lower brace for the rudder servo. The support is held in with epoxy resin.

Once the Kort was fitted I used a similar method to locate a hole for the propshaft. The hole for the propshaft was slightly elongated to allow for minor adjustment in height. As long as the elongation was in the vertical plane there should be no deviation off centre in the horizontal. Before finally cementing the propshaft with epoxy take note to align the propshaft with enough room to give the propeller clearance inside the Kort nozzle, even when the nozzle is being steered.

I found that by following the mantra of measure three times, cut once, I reached an accuracy of about 0.5 of a mm when positioning the propeller.



Step 3: Shafted

Picture of Shafted
13.jpg
14.jpg
15.jpg
16.jpg
17.jpg
The MFA 919D 540 Motor is fitted with a  single ratio gearbox. It increases the motor's torque, but lowers the RPM. It should have no problems driving the 40mm Kort propeller.

The motor needs a strong base to mount onto inside the hull. The underside of the mount is angled to match the slope of the hull. A centre pane slots into the keel giving additional strength.

At the rear the upper servo bracket is added. A universal joint connects the motor output to the propshaft. Some time must be spent correctly aligning the two before permanently fixing the propshaft and motor mount in place.

Step 4: Elastictrickery

Electricity & electronics do not fair well in water. I thought sometime about how to enclose the electronics in a watertight compartment. I looked at several options and in the end I settled on a plastic food storage box.

Why? Well it was cheap, about £3, there are no screws to secure the lid, and they are watertight. The particular box I chose had enough space for the Raspberry Pi, and the four clips which secured the lid to the base were on the lid itself. By building the electronics onto the lid and effectively turning the tub upside down I could un-clip the tub proper so that when it is removed all the electronics are easily accessible.

I cut & shaped a plywood board which would rest inside the lid.The whole assembly is screwed to two cross-members fixed inside the POCV's hull. The two side clips were removed from the lid so the assembly can sit lower in the hull. Onto the wood panel I glued a shaped foam pad, from a Yoga mat, which the Raspberry Pi sits on, and fitted three brackets to hold the Raspberry Pi in position. With the tub, now the lid, clipped in place the enclosure is completely watertight. For now anyway!

Step 5: Wired

Picture of Wired
28.jpg
29.jpg
30.jpg
Originally the plan was to connect the POCV to a Base-Station via a wired link called we termed as the umbilical. The link would provide connectivity for USB, HDMI, & CAT5e. In total there were 32 separate wires across the USB, HDMI, and Network cables. The design utilised a 32 pin aviation style connector and a 2 metre cable.

Wires would connect to the Raspberry Pi, pass through the lid of the watertight compartment and into the 32-pin connector. This would then be replicated at the other end where the cable would plug into an LCD, USB hub, and a offer a network connection.

Recently this system has been removed as it caused too many problems. The umbilical is being replaced with a Wifi link. Details of this conversion are shown later on.

Step 6: Staying Power

Six 1.2v 5000mAh SubC NiMh batteries. Quite a mouthful, they all need securely fitting into the POCV's hull, along with a switch control box.

The box switches the battery connections between a DC socket, and supplying power to the POCV. By plugging a NiMh charger into the DC socket, and with the switch it in the correct position we can charge the six cells without needing to remove them from inside the hull.

To help balance the board I put two at the rear, below the tub, and four at the front. They are held in with tie-wraps. I have used several connectors so that the batteries can be removed if necessary.

Step 7: Power Rails

The six NiMh cells are arranged in series, this gives 7.2 volts. The Raspberry Pi works off 5 volts, and the i2c rail needs 3.3 volts.

I bought two 5v, and a single 3.3v LDO regulator from Flytron. The extra 5v would be used for any other devices, like a webcam and the Adafruit PWM, that would be built into the POCV.

The LDOs convert any difference in voltage (7.2v to 5v, 3.3v) into heat. I used a passive heat-sink removed from an old mainboard, cut it into lengths that loosely matched the shape of the LDOs, and then strapped the LDOs to the heat-sink with a bit of thermal pad between the LDO and the heat-sink. This design was later updated where the tie-wraps and thermal pads were replaced with thermal adhesive. The three LDOs are screwed to tabs glued onto the wood panel.

The i2c rails are made from strip-board. Lines for +v, gnd, SDA, & SLC, are connected with 2.54mm pins. 3.3v is fed from the 3.3v LDO. Included on the i2c rails are two 1k8 pick-up resistors.

Mounted to wooden blocks at the front is the Mtronics MicroViper Marine10 ESC.

Step 8: The little things

The TMP102 Temperature Sensor, Navigatron v2 GPS, CMPS10 Compass, and the Adafruit 16 Channel PWM all connect to the i2c rails using 2.54mm pins. By encasing DuPont connectors in wood, and then gluing them to the wood panel I was able to fit all the devices into the tub, and make them all removable.

CMPS10 Compass needs to be as far away from other electronics as it is susceptible to interference. The compass is mounted inside a plastic box on a mast at the front of the POCV.

To check that all the power systems work the POCV is plugged into an LCD and turned on.

Step 9: I Spy

Picture of I Spy
57.jpg
58.jpg
59.jpg
The small form factor of the Kinobo Webcam combined with its practical rectangular shape are the main reasons for picking this camera.

One of our goals is to be able to record and hopefully transmit live images back from the mid Atlantic. I decided early on that adding in a webcam would be a addition to the POCV. The Raspberry Pi Foundation are developing a camera to work with the Raspberry Pi, but at the time of writing this the camera is not currently available.

Step 10: Spray 'N Pray

Take care when masking the hull making sure to to cover the holes, plastic parts, and any other areas where you do not want paint. I used a bin liner and modelling masking tape.

The model is hung outside on a modified wire coat hanger for spraying.

The lettering is Letraset Transfers. The letters are applied after painting, and several coats of protective varnish are sprayed over the top. The interior of the hull also gets a few coasts of the protective varnish.

The hooks around the edge are one part of a Hook & Eye system designed to hold a cloth cover over the top of the POCV.

Step 11: Putting it together

Putting the POCV together for the final assembly I had to pass the wires through the wood panel and solder the 32 separate wires to the 32-pin connector. The first attempt didn't work very well and I had to rebuild the entire cable, at both ends, using heatshrink over all the pins where the wire soldered on. In the end it proved to complicated too make it a practical solution.

Step 12: The First Modification

Picture of The First Modification
84.jpg
85.jpg
86.jpg
As with all prototypes, things need altering from their original design. The first modification to the POCV was the Raspy Juice. The LDO supplying the Raspberry Pi with 5v was getting very hot, even with the heat-sink. Luckily FishPi had been sent two Raspy Juice beta boards for testing so it was a simple case of unplugging the LDO and wiring in the Raspy Juice.

The next upgrade was the USB hub. Removing the umbilical and installing a Wifi link between the POCV and the Base-Station. The power needs of the Wifi Dongle would exceed the capabilities of the Raspberry Pi's on-board USB. So a powered USB hub was needed. I had an old 4-Port un-powered USB hub which I modified to take a 5v feed from the unused LDO which used to power Raspberry Pi.

There are still a few additions to go onto the POCV, including a Satellite Communications Module (RockBLOCK), I will post updates as the Proof-Of-Concept Vehicle's development grows.

Step 13: Software

Picture of Software
k.png
l.png
n.png
m.png
o.png
Good software is the life & soul of every project.

FishPi is no different. The Command & Control software under development for the POCV is open source. We have a repository on GitHub (link) where you can download a copy of your own, or help with development and fork from our repository. You can follow software development updates on twitter @TheFishPi_Dev.

For now we have manual control of the POCV through the Command & Control software. Al Gray, our lead programmer, is working hard to adjust the system to handle the new remote requirements imposed by the substitution of the umbilical for a Wifi link.

Ultimately we should have a system capable of autonomous navigation, satellite communications, live video feeds, and remote control. The Command & Control program should also work on any vehicle type, not just boats.

For more information about FishPi please visit our website http://www.fishpi.org, join our forum http://fishpi.org/forum/, or follow us on twitter @TheFishPi. We also have a wiki if you're looking for the full technical details http://wiki.fishpi.org/


Step 14: 18 March 2013 | Update One

There has been an alteration to the FishPi's communications. The 32-core umbilical has been removed, and a Wi-Fi link has been fitted in it's place. I'll also be adding in a RockBLOCK Satellite Communicator.

After checking the eLinux.Org list of Raspberry Pi Verified Peripherals for a compatible Wi-Fi dongle I chose the TP-Link TL-WN722N. The TP-Link has a detachable High-Gain Antenna which will be perfect to use with an RF extension.

The first job is to remove all the unwanted plastic casing from the dongle. Because I will be soldering a wire to the dongle I have also unsoldered the USB plug.

There isn't much space left inside the lunch-box enclosure so the RockBLOCK will be mounted on PCB supports where it will sit above the Raspberry Pi. I used eight 12mm M3 brass supports during the modification, but I have since replaced them with two 45mm M3 supports.

The Wi-Fi Dongle sits vertically inside two notched wooden support posts, one is permanently fixed but the other is held in by a screw. Both the Wi-Fi Dongle and the RockBLOCK have USB cables soldered directly to the PCBs.

The lunch-box base, now the cover, has been drilled and an RF extension cable mounted inside the hole. The antenna which somes with the Wi-Fi Dongle has been screwed to the extension. The other end of the RF extension attaches to the Wi-Fi Dongle.

Additional Parts Used;

The Base-Station is now an instructable too | Creating A Base-Station For Use With An Autonomous Vehicle.


kane712702 months ago

I don't understand how you will transfer live feed with the limitations that RockBlock's 340 byte message limitation. Could you go into more details on this?

comsa42 made it!3 months ago

This project gave me some pointers about building my own autopilot boat prototype! I am still in the process of building mine but I had my first launch yesterday. It uses an arduino and a more makeshift boat, but I'm sure someday it will work. You can read more about it on my blog: http://denialmedia.ca/?cat=57

test.PNGIMG_1659.JPGIMG_20140528_143150.jpg
Glany21607 months ago

Now, all this needs is a quadcopter strapped on top for the perfect, fully autonomous river explorer!

In this tutorial I find what I need to start interfacing the gps sensor with a Pi board. And because I want to help many more hobbyists to start building robots, I share this tutorial on my post http://www.intorobotics.com/gps-sensors-tutorials-resources/. Thank you!

Samuel kos1 year ago
Sry I hadn't no diced the others comments on this nevermind
Samuel kos1 year ago
You shod probably install a solar panel to charge the batteried
ToolboxGuy1 year ago
Quite a feat to accomplish! Not sure how you intend to charge the batteries whilst travelling across the ocean.... 6D batteries can barely run a few flashlights overnight, and this boat will have to be running its motor for months, plus the on board camera and other electronics.
Excellent work!!!
R1671 year ago
Great project. I really want to know how to build the control box thing in the pictures. Also, i would get some rechargeable batteries. They might be expensive now, but in the long run, they will save a lot of money on batteries.
SilverJimny (author)  R1671 year ago
There's another instructable showing you how to make the Base-Station (the big case), here;

http://www.instructables.com/id/Creating-a-Base-Station-for-Use-With-An-Autonomous

P.S. the batteries are rechargeable!.
Will you please tell me when I can use the bathroom ??… ;D

Nice project …
Very interesting project.
Please keep us up to date with some new videos
SilverJimny (author)  matefernandes1 year ago
Video added!
MartijnD1 year ago
Why not also add a track&trace system, in case the battery runs out or the pi crashes, it will send data as soon as within cellular reach. Make it sink proof and add weight to the bottom so it will always levels after flipping over.
SilverJimny (author)  MartijnD1 year ago
Funny you say that, I've jsut installed a RockBLOCK Satellite Communicator onto the POCV. I'll have an update shortly covering the install!
dex drako1 year ago
this is should be very funny adventure good luck.

an interesting alternative to the gel packs to protect the computer from water would be to submerge the Raspberry Pi in mineral oil. as a bonus this would also help regulate the temperature of the Pi.
SilverJimny (author)  dex drako1 year ago
Mineral oil is all very good until you need to service something, then you have to spend time cleaning it up! Oh and you'll need to seal the oil in to stop that leaking out too :)
nerd74731 year ago
Cool larger screen
very impressive!
storeyc1 year ago
Reminds me of this film...

http://www.nfb.ca/film/paddle_to_the_sea/
Untold1 year ago
I have wanted to do this for such a long time! I was thinking about using a raspberry pi for the high level processing and an arduino to control simple hardware and any low level functions. Best of luck with it and thanks for writing it up!!
john kabbi1 year ago
how long these batteries will be able to provide power to the boat ? i expected to see a solar panel instead.
SilverJimny (author)  john kabbi1 year ago
I've had it on for about 5 hours before the batteries failed, but that was without driving the motor. I expect maybe an hour at half throttle.

There's no need for a solar panel on this boat, its only a small scale test bed. The next vehicle with have solar.
guds7771 year ago
Are you gonna put solar sell on this apparatus...
SilverJimny (author)  guds7771 year ago
No, this boat is just a basic test. The full size FishPi will have solar panels, and that will be the one which goes on the sea. this is just for lakes, I imagine it would sink if it were to go on the sea, too many waves.
i meant that, on the finished product, thanks...
Nabil1 year ago
I really hope the little boat makes it thought the ocean! I suggest to put a note on it on several languages so if something goes wrong and gets lost somewhere, the lucky person who finds it in their mysterious coast writes u email telling you where it arrived!
agis681 year ago
wow i have to admitte how brave you are to use a Pi on a water vessel....lol.....good construction.....waiting anxiously to see the next episode!!!!


ps.....when u turn fast the rotor the cover hits the propelle....turn it smoothly
samern1 year ago
This is very facinating and is just what I have been looking for, for my autonomous robot project using the Rasberry Pi. I have one model B board and several model A boards and they work great running XBMC but I always wanted them for robot or autonomous vehicle brains. I will be watching your progress very closely. Thank you for undertaking this superb project!