Mastering Drone Motor & ESC Pairing

21/07/2006

Rating: 3.96 (6055 votes)

When constructing a drone, the meticulous assembly of brushless motors and Electronic Speed Controllers (ESCs) is only half the battle. The crucial next step, often overlooked or rushed, involves thorough testing to ensure every component functions flawlessly. Many enthusiasts, eager to see their creation take flight, connect everything – flight controller, receiver, ESCs, motors – and hope for the best. However, if issues arise, diagnosing the root cause within such a complex, interconnected system can become a frustrating nightmare. This guide advocates for a methodical, step-by-step approach to testing, allowing for rapid fault detection and resolution, ultimately saving you time and headaches.

Comment associer un ESC à un moteur ?
Il reste à faire la même manipulation avec les 4 ESC et les 4 moteurs. vous pouvez associer un ESC à un moteur en les numérotant, ce qui peut faciliter le dépannage si un des moteurs ne tourne pas, en croisant les ESC et les moteurs (une seule manip à la fois) et en notant soigneusement les différents tests pour pouvoir faire une déduction…
Table

Understanding Brushless Motors: The Heart of Your Drone

Brushless motors have revolutionised countless industries, from the humble computer fan and hard drive to high-power applications in washing machines and robotics. Their prevalence in drones is due to their superior efficiency, durability, and power-to-weight ratio compared to traditional brushed motors.

Unlike brushed motors, which rely on carbon or copper brushes to deliver current to a rotating commutator, brushless motors eliminate these wear-prone components. This design eradicates issues like brush wear, sparking, and oxidation, leading to a significantly longer lifespan and less maintenance. However, this advancement comes with a trade-off: brushless motors demand more sophisticated electronic control, which is where the ESC comes into play.

How Brushless Outrunner Motors Work

The brushless motors typically found in drones are known as 'outrunners'. In an outrunner design, the coils (stator) remain stationary, whilst the outer casing, which contains the permanent magnets (rotor), rotates around them. This configuration greatly simplifies the mechanical mounting, as the electrically energised part is fixed. A crucial safety note: always be mindful of your fingers when testing, as the rotating outer casing can pose a significant hazard.

Conceptually, the ESC precisely controls the magnetic fields within the fixed coils. Imagine three sets of coils. The ESC rapidly switches the polarity of these coils, creating an attracting or repelling magnetic field that interacts with the permanent magnets on the rotating outer casing. By sequentially energising different coil combinations, the ESC generates a continuous rotating magnetic field, pulling and pushing the rotor around. The speed at which the ESC switches these fields directly dictates the motor's rotational speed.

In reality, drone motors feature numerous coils, typically wound in three interconnected groups. This increases the smoothness of rotation and the torque applied to the rotating cage. When observing a drone motor from above, you'll see the outer casing spinning, often with an propeller attachment cone. Some cones are black, others silver, and importantly, some feature a reversed thread to ensure the propeller self-tightens during rotation, depending on the motor's intended direction (clockwise or counter-clockwise). Always adhere to the manufacturer's specified rotation direction for proper drone operation.

From underneath, you can clearly see the three wires providing power to the coils and the magnets glued to the rotor's inner surface. The minimalistic mechanical design, with a fixed electrical component, is a key advantage, with the rotor's axle typically secured by a circlip.

Motor Feedback: Knowing the Rotor's Position

For efficient control, the ESC's microcontroller needs real-time information about the motor's exact rotational position. Whilst some motors utilise Hall effect sensors for this purpose (common in older floppy disk drives), drone ESCs typically employ a more cost-effective and wiring-friendly method: measuring the back electromotive force (back-EMF).

As the motor rotates, the moving magnets induce a voltage in the coils that are temporarily not being energised by the ESC. The microcontroller within the ESC precisely measures this induced voltage. By analysing the characteristics of this back-EMF, the ESC can accurately deduce the motor's current position at any given moment, enabling precise timing of the coil energisation for smooth and efficient rotation.

Motor Identification: Deciphering the Numbers

Brushless motors come in a vast array of sizes and speeds, tailored for specific applications. For a typical 250mm racing drone, you might encounter a motor labelled '1806-2280KV'. Let's break down what these numbers mean:

  • 18: This typically denotes the diameter of the stator (the part with the coils) in millimetres.
  • 06: This refers to the height of the magnets in millimetres.
  • 2280KV: This is the 'KV rating', which stands for 'Kilovolts'. It represents the motor's revolutions per minute (RPM) per volt when operating at no load. For instance, with a 3S (11.1V) battery, a 2280KV motor would theoretically spin at approximately 2280 x 11.1 = 25,308 RPM. A higher KV rating means higher rotational speed but lower torque (suitable for smaller propellers). Conversely, a lower KV rating means lower speed but higher torque (ideal for larger propellers).

