Autopilot for boat (PART 1 – Assembling the electronics)

Two years ago I started working on a very interesting project at Petnica Science Center[1]. The goal of the project was to hack an RC boat toy and implement an autopilot on it. Here I’ll tell you more about my experience on this project. First of all I needed to decide how to do localization of the boat. Autopilot systems on large scale boats use GPS to localize because it can give position estimate within 15m accuracy. In my case this error is big compared to the size of the lake where I planned to test the system. One good thing is that GPS systems have very accurate speed estimation which can be combined with some information about direction of moving in order to calculate current position. So, I decided to use a GPS module and an electronic compass in a combination with a microcontroller. Just to be sure in my decision, I made a simulation of localization algorithm in MATLAB and added GPS and compass errors from datasheets, and the output results were suitable for the project. My choice of equipment was a GPS module and a PIC32 microcontroller from Mikroelektronika[2], and an electronic compass from Mikrokopter[3]. This electronic compass has a built-in IMU which is very important because it compensates the error of heading measurements when the boat is shaking. Here comes the interesting part: choosing an appropriate RC toy. The most important thing here is to choose a toy which has enough free space for additional electronics. The second important feature is the power of motors because of the increase in the toy weight. I bought some used toy and I was ready to start working on the project!

This is the original toy which I used for the project
This is the original toy which I used for the project

It is very important to put all electronics and mechanics together at the very beginning. Ignoring this will cost you a lot of time in your later work. Although the best way for assembling electronics is printing a circuit board and soldering wires, I decided to use a breadboard and a lot of jumpers. The battery which came with boat wasn’t capable for working more than 15 minutes, so I needed to buy another one. Batteries are also very important for boat balancing, because they are the heaviest part in the whole boat. Another interesting problem is placing electronic compass such that other devices don’t affect its behavior. I had to rearrange all inner parts of boat several times until I managed to have the compass far from other components with strong magnetic field.

Here is how the boat looked like in some moment of assembling
Here is how the boat looked like in some moment of assembling

Welcome!

Hello and welcome to the official blog of Applied Physics and Electronics seminar at “Petnica” Science Center! As you may read on our webpage it is our goal to guide talented students through various aspects of scientific research. Some of the areas we are interested in and focus on are computer vision, navigation, robotics, pattern recognition, simulations, applied physics, telecommunications and embedded systems. The purpose of this blog is to try to give you an insight to what we do and inspire you to join us and work on some of the projects yourself.

Be sure to check the blog from time to time for updates as we have many interesting things to share or just like our facebook page so you get the notifications.

I hope you’ll enjoy the posts!