Balance Bot: Pixhawk1 outputs at boot

I have assembled a Balance Bot with Pixhawk1 and this cheap generic dual DC motor PWM controller:

Two H bridges with IRF3205’s, driven with L6384 drivers.

PWM1 and PWM2 from Pixhawk1 MAIN 1-2 go to HCT02 gates connected to the L6384 drivers.

The Balance Bot works, but when connecting the battery the motors move during some instants. Connecting the battery with PWM1/PWM2 disconnected the motors move continuously. So it seems that Pixhawk1 MAIN 1-2 start as inputs during some instants, till being programmed as outputs.

So I soldered two pulldowns to PWM1/PWM2, and the motors don’t move at all at start.

Is there a way to make Pixhawk1 MAIN 1-2 become outputs fast at boot, with low level?

Hi @Webillo,

So the issue is that soon after powering up the autopilot the PWM pins momentarily go high before returning low again?

I’ve investigated this in the past and there was no way to resolve this as far as I could tell. I was told that it would require an update to the bootloader…

I suppose that after powering up the ST μP’s I/O’s start as inputs (digital or analog), for safety in most situations. The TX0108 buffer in Pixhawk1’s and the serial resistor inserted don’t change this behavior. So the HCT02’s board gates inputs are essentially open during a few instants, and this moves the motors, since the board is so simple that it does not include anything to stop this from happening. If the board is powered up with PWM1/PWM2 disconnected the same happens, except that the motors move indefinitely.

In most ardupilot vehicles brushless motors are used, powered by ESC’s, which start not moving the motors (perhaps injecting tones). But simple transistor H-bridges and DC motors are other thing.

Certainly, that would be fastest but for a particular situation, so not safe for many others. So the simplest solution is soldering pulldowns (such as 100K or greater) to PWM1/PWM2.

This board costs less than half than Pololu dual motor PWM controllers, and a fraction of the cost of Sabertooth or RoboClaw boards, but is big and without any signaling.

1 Like