Other factors like the number of coil turns, wire gauge, and pole count also influence motor performance, but the KV rating, size, and magnet dimensions are the most commonly cited specifications.

Electronic Speed Controllers (ESCs): The Motor's Maestro

The Electronic Speed Controller (ESC) is the indispensable link between your flight controller and the brushless motor. It acts as a sophisticated electronic switch, interpreting signals from the flight controller and translating them into the precise electrical pulses needed to spin the motor at the desired speed.

WARNING!

ALL TESTS MUST BE CONDUCTED WITHOUT PROPELLERS ATTACHED! FAILURE TO DO SO POSES EXTREME DANGER AND RISK OF SEVERE INJURY!

ESC Components and Functionality

An ESC receives power directly from the drone's main battery (e.g., a 3S 11.1V LiPo). It typically features a three-wire output connection to the brushless motor. It's a common misconception, often seen on forums, that these three wires (often red, yellow, black) carry positive, negative, and a control signal, similar to a servo. This is incorrect. Unlike servos, brushless motors are not driven by a single control signal line; all three wires are actively used by the ESC to deliver a synthesised three-phase current to the motor coils.

At its core, an ESC is a speed controller. It receives a Pulse Width Modulation (PWM) signal from the flight controller, which dictates the motor's desired speed. Within the ESC, a microcontroller rapidly switches high-power field-effect transistors (MOSFETs) to deliver power to the motor coils. This intricate process generates the precise three-phase AC waveform required to rotate the brushless motor. The ESC's microcontroller is also responsible for managing various functions, including rotational speed control, over-temperature protection (by temporarily reducing power), and interpreting the back-EMF feedback from the motor to ensure efficient operation.

Comment associer un ESC à un moteur ?
Il reste à faire la même manipulation avec les 4 ESC et les 4 moteurs. vous pouvez associer un ESC à un moteur en les numérotant, ce qui peut faciliter le dépannage si un des moteurs ne tourne pas, en croisant les ESC et les moteurs (une seule manip à la fois) et en notant soigneusement les différents tests pour pouvoir faire une déduction…

The BEC: Battery Eliminator Circuit

Many ESCs incorporate a Battery Eliminator Circuit (BEC). This feature steps down the main battery voltage (e.g., 11.1V) to a lower, regulated voltage, typically 5V. This 5V output is then used to power other low-power components on the drone, such as the flight controller, receiver, and LEDs, eliminating the need for a separate battery for these components. The BEC output often features a three-wire connector (signal, positive, ground), commonly found in RC modelling.

WARNING!

For multi-rotor drones, it is CRITICAL to only use the 5V output from ONE ESC's BEC to power the flight controller and receiver. If you connect all four ESCs' BEC outputs, slight voltage discrepancies between them can cause interference and erratic behaviour. Therefore, carefully disconnect and insulate the red (+5V) wire from three of the four ESC's BEC outputs, allowing only one to provide power.

ESC Communication: Beeps and Melodies

When an ESC is powered on, it often emits a series of audible beeps, sometimes described as a 'melody'. These sounds are not generated by a tiny speaker but rather by the ESC rapidly vibrating the motor coils themselves. These beeps serve as a form of communication, indicating power-up, successful calibration, or error codes. The specific sequence and meaning of these beeps can vary between manufacturers and models, so consulting the ESC's documentation (e.g., EMAX BLHeli ESC documentation) is always advisable.

Understanding Pulse Width Modulation (PWM) Signals

PWM is the language through which your flight controller communicates with the ESCs and servos. It's a digital signal where the 'width' of a pulse determines the value being transmitted. For ESCs, this value corresponds to the desired motor speed.

Typically, RC systems operate with a PWM signal at a frequency of 50Hz, meaning a new pulse is sent every 20 milliseconds. The critical aspect is the duration of the 'high' part of this pulse, known as the pulse width:

  • 1ms Pulse Width: For a drone motor, this typically signifies 'motor off' or 'minimum throttle'.
  • 1.5ms Pulse Width: This usually represents 'half throttle' or 'neutral' for a servo. For a drone motor, it would mean half speed.
  • 2ms Pulse Width: This indicates 'full throttle' for a drone motor or 'maximum deflection' for a servo.

In proportional control, the pulse width varies continuously between the minimum and maximum values, allowing for smooth, incremental adjustments to motor speed or servo position.

Individual Testing: The Smart Approach

