RC Speed Boat with PX4 - Episode 0 : Trying out the Boat and integrating Pixhawk

RC Speed Boat with PX4

Motivation

PX4 is super cool, it can fly all the different flying vehicles in this world. But believe it or not, it can’t really drive rovers or boats that well.

I have heard so much about the Ardu-Rovers, and apparently, it’s really good. Why can’t PX4 be good at ground/water vehicles as well? I wanted to improve that!

rctestflight’s autonomous boat videos were a huge motivation for me in getting started with this project. Boats are just so fun! :tada:

:white_check_mark: So this project’s aim is the following:

  1. Make the boat configuration/usage easy and intuitive (by modifying PX4-Autopilot flight control software and User guide documentation)
  2. Improve the autonomous control of the PX4 boat to a level that allows similar guidance/mission planning capability as multicopters

Also I wanted to document the journey as I go along, cause why not :full_moon_with_face:

The Boat (Amewi Big Storm racing boat catamaran)

:motor_boat: To do that, I purchased with the help of Auterion, an RC Speed boat that can go up to 60 km/h!

You can check out the boat in this shop link. The specs are more well defined in this conrad website.

The specific spec is the following:

  1. 2815 Brushless outrunner motor, water-cooled
  2. 37 gram Steering servo
  3. 60A Water cooled ESC (upto 4S voltage)
  4. Recommended battery : 2 x 2S LiPo 7.4V 3000 - 4000mAh 40C
  5. Body : ABS Plastic
  6. Drive shaft : 4mm flexible shaft
  7. Length : 740 mm
  8. Width : 180 mm
  9. Weight : 1200 g

First, tidying up the boat

This product is Almost-Ready-to-Run, so it has pretty much everything except the Battery. However, I had to go through some additional steps to get it working to the state that I wanted to.

Creating a two XT60 connecter joiner

Remember how the recommended setup of batteries is having two 2-cell batteries on left/right side of the boat? Therefore the ESC has two XT60 connecters in series connection so that you can directly plug in two batteries.

However, I did not have a XT60 compatible 2-cell batteries at hand, which meant that I needed to basically re-join those split-out connectors and have a single XT60 connector, to which I would connect a 4-cell battery.

It was a tedious process and quite dumb (since I am re-joining the purposely split-out connectors :rofl:), but in the end a flux and a high-heat capacity soldering iron helped in making the connector :wink:.

Attaching a power module to measure battery voltage / amperage in real-time

Since I want the autopilot to have knowledge of battery voltage and amperage usage, I needed to connect a power module. An ideal unit to use would be something that has a XT60 connector on each side with a heat-shrinked (electrically isolated & water-resistant) power module, something like this:


Image Source: Holybro PM02 power module

But of course, in real life you never have perfect conditions, and I couldn’t find a power module with that shape with a compatible connector (to connect according to the pixhawk 4 hardware specification) attached.

So I ended up using the Holybo Micro Power Module PM06, which meant that I am wasting 3 other connections (as you can connect up to 4 power outputs), but that was best I could do :frowning_face:.

And since having exposed electrical pads like that in a crammed-space like inside the RC boat is an electrical short waiting to happen, I surrounded the power module with a rubber balloon to electrically isolate the board and make it water-resistant :balloon:

Applying the marine grease to the flexible shaft

Surprisingly, according to the RC community, is really important to apply the marine grease to the shaft that drives the rotor regularly (after a day of use even!).

So before running the rotor under high load, I got an RC Marine Grease gun kit and disassembled the shaft-motor coupler and pulled out the shaft to grease them properly :diya_lamp:

With a 7 or 8 mm Hex wrench, you can disassemble the coupler from this:

To like this:

And when you apply the grease, it has this blue-ish color which looks something like this:

It was quite fascinating to learn the existance of all the intricate mechanical components in the flexible shaft assembly.

So here’s a pic in case you are interested:

image

Mounting the Flight controller and GPS

You may be surprised to learn that having a GPS module is critical in terms of having a reliable & accurate global state estimation of the position of the vehicle. And especially for a boat that can travel over distances around ~20 km, a GPS is a must for a reliable navigation!

So I decided to stick the GPS that is compatible to Pixhawk4 (It’s uBlox M8N, a very well known & reliable module) on the lower side of the cover (since the module isn’t water proof) and hope that it wouldn’t have so much Electro Magnetic Interference from the ESC & Motor sitting right underneath it :face_holding_back_tears:

Then I also noticed that using Pixhawk4 is a pain in terms of connecting the IO pins as it doesn’t expose the Servo-style 3-pin input/output pin connections, but rather needs an IO expansion board to connect a Servo and ESC to it.

Having an IO expansion board which has contact points like the Ground potential & probably the 5V- power line and signal lines exposed was another disaster (signal interruption / electrical short circuit) waiting to happen, so no thanks Pixhawk 4 :stuck_out_tongue_winking_eye:

image

Also, Pixhawk4 is quite big as well so there was no reason to go for Pixhawk4 when I had Pixhawk 4 mini in hand, which has the output pins exposed in Servo configuration out of the box, as well as having a small form factor. No brainer! :brain:

And just some wiring/cable management

Since I was moving the components around and wanted a tidy & organized internal structure, I did move around the battery connectors and cooling-water hoses.

This was done to make sure that they don’t twist together and cause unnecessary constrictions in the hose (which would degrade the water cooling capability, which then would lead to over-heating ESC and possibly killing it :skull:)

Limatt River Test

Here’s a snippet video that shows what the behavior of the boat was like. You can probably tell that it’s quite snappy and fast and reactive (especially when the speed is higher!)

