What you will need

  • A base station computer with QGroundControl installed

  • An initialized Flight Controller running PX4 with the parameters already loaded

  • ESCs already flashed with Bluejay

  • The Duckiedrone battery and a long data-capable USB-A-to-USB-C cable

What you will get

  • A Flight Controller that drives the four motors in the correct order, each turning the right way

Motor configuration#

The Flight Controller needs the motor order and spin direction to match the configured quad-X layout. If either is wrong, the Duckiedrone will not fly and may flip over the instant it leaves the ground. Work through this page slowly.

Danger

Keep the propellers off the entire time while following instructions on this page.

Attention

Make sure the battery is charged, and connect it to the Duckiedrone, since the motors need power to spin.

1. Connect the Flight Controller to the base station#

Connect the Flight Controller to the base station with the data-capable USB-A-to-USB-C cable. An extension or an adapter may be needed, depending on the setup.

Then, on the base station open QGroundControl. After a few seconds it will automatically detect the vehicle, as described in the Flight Controller connection procedure. Wait until the top toolbar shows the vehicle as connected before proceeding.

2. Motor order#

Open the Actuators page from the left sidebar in QGroundControl. This page is where PX4 maps each physical motor on the frame to an output on the Flight Controller.

QGroundControl actuators page showing the Duckiedrone DD24-B motor configuration

Fig. 66 QGroundControl Actuators page showing motor numbering, positions, spin configuration, and ESC communication protocol.#

PX4 has a fixed idea of where each motor belongs on a quadcopter. When it refers to Motor 1, …, 4, it means a specific corner of the frame. The Duckiedrone DD24-B frame is a “quad X”, and the numbering PX4 expects is:

  1. Motor 1 is at the front right.

  2. Motor 2 is at the rear left.

  3. Motor 3 is at the front left.

  4. Motor 4 is at the rear right.

The front is the direction the Duckiedrone flies forward. It aligns with the arrow in the QGroundControl diagram and with the direction of the camera and duckie on the Duckiedrone.

Motor configuration on a Duckiedrone DD24-B

Fig. 67 Motor configuration on the Duckiedrone.#

Identify and label each motor. QGroundControl has a guided routine for this. On the Actuators page, start the motor identification routine. It spins one motor at a time and asks which motor spun. QGroundControl then reassigns the outputs to match the selected order.

QGroundControl motor identification and assignment automatic procedure instructions popup

Fig. 68 QGroundControl automatic motor-identification procedure.#

Note

The motors will spin only if the Duckiedrone battery is plugged in.

3. Motor spin direction#

Once every motor is on the correct number, check which way each one turns. On the Duckiedrone, the “props-in” motor layout expects:

  1. Motor 1: front right, black nut, spins counter-clockwise.

  2. Motor 2: rear left, black nut, spins counter-clockwise.

  3. Motor 3: front left, red nut, turns clockwise.

  4. Motor 4: rear right, red nut, turns clockwise.

Spin each motor from the Actuators page and compare its direction against the list above. Make a note of any motor that turns the wrong way.

Warning

Before reversing a motor, compare its nut color with the list above. A motor whose nut color does not match its corner was mounted on the wrong arm. Do not reverse it: its propeller nut would then unscrew in flight. Fix the assembly instead, by following Duckiedrone DD24-B assembly instructions.

Note

The Set Spin Direction controls appear after DShot is selected and the motors are assigned. This procedure assumes the Bluejay-flashed ESCs from Initializing the ESCs.

To reverse a motor, send a PX4 DShot command to its ESC:

  1. Open the terminal inside QGroundControl by going to Analyze Tools and then MAVLink Console. This opens the PX4 shell.

  2. In the shell, reverse the motor by its number. For example, to reverse Motor 3:

    dshot reverse -m 3
    
  3. Go back to the Actuators page and spin that motor again to confirm that it now turns the right way.

  4. When the direction is correct, save it so that it survives a reboot:

    dshot save -m 3
    
  5. Disconnect and reconnect the battery to power cycle the ESC. Once it comes back the new direction is locked in.

Repeat these steps for every motor that was turning the wrong way.

Checkpoint ✅#

To verify the motor order and the spin directions:

Test

With the propellers off and the battery connected, spin each of the four motors from the Actuators page.

Expected Result

Each motor spins at the corner listed in 2. Motor order, in the direction listed above for its nut color.

Next step#

Disconnect the battery. The Duckiedrone setup and configuration is now complete: continue to Preparing the software stack.

Troubleshooting#

Troubleshooting

SYMPTOM

The motor identification popup does not appear.

RESOLUTION

Assign the motors by hand. Turn on the switch that enables the motor sliders on the Actuators page, then move one slider by a small amount and watch which motor on the frame spins. Note the corner that moved, then assign that output to the corresponding motor function in the interface. Repeat for all four motors until every number lines up with the real position on the frame.

Move the sliders only a little and keep the propellers off. Just enough movement to see which motor turns is needed.

Troubleshooting

SYMPTOM

A setup step does not work as described.

RESOLUTION