Whilst it's tempting to connect everything and cross your fingers, individually testing each motor and ESC pair offers significant advantages:

  • Rapid Fault Detection: If a motor doesn't spin or behaves erratically, you immediately know the issue lies within that specific motor-ESC pair, rather than troubleshooting the entire drone.
  • Component Isolation: It allows you to systematically eliminate potential culprits. If swapping an ESC fixes the issue, you've identified a faulty ESC.
  • Learning and Understanding: This hands-on approach deepens your understanding of how each component functions independently before they become part of a larger, more complex system.

For our individual testing, we'll use a Raspberry Pi to generate the precise PWM signals needed to control the ESCs.

Setting Up Your Raspberry Pi for ESC Control

The Raspberry Pi, a versatile single-board computer, is an excellent tool for generating the necessary PWM signals. We'll be using the ServoBlaster kernel driver, which allows you to control multiple servo/ESC channels from your Pi's GPIO pins.

1. Install ServoBlaster

First, ensure your Raspberry Pi is powered off. Then, connect to it and open a terminal. We'll download the ServoBlaster library from GitHub:

git clone git://github.com/richardghirst/PiBits.git

Navigate into the ServoBlaster user directory:

cd PiBits/ServoBlaster/user

2. Modify the init-script

Edit the init-script file to comment out the --idle-timeout option. This prevents the PWM output from automatically turning off after a period of inactivity, which is useful for continuous testing:

nano init-script

Find the line that looks like this:

OPTS="--idle-timeout=2000"

And add a # at the beginning of the line to comment it out:

#OPTS="--idle-timeout=2000"

Save and exit (Ctrl+X, Y, Enter).

3. Modify servod.c (for Pi 2/3/Zero Compatibility)

Edit the servod.c file to ensure compatibility with various Raspberry Pi models:

nano servod.c

Go to line 973 (you can use Ctrl+C to see the current line number). Ensure the code matches the following:

if (strstr(modelstr, "BCM2708")) board_model = 1; else if (strstr(modelstr, "BCM2709") || strstr(modelstr, "BCM2835")) board_model = 2; else

If it differs, modify it to match. Save and exit.

4. Build and Start ServoBlaster

Now, compile and install the ServoBlaster driver, and start the service:

make
sudo make install

This will install the ServoBlaster service, creating a special device file /dev/servoblaster that you'll use to send PWM commands. You can verify its presence and the default GPIO pin mapping:

ls servo* -al /dev/servoblaster
cat /dev/servoblaster-cfg

You should see a list of mapped GPIO pins. By default, GPIO 4 (physical pin 7) is typically mapped to servo 0, which we'll use for our tests.

5. Test ServoBlaster

To confirm ServoBlaster is working, try sending a test command. This command will set the pulse width for servo 0 (GPIO 4) to 250 (which corresponds to a specific pulse width, effectively turning it on):

echo 0=250 > /dev/servoblaster

If no errors are displayed, ServoBlaster is functional. To turn off the PWM output, send:

echo 0=0 > /dev/servoblaster

Connecting the Motor and ESC for Testing

WARNING!

Do NOT shorten the motor wires unless absolutely necessary. The manufacturer has meticulously stripped and tinned the enamel-coated wires for easy soldering. Shortening them requires re-stripping and proper tinning, which can be challenging due to the enamel coating and the delicate nature of the wires. Improperly prepared wires can lead to poor connections and motor issues.

With your Raspberry Pi powered off, follow these connection steps:

  1. Connect ESC to Motor: Connect the three output wires from the ESC to the three wires of the brushless motor. The order of these wires does not initially matter. If the motor spins in the wrong direction during testing, you can easily reverse any two of the three wires to change its direction.
  2. Connect ESC to Raspberry Pi: Take the BEC plug from the ESC. Connect the black (ground) wire of the BEC plug to a ground pin on your Raspberry Pi's GPIO header (e.g., physical pin 6). Connect the yellow (signal) wire of the BEC plug to the GPIO 4 pin on your Raspberry Pi (physical pin 7).
  3. CRITICALLY: DO NOT CONNECT THE RED WIRE OF THE BEC PLUG TO THE RASPBERRY PI. The Raspberry Pi will not be powering the ESC; the ESC will be powered by your drone battery, and its BEC output is for other drone components, not for the Pi. Connecting it could damage your Pi or create ground loops.

Testing Procedure: ESC and Motor Calibration

