Skills: PID Control, Waypoint Tracking, GPS, Arduino
Source Code: https://github.com/kousheekc/Long-Range-Autonomous-Surface-Vehicle
Recently there have been beach restoration projects in our city and instruments were required to measure the depth of the sea floor at various locations. This process turned out to be tedious and expensive due to the labor costs as well as the expensive equipment. A boat was fitted with various sensors and drove along the coast for hours. This inspired me to build a small scale autonomous boat to perform the same tasks. The boat could be fitted with the necessary sensors and programmed to drive along a desired path and collect the necessary information. The boat would also consist of a radio based telemetry system so that the health of the boat could be monitored in real time. The boat needs to also have the feature of working autonomously and manually.
Apart from this specific experiment, I wanted to create a platform for a more general requirement, such that sensors could be easily swapped out to perform other experiments. Additionally, the aim was to create a low cost system using recycled parts and materials.
Note that a detailed write up about this project can be found here.
The hull was built using recycled water bottles. 4 two liter water bottles were used in pairs to build catamaran style hull. The tapered top of the bottle makes for an ideal design for the hull since it cuts through the water smoothly and creates very little hydrodynamic drag. The two hulls were then connected using two crossbeams that were attached using zip ties. Finally, a Tupperware container was used to contain the electronic components and was mounted onto the crossbeams using double sided tape.
The objective of the autonomous surface vehicle was to track a trajectory defined by GPS-based waypoints set by the operator. To achieve this, the boat used a GPS module and a compass module connected to an Arduino microcontroller. Once the GPS coordinates of a waypoint is set, the boat determines its own location using the onboard GPS module and calculates the required heading (in degrees) to move towards the set waypoint. Next, the boat determines its current heading using the onboard compass module and calculates the error between the current heading and the desired heading. The error is then fed into a proportional controller or a PID controller which determines the necessary velocities of the two motors to create a differential thrust that will turn the boat towards the required heading. Once the boat reaches within 5 metres of the set waypoint, it transitions to the next waypoint set by the operator.
Since the boat is expected to execute long range trajectories that could potentially last for a few hours, a telemetry system was required to relay useful information back to the operator. The telemetry system consists of two 2.4 GHz radio transceivers mounted on the boat and the base computer. The boat sends various signals such as the current location, current heading, battery voltage, motor speeds etc. Additionally, the telemetry allows the operator to set various user defined constants relating to the dynamics of the boat such as the cruise speed, kp, ki, kd values for the PID controller and so on.
The data is neatly presented on the user interface desgined on python, which communicates the Arduino based telemetry receiver. The python program communicates with the Arduino through a serial interface.
The boat consists of multiple interconnected sensor modules therefore a robust connection system was required. In most cases,
jumper wires can be used to make the connections, however, since the boat is expected to move vigorously, I designed a PCB
to hold all the various sensors and the Arduino Uno microcontroller. The PCB was later manufactured using an online PCB
fabrication platform.
The boat is fun to play around with as a toy but can be used for so much more. The autonomous features provide various
capabilities to perform all kinds of scientific experiments. For example, mounting a sonar sensor to the boat to measure
the depth of a lagoon at various points to generate a bathymetry map. Similarly, incorporating a temperature sensor to
measure the temperature of the water in a reservoir at various locations to generate a heat map of the region is possible.
Apart from scientific experiments, the cheap and sturdy build creates a perfect platform for further development.