And here’s a pic of the boat, next to the boat I was riding on :rowing_man:

Old Receiver caveat

Unfortunately, on this first ever test I didn’t actually utilize the PX4 as the driver of the boat (the Servo / ESC were not connected to the flight controller), since I couldn’t figure out the Receiver situation.

As the transmitter & receiver that was shipped was a very old configuration, the receiver had raw PWM outputs on each of it’s pins as the commanded values of Throttle and Steering.

However, as far as I knew PX4 didn’t support such Receivers, but rather only supported PPM (Multiple channel data getting sent on a single pin/bus), which was obviously not supported with the old receiver that was delivered with the boat.

So having to take the boat on a rubber boat itself and having space constraints, I didn’t consider taking a full 10+ channel RC transmitter used for multirotors, and just went with the old legacy transmitter.

Which meant that PX4 wouldn’t be controlling the boat anymore, but would act as a data-logging device. But it was still cool, since this is the beginning!

Log Analysis

So here’s the uLog uploaded in flight review viewer. Feel free to roam around and check out the values.

And here’s the branch I used for flashing the PX4-Autopilot software. It cherry-picks the Rover rate control PR and includes a custom airframe for the boat I am using :wink:

Here is a quick screenshot showing how the battery current consumption (which sometimes reached 40 amps!) seems to have some affect in the magnetometer data (as the sensor is so close to the power source).

It is also interesting to note that the boat reached 10 m/s (36 km/h!) as well, and the gradual voltage drop of the 4-cell battery.

And here’s a 3D-view that shows an iris quadrotor flying above the limatt river, where in reality the boat was cruising at the water level :rofl:. I am not sure why the altitude is shown like that, that could be an interesting investigation!

The boat is (according to the log) totally in the skies :parachute:

Recap

So it was an interseting test, I have verified and checked:

  1. Boat’s capability (Responsiveness / Throttle sensitivity)
  2. Boat’s weakeness (The Servo push-rod connector slipped off from the grub-screw fastened slot, so that needs some lock-tight I believe)
  3. Boat’s water-proofness (Some water got in, I am still not sure how but I now know that I can’t assume that there will be no water entering the boat!)
  4. Battery usage (30A at 16 V equals to around 480 Watts at peak power of today’s test)
  5. That I can fit the flight controller and have reliable sensor data logged

What’s next?

Next objectives now are:

  1. Having a [rate-controlled Boat control] with throttle and servo directly actuated from the autopilot (Add support for Acro mode on Rovers with Rates Control by Jaeyoung-Lim ¡ Pull Request #18317 ¡ PX4/PX4-Autopilot ¡ GitHub)
  2. Doing an autonomous waypoint mission in the lake with the boat

Excited what’s gonna come next as I progress with this project! Thanks for reading this post everyone! :open_hands:

4 Likes

Awesome project Junwoo.

I’m curious why the wiring was originally set up for 2x two cell batteries? Do you know if that was maybe due to balancing the vehicle (e.g one on each side)?

What soldering station are you using and type of solder?

That power module you used is perfectly fine! It only takes up more space than the original PM02, which imo tends to be off when measuring current when current based load compensation is used. I don’t know if the pm06 suffers the same issues. Extra battery pads are helpful for future expansion when you need to tap battery voltage.

Finally I wonder if there is a better way to prevent electronics from water. I see some do plastidip but that really inhibits modularity and expansion. Perhaps 3d printed enclosures coupled with a sealant/silicone to the plastic enclosure seams? Could also use o-rings and seals but that’s getting fancy :sunglasses:

1 Like

So cool! Love it! Can’t wait to see more!

1 Like

Thank you for your interest Andrew :wink:. To answer your questions:

  1. Yes I believe the manufacturer’s intent is to have 2 batteries for balancing reasons. And I also noticed that when I only have one battery, the boat tilts in that direction and directional control isn’t consistent (e.g. with battery on right, right turn is effective but left turn is hard to execute)
  2. I am not sure which soldering station it was (it is company’s), but it’s nothing special. And the solder was just a solder with flux core :thinking:.
  3. Nice to know! What do you mean by “current based load compensation”? And yes I didn’t think about the aspect of having more battery ports :stuck_out_tongue_winking_eye:. That is indeed a benefit!
  4. Hmm, Yes this is something I think affected the test in my second test (post coming soon!), so I should start thinking about this as well. That’s a cool idea, actually I was aware that 3D printed parts suffer from water leaks (haven’t tested myself) but honestly if I wanted to solve them easily (since mos t components are water-resistant, and only the connectors are causing problems [I think]) is to install waterproof connector to every signal bus (e.g. PWM 3-pin servo signal to ESC) :thinking:. What do you think?

Very cool @junwoo0914

How about we copy the setup into the docs as a peer of Rovers (UGVs) | PX4 User Guide ?
I can do first version and then you might keep updated?

Note: the PR is there, but I didnt fill in the necessary details :thinking::pensive:.

Since I am not working with the boat anymore, that also makes it harder for me to keep it up to date, since technically I wont be using this build in thr future.

I am thinking that maybe a new build with a smaller boat would be more worth it to write about (Biggest pain with this racing boat was that it was heavy & big & leaking water)!

@junwoo0914 I think the important thing here is to have a boat that people can build and verify some of this stuff themselves. So a smaller and affordable boat would be “a good thing”.

At the moment I look on Boat as experimental - we really don’t know what works and what does not. I don’t particularly want to promote it unless there is something we know has been tested end to end. It doesn’t even have to be great - it just can’t be “we have no real idea”.

What sort of timeframes are you looking at? Do you want to close the issue for now? Or modify it to state that this is untested on real frames? Or just wait?

1 Like