The Core Loop: How a Drone Actually Flies
A drone operates by using a microcontroller-based flight controller to read inertial sensor data and adjust the speed of brushless motors via electronic speed controllers (ESCs) to maintain stability and execute movements. This happens inside a closed-loop control system running thousands of times per second. The onboard Inertial Measurement Unit (IMU) detects physical orientation changes, the microcontroller calculates the error between the desired and actual attitude, and outputs a corrective signal to the ESCs, which then commutate the 3-phase brushless DC (BLDC) motors.
In a real circuit, integrating a drone flight system changes your design from simple DC switching to managing high-frequency 3-phase AC generation and ultra-low-noise sensor buses. You are no longer just switching a MOSFET on and off; you are generating synchronized, variable-frequency 3-phase waveforms while simultaneously reading micro-g accelerations over SPI or I2C without electromagnetic interference (EMI) corrupting the data.
The Math: Motor KV, Voltage, and Current Draw
To understand how a drone works physically, you have to look at the electromechanical conversion. Brushless motors are rated by their KV (RPM per volt) rating. Let us run a worked numeric example using a standard modern 5-inch freestyle drone build.
First, we calculate the theoretical no-load maximum RPM. If we apply a fully charged 6S battery (25.2V) to a 2450KV motor, the math is straightforward:
2450 KV × 25.2V = 61,740 RPM (no-load)
However, under load, the RPM drops significantly due to aerodynamic drag and motor inefficiency. More importantly for your electrical design, we need to calculate current draw to size the ESC and battery wiring. At a typical hover, a 5-inch quad requires about 500 grams of thrust per motor. Based on empirical motor thrust testing, generating 500g of thrust on a 5045 propeller at this KV requires approximately 12 Amps per motor.
| Flight State | Thrust per Motor | Current per Motor | Total System Current | Wire/ESC Requirement |
|---|---|---|---|---|
| Hover | 500g | 12A | 48A | 20A ESC minimum |
| Cruising (Forward) | 750g | 18A | 72A | 30A ESC minimum |
| Max Burst (Punch-out) | 1800g | 45A | 180A | 50A+ ESC, 12 AWG silicone |
This is why a 5-inch drone uses a 4-in-1 ESC rated for at least 50A continuous per channel, and the main battery leads are soldered with 12 AWG or 10 AWG silicone wire. If you attempt to run this setup with 16 AWG wire, the 180A burst will cause severe voltage sag, triggering a brownout reset on the flight controller’s 5V or 3.3V voltage regulator.
Where You Meet This in Practice: Wiring the Stack
Where you meet this in practice is on the workbench, stacking the flight controller (FC) and ESC, and routing the signal and power traces. The physical layout of a drone stack is a masterclass in managing mixed-signal electronics in a high-vibration, high-EMI environment.
Modern flight controllers typically use an STM32F405 or STM32H743 microcontroller. The IMU (like the ICM-42688-P) connects to the MCU via SPI. SPI is preferred over I2C for the primary gyro because it supports much higher polling rates (up to 32kHz on modern hardware), which is critical for the PID loop to react to high-frequency frame vibrations.
When wiring the stack, follow these embedded best practices:
- Use the provided ribbon cable for FC-to-ESC communication. This cable carries the 4 motor PWM/DShot signals, ground, and sometimes a current sensor telemetry line. Keep it as short as possible to prevent signal ringing.
- Isolate high-current paths. The motor phase wires (the three wires connecting the ESC to the stator) carry high-frequency, high-current AC. Route them away from the SPI lines and the GPS UART lines. Cross them at 90-degree angles if they must intersect.
- Verify the BEC (Battery Eliminator Circuit) limits. The ESC usually has a built-in buck converter outputting 9V or 12V to power the FC. The FC then steps this down to 5V for peripherals. If you connect a high-draw HD video transmitter (VTX) pulling 2A to the FC’s 5V pad, you will overheat the onboard linear regulator. Always wire high-current peripherals directly to a dedicated 5V BEC or the ESC’s 9V pad with its own step-down module.
For deeper dives into ESC protocol timing, Oscar Liang’s guide on ESC protocols remains the definitive reference for understanding how digital signals like DShot300 and DShot600 replaced analog PWM to eliminate signal jitter.
Scenario Walkthrough: The PID D-Term Spike and Motor Burnout
Theory is clean; bench testing is messy. Here is a real-world scenario walkthrough of how a drone works when the control loop fights physical resonance.
The Setup: A newly built 5-inch freestyle quad using an ICM-42688-P gyro, running Betaflight 4.4. The frame is a lightweight carbon fiber unibody design. The builder enabled the default PID profile, which sets the Gyro Sampling Rate to 8kHz and the PID Loop Frequency to 4kHz. The D-term (Derivative) lowpass filter cutoff was left at the default 250Hz.
The Numbers: During a hover test, the telemetry showed the motors drawing 14A each (slightly higher than the expected 12A). After 90 seconds of flight, the builder landed. The motor bells were too hot to touch (measured at 85°C with an IR thermometer), and there was a faint, high-pitched acoustic scream during flight.
The Outcome: The motors were overheating, and the ESCs were on the verge of thermal desync. The flight controller was effectively fighting itself.
What Went Wrong: The lightweight carbon frame had a natural mechanical resonance frequency at roughly 180Hz. The gyro picked up this vibration. In a PID controller, the Derivative (D) term calculates the rate of change of the error. Because the D-term acts as a high-pass filter for noise, the 180Hz frame vibration passed right through the 250Hz lowpass filter cutoff. The D-term amplified this noise, sending thousands of micro-throttle spikes per second to the ESCs. The motors were rapidly accelerating and decelerating by tiny fractions of a degree thousands of times a minute, converting electrical energy directly into heat rather than thrust.
FAQ: Embedded Drone Quirks
Why do drones use 3-phase brushless motors instead of simple brushed DC motors?
Brushed DC motors rely on physical carbon brushes and a commutator to switch the current direction in the rotor. At the 50,000+ RPM required for drone flight, physical brushes would generate immense friction, heat, and wear out in minutes. 3-phase BLDC motors have no physical electrical contacts on the moving part; the commutation is handled electronically by the ESC, allowing for massive RPMs, higher efficiency, and vastly longer lifespans.
What is DShot and why is it better than standard PWM?
Standard PWM (Pulse Width Modulation) sends an analog-style pulse where the width of the high signal (e.g., 1000µs to 2000µs) dictates the throttle. This is susceptible to electrical noise and latency. DShot is a fully digital protocol (like UART) that sends a binary packet of zeros and ones representing the throttle value. It is immune to signal jitter, requires no calibration, and includes a checksum to prevent the ESC from acting on corrupted data.
Can I use an Arduino Uno as a flight controller?
Technically yes, but practically no. An Arduino Uno (ATmega328P) runs at 16MHz and lacks a hardware floating-point unit (FPU). A modern drone PID loop requires calculating complex matrix math and trigonometric functions at 4,000 to 8,000 times per second. The Uno simply cannot process the IMU data and output the motor signals fast enough to maintain stability. You need a 32-bit ARM Cortex-M4 or M7 processor (like the STM32F4 or H7 series) running at 168MHz to 480MHz with hardware FPU acceleration to handle the math in real-time.






