I’ve finished a new boat and have tested the autopilot, with mediocre results.
First, the construction of the boat. As you can see, it’s a double hulled boat now, which adds stability at the expense of drag. It’s powered by a cheap-o motor with the extra prop from my AXN Floater Jet. The motor was independent of the autopilot and was always on and powered by two AA batteries. The autopilot itself was powered by a lithium 11.1v battery, and was located in that container you see above. There is also a length of string behind the boat that ultimately both saved and flipped the boat; I’ll get more into that later. Here’s some more images of the boat being built.
I had an idea for following a path instead of waypoints. The idea is that you give your initial waypoint (your location) and get the location of a point that is a certain distance towards the next waypoint. So if you wanted to get from point A to point B, your next waypoint would not be point B, it would be a point 8 meters towards point B. This concept is shown in the following tests/simulations.
An interesting thought occurred to me while doing the last triangle test. Since point A is defined by a GPS location, which happens to be within 4 meters of the previous waypoint, then these paths could have an error range of up to 8 meters, meaning a boat would not be able to safely cross a canal or river that is less than 8 meters wide.
The boat is in the middle of the pond in this picture. The testing of this boat was extremely stressful as several problems arose such as the wind being too strong, the rudder was slow to react (and when it did it was either to the very left or very right), and the general taking apart and diagnosis of the autopilot took a long time and put a lot of stress on the components. Here are the things I would like to do differently next time:
- Flip the container upside-down and mount all of the components to the lid (This would allow a bit more of that precious space to store the components carefully, plus the autopilot would look really neat now)
- Have the motor run not off two AA batteries, but rather the big lithium one (This would make the boat much faster and would negate any drift caused by wind)
- Run the motor off a remote control (This is necessary so if the boat were to flip over, electricity could be cut from the battery to the motor, thus making sure the battery would not short circuit)
- Adding a better and larger rudder and securing the servo better (To make sure the rudder is stronger and more effective)
- Adding floats to the line that is attached to the boat (To make sure the line did not sink and get caught on something. If the autopilot were to be over-ridden by a remote, a line would not be needed)
I noticed several glitches in the software that impacted the performance of the autopilot. These will need to be fixed before the next launch.
- The accuracy sensing loop would delay the program and cause the rudder to be delayed
- Rudder movement was sporadic at times close to the waypoint (I have already fixed this by averaging the data from the GPS)
Now the boat did end up flipping. It began to rain late in the test and since the boat did not want to turn around, I decided to pull the boat back. Eventually the line got stuck on a stick; I pulled on the line and the boat flipped. Dang. Even though some water poured into the container, the autopilot and battery are fine. The motor and servo however were soaked. I have been drying these in a container of rice for the past couple of days. I am confident they will work again.
This instructable inspired me to turn the container upside-down. Hopefully I can build and position the components as neatly as they were done on this boat