This is a post from my blog, which I have long since stopped maintaining. The page has been preserved in case its content is of any interest. Please go back to the homepage to see the current contents of this site.
Here’s a thing that I don’t have, wouldn’t have time to use, and really shouldn’t buy. But a thing that I really want anyway. It can do 40 knots.
While I haven’t quite talked myself into buying it yet, I have been thinking about the hardware to make it autonomous, and whether I should develop a simple, standard set of hardware for the job.
Although an Ardupilot would work pretty well, I don’t find it it particularly intuitive to use, and for obvious reasons I’d rather use the autonomous navigation software that my team and I have spent the last eight years writing—and that means a real PC. We’ve had it running on a Raspberry Pi Model B, although it’s a bit on the slow side, so the new Raspberry Pi 3 is the logical successor. It has built-in WiFi, but with such a tiny antenna that users report a very limited range, so a separate WiFi adapter will be needed as well.
Control of the throttle ESC and rudder servo are via PWM signals in vehicles like this, and the Pi cannot properly generate by itself. When our graduates at work built a similar boat a couple of years ago, they used an Arduino Mega for PWM control, but that’s probably overkill—for my quadcopter I used this servo control board that fits neatly on top of the GPIO connector.
What I’d also like to do is optionally pass through the PWM from an RC receiver to the boat, so I can easily swap between remote and autonomous modes. The board above has a 3.3v-5v buffer chip on the PWM channels which renders it output-only, but the USB equivalent has no such buffer and could be used for input and output.
Handily, moving the servo control from the Pi’s built-in UART to USB frees up that UART for receiving GPS data, with I2C used for the equally important heading sensor. I’m using the CJMCU uBlox 6M GPS & HMC5883L Compass module scrounged from my quad.
The two smaller boards should mount on top of the Pi using spacers and mounting holes in the boards, resulting in a neat self-contained unit capable of autonomous control and remote access via WiFi. The architecture looks something like this:
That’s enough to get started with, and if it works well, it can be used as a standard platform on which to build additional features. The first expansion is likely to be a camera for remote FPV control similar to the All-Terrain Pi, and hopefully the Raspberry Pi 3 is also powerful enough for some simple machine vision processing to drive Autonomy’s collision avoidance algorithms.