The Robot Source parts for building robots and drones
> >

How To Build A Quadcopter
With A Pixhawk Flight Controller

Step 1  Step 2  Step 3  Step 4  Step 5-1  Step 5-2  Step 5-3  Step 6  Step 7  Step 8  Step 9-1  Step 9-2  Step 9-3  Step 9-4  Step 10  Step 11  Step 12  Step 13 Maiden Flight!

Step 6: How to Program the Q-Brain 4-in1 ESC

The full calibration of the Q-Brain 4-in-1 ESC is actually done in two separate steps and at two different times. The first involves programming the Q-Brain ESC itself. The second step is done after we setup up our quadcopter with the Mission Planner software and are prepared to tell the Pixhawk flight controller that we want our ESC's to go live. Don't be intimidated by the phrase, "programming the Q-Brain ESC", this is a very simple process that only requires an inexpensive and easy to use programming card (below photo).

turnigy programming card
turnigy programming card with TH hub connector

URAdrone.com Your Number One Drone ShopThe first step is to connect the TH Hub into the port labelled BESC on the Turnigy programming card. Be sure to connect the white wire onto the signal pin (above photo).

Next, disconnect the Q-Brain wires from the Pixhawk flight controller (be sure to make a note of each wires original connection on the Pixhawk) and connect them to the TH Hub. It is important to connect the 3 wire (white, red, black) to the first set of pins with the white wire on the signal pin, which is also identified by the white wire on the TH Hub. The other three wires (brown, red, orange) can be connected in any sequence, ensuring that the wire of each is also connected to the signal pins on the hub (below photo). Note: Not only does the white wire identify the row of signal pins, they are also identified by the "S" on the hub itself.

connecting the Q-Brain ESC to the TH Hub

Connect the battery to the system and the LEDs on the programming card will light up indicating that we are now ready to program the card (first photo). To program the ESC; first, we'll cover the procedure, then each item followed by the setup for this particular build.

Programming Procedure

Use the up/down button (below photo) to select the programmable item, the corresponding LED will begin to flash. To move across the row of each item, use the left/right button to select the correct option.

turnigy programming card buttons
turnigy programming card blue LED

Once all of the items/options have been properly selected, press the OK button, the blue LED will blink indicating that the new settings are currently being transfered to the Q-Brain ESC (above photo). When the new information has been successfully transmitted and stored to the ESC the blue LED will stop blinking and this step in the calibration process is complete. The battery can then be disconnected and the signal wires from the Q-Brain reconnected to the Pixhawk flight controller.

Programming Options and Setup

Now that we understand the procedure, let's gain an understanding of each of the programming items and options as we program the Q-Brain for this build.

Q-Brain settings
  • 1 Brake: ON or OFF When the BRAKE is set to ON, the motors will stop immediately when the throttle stick is moved to the lowest position. For our build we don't want an immediate cut off of power to the motors, but rather a gradual one, so we will set this to OFF.

  • 2 Battery Type: Li-xx or NI-xx This option sets the type of battery being used. Since we are using a LiPo battery we will set this to Li-xx.

  • 3 Cut Off Type: Soft Cut or Cut Off The cut off type sets the low voltage protection. When soft cut is used the power to the motors will be gradually reduced. When cut off is selected, the ESC will immediately shut down the power to the motors during a low voltage condition. For this build our choice is to set this to Soft Cut for a gradual cut off.

  • 4 Cut Off Voltage: Low, Middle or High The cut off voltage sets the threshold at which the previous cut off type will be activated. For this build our choice is to set this to Middle. But you can use your discretion and set it to any of the three options.

  • 5 Start Mode: Normal, Soft, Very Soft The start mode options determine how quickly the motors will accelerate from a stationary take off. A normal setting will get the quadcopter off the ground very quickly. A soft or very soft setting will get the craft off the ground more slowly. For this build our choice is to set this to Very Soft, but you can set it to your preference.

  • 6 Timing Mode: Low, Middle or High The timing mode determines the communication speed between the ESC and the motors. Our understanding of this mode is that the communication speed has more to do with the number of poles on the motors. In general motors' with a greater number of poles should be set to high and for a low number of poles the timing should be set to low. For this build our choice is to set this to High.

  • 7 Music/LiPo Cells: A, B, C or D Of all the settings, this set of items/options is the least understood. The first selection made will set the music played by the quadcopter; the second selection will tell the ESC how many cells the LiPo battery has. For this build our choice is "A" for the music and "B" (auto detect) for the battery since we will be using a 4S LiPo battery. For other music and battery selections please refer to the charts that came with your programming card.

  • 8 Governor Mode: ON or OFF Basically the governor mode determines how the ESC will adjust the lift produced by each motor. Our choice for this build is to set the governor mode to OFF, but feel free to experiment.

With these settings, we will now press the OK button to transfer these instructions to the Q-Brain ESC as mentioned previously. When the blue LED stops flashing and turns off, disconnect the battery, followed by the signal wires on the TH Hub and reconnect your wires from the ESC to the flight controller.