top of page
Search

#14 - Figuring out Parameters, Some Dumb Mistakes, and Finally it Looks Done

  • Writer: Gavin Koo
    Gavin Koo
  • Aug 14
  • 3 min read

Alright, rewinding back to after I tested the motors to make sure they all spun in the correct direction, what I actually did was go straight to Cockpit and attempt to drive the drone. Considering I hadn’t changed any of the settings limiting the power of the motors, you can imagine that the first time I moved the joysticks, I got a little jumpscared. The motors ramped up from 0 to a screeching sound that I at first thought was due to some kind of motor malfunction, when in reality it was just that it went to an incredibly low power to high power very quickly. Eventually, I found out that this was due to a couple factors:

  • Joystick gain - the default value was set to a max of 100% of the motor’s power, meaning that the joystick would have the ability to take the motor to its total upper speed limit. 

  • Exponential joystick setting - rather than have the power ramp up in a linear fashion, I initially turned on a setting causing the power to exponentially increase—starting incredibly gradually then ramping up much faster later on—because I thought it would solve the issue of too much power. However, this only made the joystick’s sensitivity even worse

  • Deadband setting - Although this likely didn’t have as much of an impact as the other factors, I had also turned on deadband, which basically creates a small dead zone very near the neutral positions for each axis of the joysticks. This is so that any minor movements in another axis while I’m trying to control one axis wouldn’t be as likely to actually activate the motors. 


So after I fixed all these settings—I turned the gain to around 25% and turned off both the exponential and deadband settings—the drone became much more controllable and predictable. However, having taken a break after that session, I decided to move to Chrome browser (the recommended browser) rather than my current Firefox-based Zen browser. I didn’t want to risk any issues with the ground control station. However, what I didn’t realize after booting up the drone again for a new session, was that the Ardusub frame setting had actually changed. Rather than my 5 motor layout, it had somehow switched to a differently configured ROV, and I actually ended up spending like an hour being confused why all the controls were totally screwed up. But after switching back to the correct frame, everything worked out.


One final issue that I began to notice related to the power being output when multiple motors were spinning, such as during forward-backward thrust and the two front pitch motors. While I gradually increased the thrust on my controller, I noticed that one motor would always begin spinning much earlier, and seemingly much more powerfully. The slower motor seemed like it was hanging on for life even just to start spinning, meaning the motors were providing uneven thrust, which would be a pretty big problem underwater. However, after I started playing around with higher levels of gain, I noticed that the difference between the two sides would gradually become smaller. That’s when I realized that the best way to fix this problem would be to somehow limit the minimum power that the motors would be able to receive. So I changed this setting called MOT_PWM_MIN from its default value of 1100 to around 1295, and that essentially made the motors start in sync. For whatever reason, any higher, the motor imbalance would actually flip around the other way, and any number lower the problem would start showing up again, so I guess this is the best solution that I’ve got. 



So after I got all that tuning worked out, I finally put the drone together, although still not waterproofed. 



Also, here's the process I go through to power the drone on and off, I have to unscrew 4 screws to take off the back half of the body, take off the back cap, then plug in the battery.



 
 
 

1 Comment


Tim Miller
5 days ago

My mom likes your stuff

Like
Gavin's Underwater Drone

Don't wanna miss updates on this awesome project?

Note that some parts of this website still may be in the works, so apologies for any missing or non-functional areas!

© 2026 by Gavin Koo.

  • Discord
  • Instagram
bottom of page