Monday, July 14, 2014

ArduBoat: modifying a low-cost RC boat for aquatic auto-piloted missions

In our fieldwork on Rapa Nui, we have been interested in locating points where freshwater seeps out of the groundwater table into the ocean as these areas appear to be significant features of the prehistoric landscape.  There are a variety of ways in which we have done this work — thermal mapping, conductivity measures, temperature profiling and so on.  Recently, we used a kayak to measure changes in conductivity and temperature along the shore (dragging a level logger). It occurred to me, of course, that robots might make a more systematic survey than what we can do in a kayak in that they could run in consistent transects along the coast in parallel lines. We could then run the transects over and over at different tidal heights and match the survey with thermal quadcopter runs.  Naturally: Robots Do It Better (tm).  In this way we can get spatially consistent measurements that are be well suited for locating discrete spatial features associated with freshwater. We use aerial drones for mapping - why not a water based floating version?

So this thought train has led me to test out the practicality of a simple robot boat that I can test out on Catalina.  Of course, there lots of folks who have made versions of RoboBoats (or Arduboat https://www.youtube.com/watch?v=ogQsaIHyJnk) - this is not a new idea.  For me (lacking shipping building skills) much of the challenge appears to be simply making a boat that is suitably shaped with the various props and so forth. 

Boat

While at Harbor Freight, I came across a radio controlled boat that seemed like it might be ideal for modifying into a robot boat. http://www.harborfreight.com/radio-controlled-speedboat-95641.html  This reasonably inexpensive ($50) RC boat runs on two electric motors that are controlled with a simple speed controller/RC interface. What is potentially ideal about this boat is that it is steered by two props — no need to have a rudder. This configuration is similar to the “tank” configurion in the ArduRover where steering is accomplished by two wheels (http://rover.ardupilot.com/wiki/setup/) In addition, for this boat the sizes of the motors appeared similar to brushless motors I’ve worked with on multicopters.  With some changes to the motors, the addition of a speed controller (ESC) and the APM autopilot, it seemed like a relatively simple conversion.  

NewImage

As I wanted to make the boat use the same basic configuration as an ArduRover, I purchased two brushless inrunner motors that are the same diameter and length as the original ones (http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=42448). I addition to size/configuration, I picked these motors out of a large number of possibilities basically on price alone. I am entirely unsure what configuration I would want for a boat motor but these motors were cheap enough to use as a start.  I used two 30  amp ESCs I had laying around from a multicopter (http://www.hobbyking.com/hobbyking/store/__2164__TURNIGY_Plush_30amp_Speed_Controller.html) I am certain there is probably a better ESC configuration for a boat (one that does reverse?), but this is what I had available. Finally, used a 4 channel RC controller ($24) http://www.hobbyking.com/hobbyking/store/__8338__Hobby_King_2_4Ghz_4Ch_Tx_Rx_V2_Mode_2_.html  and, of course, a 2.6 APM Ardupilot (https://store.3drobotics.com/products/apm-2-6-kit-1). Using a LiPo battery with an XT-60 connector and the APM power module (https://store.3drobotics.com/products/apm-power-module-with-xt60-connectors). 

Following the instructions here (http://rover.ardupilot.com/wiki/setup/) but corrected to suit my Mode 1 receiver (I should probably use a Mode 2 but since Im not planning on manually driving the boat, it shouldn’t matter), connected the in this way:

RC receiver          —>  APM Autopilot Input

Channel 3   ->            3

Channel 4  ->             1

Channel 5  ->            7

Channel 6  ->             8

 

On the output side, I connected the ArduPilot output in this way:

ArduPilot Ouput      ->  ESC

1     -> ESC on port side

3     ->  ESC on starboard side. 

Here is what I have so far:

Photo 2

 What is still missing is the telemetry link to allow the boat to update the ground station with position information (Ill use the 3DR radio set: https://store.3drobotics.com/products/3dr-radio) and the GPS (https://store.3drobotics.com/products/3dr-gps-ublox-with-compass). While I have the GPS, I need a new cable that is longer so I can attach it onto the bow of the boat.  In essence, both of those are basically plug and play. The radio is powered via the APM and the DF13 connector. 

Physically, the motors fit right into the existing motor mounts.  The shaft of the new motors has a slightly great diameter than the original ones so I had to drill out the coupling part (which is plastic) so that it would fit. 

On the APM side (using Mission Planner) you need to configure the APM to use “Skid Steer” — a vehicle with dual throttle steering (like a tank). This is done by altering the APM parameters (see: http://rover.ardupilot.com/wiki/apmrover-loading-the-code-and-setup/)

Skid Steer Functions:

  • Skid Steer IN enabled (set to 1) sets up the APM to control a Skid Steer vehicle with a dual throttle skid steer transmitter.
  • Skid Steer Out enabled (set to 1) sets up the APM to control a Skid Steer vehicle with a conventional single throttle RC transmitter.

 

SKID_STEER_IN: DISABLED Set this to 1 for skid steering input rovers (tank track style in RC controller). When enabled, servo1 is used for the left track control, servo3 is used for right track control
SKID_STEER_OUT: ENABLED Set this to 1 for skid steering controlled rovers (tank track style). When enabled, servo1 is used for the left track control, servo3 is used for right track control

 I’ve done some basic tests and it seems to work as least in principle. I’ll need to get the GPS cable before I can do an real tests with the mission planning. Also, Im not sure how long the battery will last or how to tune the motors to get appropriate RPMs (right now the motors spins like a multicopter — and would rocket across the lake). But so far so good!