Before proceeding, double-check all your connections. Ensure no stray wires are touching, and that your work area is clear. Have a fire extinguisher nearby (this is a joke, but always be cautious with electrical components and high currents!). You are solely responsible for the safety of your setup and actions.

  1. Initial Setup & Calibration Mode: With the Raspberry Pi powered on, but the ESC NOT yet connected to the main drone battery, prepare to send a 'full throttle' signal.
  2. Initiate Full Throttle: In your Raspberry Pi terminal, send the command for full throttle (e.g., a pulse width of 200, which is typical for calibration):

    echo 0=200 > /dev/servoblaster

  3. Connect Battery: Now, carefully connect your drone's main battery to the ESC. You should hear a series of beeps from the motor, indicating the ESC is powering up and entering calibration mode. Consult your ESC's manual for the exact calibration sequence.
  4. Lower Throttle: Once the ESC has emitted its 'calibration ready' tones, immediately send a 'zero throttle' signal from your Raspberry Pi (e.g., a pulse width of 100, or the specific value for your ESC's minimum throttle):

    echo 0=100 > /dev/servoblaster

  5. Calibration Complete: The ESC should then emit a final set of beeps, confirming that the throttle range has been successfully calibrated.

Testing Motor Operation

Once calibrated, you can now test the motor's operation. Slowly increase the throttle value using the Raspberry Pi. You should hear the motor begin to spin smoothly:

echo 0=110 > /dev/servoblaster (Slight throttle)
echo 0=120 > /dev/servoblaster (More throttle)
echo 0=150 > /dev/servoblaster (Half throttle)
echo 0=200 > /dev/servoblaster (Full throttle)

Gradually increase the value and observe the motor. It should spin faster as the number increases. To stop the motor, send the minimum throttle command:

echo 0=100 > /dev/servoblaster

If the motor doesn't spin, or spins erratically:

  • Check Connections: Ensure all wires are firmly connected.
  • Reverse Wires: If the motor doesn't spin, or you want to change its direction, simply swap any two of the three wires connecting the ESC to the motor.
  • Troubleshooting by Swapping: If you have multiple ESCs and motors, systematically swap them one by one. For example, if motor A doesn't work with ESC 1, try motor A with ESC 2. If it works, ESC 1 is likely faulty. If it still doesn't work, motor A is likely faulty. Keep careful notes of your tests.

Comparative Table: Brushed vs. Brushless Motors

FeatureBrushed DC MotorBrushless DC Motor
ConstructionCommutator, Carbon BrushesNo brushes, Electronic Commutation
EfficiencyLower (typically 75-80%)Higher (typically 85-90%+)
LifespanShorter (due to brush wear)Longer (no wear parts)
MaintenanceHigher (brush replacement)Lower
Noise/SparkingHigher (due to brushes)Lower
ComplexitySimpler motor, no ESC neededRequires Electronic Speed Controller (ESC)
ApplicationsOlder toys, small fans, basic toolsDrones, Electric Vehicles, High-end appliances, Robotics

Frequently Asked Questions (FAQs)

Q: Can I shorten the wires on my brushless motor?
A: It's generally not recommended. The motor wires are enamel-coated, and properly stripping and tinning them without damaging the windings can be quite difficult. If you must, use a fine abrasive or a special enamel stripper, then tin them properly. Improperly prepared wires can lead to poor connections and motor performance issues.
Q: Does the order of the three motor wires matter?
A: No, the order of the three wires connecting the ESC to the motor does not matter for initial connection. If the motor spins in the wrong direction, simply swap any two of the three wires to reverse its rotation.
Q: Why should I only connect one BEC wire from my ESCs to the flight controller?
A: Each ESC's BEC typically provides 5V. However, there can be tiny voltage differences between them. If you connect multiple BECs, these slight differences can create conflicting power sources, potentially leading to unstable power, erratic behaviour, or even damage to your flight controller or receiver. It's best practice to use only one BEC to power your low-voltage components.
Q: What does the 'KV' rating of a motor mean?
A: KV stands for Kilovolts, but in the context of motors, it represents the motor's RPM (revolutions per minute) per volt, when spinning at no load. For example, a 2000KV motor will theoretically spin at 2000 RPM for every volt applied to it (without a propeller). Higher KV means higher speed, lower torque; lower KV means lower speed, higher torque.
Q: Why is it so important to remove the propellers during testing?
A: Motors can spin up incredibly quickly and generate significant thrust. A spinning propeller, even a small one, can cause severe lacerations or other injuries if it comes into contact with your body or other objects. Always, always, always remove propellers before any motor or ESC testing.

Conclusion

Embarking on a DIY drone build, particularly with a carbon fibre chassis and various components, is a rewarding journey. However, the success and safety of your final creation heavily depend on the diligence applied during the assembly and testing phases. By systematically testing each motor and ESC combination using a controlled environment like a Raspberry Pi, you gain invaluable insight into your hardware's performance and significantly streamline any troubleshooting process. This methodical approach not only ensures a more reliable and safer drone but also deepens your understanding of the intricate mechanics and electronics that bring these fascinating machines to life. Happy building, and fly safe!

If you want to read more articles similar to Mastering Drone Motor & ESC Pairing, you can visit the Automotive category.

Go up