Bird
Raised Fist0
Drone Programmingprogramming~15 mins

How motor speed controls movement in Drone Programming - Mechanics & Internals

Choose your learning style10 modes available
Overview - How motor speed controls movement
What is it?
Motor speed control is how a drone changes how fast its motors spin to move in different directions. By adjusting the speed of each motor, the drone can go up, down, turn, or tilt. This control is the basic way drones fly and respond to commands. It works by sending signals to motors telling them how fast to spin.
Why it matters
Without controlling motor speed, a drone would just hover or fall without direction. This concept lets drones fly smoothly, turn precisely, and stay balanced. It solves the problem of moving in 3D space using simple spinning parts. Without it, drones couldn't perform tasks like filming, delivery, or racing.
Where it fits
Before learning this, you should understand basic drone parts and how motors work. After this, you can learn about flight controllers, sensors, and advanced flight algorithms that use motor speed control to stabilize and navigate drones.
Mental Model
Core Idea
Changing each motor's speed changes the drone's movement by creating different forces and rotations.
Think of it like...
It's like rowing a boat with four oars: rowing harder on one side makes the boat turn, rowing all equally makes it go straight, and rowing faster makes it go faster.
       ↑ Thrust (lift)
      ┌─────────┐
      │  Motor  │
      │   ↑↑↑   │
      └─────────┘

  Motors arranged in a square:

      Front
   M1       M2

   M3       M4
      Back

Speed changes:
- Increase M3 and M4 to tilt forward
- Increase M1 and M2 to tilt backward
- Increase all motors equally to go up
- Increase left motors to turn right
- Increase right motors to turn left
Build-Up - 7 Steps
1
FoundationBasic motor function in drones
🤔
Concept: Motors spin propellers to push air and create lift.
Each motor in a drone spins a propeller. When the propeller spins, it pushes air downwards. This push creates an upward force called lift, which can make the drone rise off the ground. The faster the motor spins, the more lift it creates.
Result
Faster motor speed means more lift, so the drone can rise higher.
Understanding that motor speed directly controls lift is the foundation for all drone movement.
2
FoundationHow equal motor speeds make the drone hover
🤔
Concept: When all motors spin at the same speed, the drone stays still in the air.
If all four motors spin at the same speed, they create equal lift forces. These forces balance out gravity, so the drone hovers in place without moving up or down or tilting.
Result
The drone stays steady in the air, neither rising nor falling.
Equal motor speeds create balance, which is key to stable hovering.
3
IntermediateTilting by changing opposite motor speeds
🤔Before reading on: do you think increasing speed on just one motor will tilt the drone or make it spin? Commit to your answer.
Concept: Changing speeds of opposite motors causes the drone to tilt forward, backward, or sideways.
To tilt forward, the drone increases speed on the back motors and decreases speed on the front motors. This creates more lift at the back, pushing that side up and tilting the drone forward. Similarly, changing speeds on left and right motors tilts the drone sideways.
Result
The drone tilts in the direction opposite to the motors with decreased speed.
Knowing how opposite motor speeds create tilt helps control drone direction precisely.
4
IntermediateYaw control by varying diagonal motor speeds
🤔Before reading on: do you think spinning all motors faster makes the drone turn, or does it only affect altitude? Commit to your answer.
Concept: Changing speeds of diagonal motors differently makes the drone rotate (yaw) around its center.
Drones have pairs of motors spinning clockwise and counterclockwise. To turn (yaw), the drone speeds up motors spinning one way and slows down the others. This creates a twisting force that rotates the drone without tilting it.
Result
The drone spins left or right around its vertical axis.
Understanding motor spin directions and speed differences is key to controlling drone rotation.
5
IntermediateCombining motor speed changes for complex moves
🤔
Concept: By adjusting multiple motors together, drones can move in any direction smoothly.
Flying forward while turning right means tilting forward and yawing right at the same time. This requires carefully changing speeds on all motors to combine lift, tilt, and rotation forces. Flight controllers calculate these speeds continuously.
Result
The drone moves forward and turns right smoothly.
Combining motor speed changes allows complex, fluid drone movements.
6
AdvancedFlight controller role in motor speed control
🤔Before reading on: do you think motor speeds are set manually by the pilot or automatically by the drone? Commit to your answer.
Concept: Flight controllers automatically adjust motor speeds using sensor data to keep the drone stable and responsive.
The flight controller reads sensors like gyroscopes and accelerometers to detect drone orientation and movement. It then calculates how to change motor speeds to correct any unwanted tilt or rotation, keeping the drone balanced and following commands.
Result
The drone stays stable and reacts smoothly to pilot inputs.
Knowing that motor speed control is automated explains how drones fly so precisely.
7
ExpertMotor speed control limits and response delays
🤔Before reading on: do you think motor speed changes happen instantly or with some delay? Commit to your answer.
Concept: Motor speed changes take time and have physical limits, affecting drone responsiveness and control accuracy.
Motors cannot change speed instantly due to inertia and electrical limits. This delay means the drone may overshoot or wobble if commands change too fast. Advanced controllers predict and compensate for these delays to improve flight smoothness and safety.
Result
Better flight stability and control despite physical motor limits.
Understanding motor response delays helps design better control algorithms and avoid common flight problems.
Under the Hood
Each motor is connected to an electronic speed controller (ESC) that receives signals from the flight controller. The flight controller processes sensor data and pilot commands, then sends pulse-width modulation (PWM) signals to ESCs to adjust motor speeds. Changing motor speeds alters thrust forces and torque, which combine to move and rotate the drone in 3D space.
Why designed this way?
Using motor speed to control movement is efficient because it requires no extra moving parts. Early drones used fixed-speed motors and mechanical controls, which were heavy and slow. Electronic speed control allows fast, precise adjustments, enabling agile flight and complex maneuvers.
┌───────────────┐       ┌───────────────┐       ┌───────────────┐
│   Sensors    │──────▶│ Flight Ctrlr  │──────▶│    ESCs       │
└───────────────┘       └───────────────┘       └───────────────┘
                                                      │
                                                      ▼
                                               ┌───────────┐
                                               │  Motors   │
                                               └───────────┘

Sensors detect orientation → Flight controller computes speeds → ESCs set motor speeds → Motors spin propellers → Drone moves
Myth Busters - 4 Common Misconceptions
Quick: Does increasing all motor speeds always make the drone go straight up? Commit yes or no.
Common Belief:If all motors spin faster, the drone will always go straight up.
Tap to reveal reality
Reality:If motors are not perfectly balanced or propellers differ, increasing all speeds can cause slight tilting or drifting.
Why it matters:Ignoring motor or propeller differences can cause unstable flight and crashes.
Quick: Do you think spinning one motor faster alone will make the drone turn? Commit yes or no.
Common Belief:Speeding up a single motor will make the drone turn in that motor's direction.
Tap to reveal reality
Reality:Turning requires coordinated speed changes on pairs of motors spinning in opposite directions, not just one motor.
Why it matters:Trying to turn by changing one motor causes imbalance and loss of control.
Quick: Do you think motor speed changes happen instantly? Commit yes or no.
Common Belief:Motors instantly change speed as soon as the signal changes.
Tap to reveal reality
Reality:Motors have physical inertia and electrical limits causing delays in speed changes.
Why it matters:Ignoring delays leads to poor control and unstable flight.
Quick: Is motor speed control the only factor in drone movement? Commit yes or no.
Common Belief:Motor speed control alone determines all drone movements perfectly.
Tap to reveal reality
Reality:Other factors like wind, battery voltage, and sensor accuracy also affect movement and require compensation.
Why it matters:Over-relying on motor speed control without sensor feedback causes drift and crashes.
Expert Zone
1
Motor spin direction pairs must be balanced to cancel torque and maintain stable yaw control.
2
Electronic speed controllers use PWM signals with precise timing to finely adjust motor speeds.
3
Flight controllers implement PID loops to predict and correct motor speed changes before errors grow.
When NOT to use
Direct manual motor speed control is not suitable for complex flight; instead, use flight controllers with sensor feedback. For fixed-wing drones, control surfaces replace motor speed changes for movement.
Production Patterns
Professional drones use layered control systems where high-level commands translate into motor speed adjustments via flight controllers. Racing drones optimize motor speed changes for minimal delay and maximum responsiveness.
Connections
PID Control Loops
Builds-on
Understanding motor speed control helps grasp how PID loops adjust speeds to stabilize drones automatically.
Electric Vehicle Motor Control
Same pattern
Both drones and electric cars use motor speed adjustments to control movement and direction precisely.
Human Balance and Movement
Analogy in control
Just like humans adjust muscle tension on different sides to balance and move, drones adjust motor speeds to stay stable and move.
Common Pitfalls
#1Trying to turn the drone by speeding up only one motor.
Wrong approach:Increase speed of motor M1 only to turn right.
Correct approach:Increase speed of motors spinning clockwise and decrease speed of motors spinning counterclockwise to yaw right.
Root cause:Misunderstanding that yaw requires balanced torque changes, not single motor speed changes.
#2Setting all motor speeds to maximum to go up without balancing.
Wrong approach:Set all motors to max speed without calibration.
Correct approach:Calibrate motor speeds to ensure equal thrust before increasing for lift.
Root cause:Ignoring motor and propeller differences causes uneven lift and instability.
#3Ignoring motor speed change delays in control algorithms.
Wrong approach:Assume motor speeds change instantly and send rapid commands.
Correct approach:Implement prediction and smoothing in flight controller to handle motor response delays.
Root cause:Overlooking physical motor inertia leads to oscillations and poor control.
Key Takeaways
Motor speed control is the fundamental way drones move by changing lift and torque forces.
Equal motor speeds keep the drone stable and hovering, while different speeds cause tilting and turning.
Flight controllers automate motor speed adjustments using sensor data for smooth and precise flight.
Physical limits and delays in motor speed changes require careful control design to avoid instability.
Understanding motor speed control is essential for programming drones and improving flight performance.

Practice

(1/5)
1. What happens when all four drone motors run at the same speed?
easy
A. The drone spins rapidly in place
B. The drone hovers or moves straight up or down
C. The drone moves sideways
D. The drone immediately lands

Solution

  1. Step 1: Understand motor speed effect on lift

    When all motors run at the same speed, they produce equal lift, balancing the drone.
  2. Step 2: Determine movement from equal lift

    Equal lift means the drone either stays in place (hover) or moves straight up/down if speed changes.
  3. Final Answer:

    The drone hovers or moves straight up or down -> Option B
  4. Quick Check:

    Equal motor speeds = hover/up/down [OK]
Hint: Same speed on all motors means hover or vertical move [OK]
Common Mistakes:
  • Thinking equal speeds cause spinning
  • Assuming sideways movement with equal speeds
  • Confusing motor speed with drone landing
2. Which of the following is the correct way to set motor speeds in code to make the drone hover?
easy
A. setMotorSpeeds(100, 90, 100, 90);
B. setMotorSpeeds(0, 0, 0, 0);
C. setMotorSpeeds(100, 100, 100, 100);
D. setMotorSpeeds(100, 110, 90, 100);

Solution

  1. Step 1: Identify equal motor speeds for hover

    Hover requires all motors to run at the same speed to balance lift.
  2. Step 2: Check each option for equal speeds

    Only setMotorSpeeds(100, 100, 100, 100); has all motors set to 100, equal speeds for hover.
  3. Final Answer:

    setMotorSpeeds(100, 100, 100, 100); -> Option C
  4. Quick Check:

    Equal speeds in code = hover [OK]
Hint: Equal values in all motor speed parameters mean hover [OK]
Common Mistakes:
  • Using different speeds thinking it still hovers
  • Setting all speeds to zero which stops motors
  • Mixing up parameter order
3. Given this code snippet:
setMotorSpeeds(120, 100, 120, 100);

What movement will the drone most likely perform?
medium
A. Move forward
B. Hover in place
C. Tilt sideways and move right
D. Rotate clockwise

Solution

  1. Step 1: Analyze motor speed differences

    Motors 1 and 3 run faster (120) than motors 2 and 4 (100), creating torque imbalance.
  2. Step 2: Understand effect of torque imbalance

    This imbalance causes the drone to rotate (yaw) clockwise due to uneven motor speeds.
  3. Final Answer:

    Rotate clockwise -> Option D
  4. Quick Check:

    Unequal opposite motors speed = rotation [OK]
Hint: Faster opposite motors cause rotation [OK]
Common Mistakes:
  • Assuming forward movement from speed difference
  • Thinking drone hovers with different speeds
  • Confusing rotation direction
4. This code is intended to make the drone move forward:
setMotorSpeeds(110, 110, 90, 90);

But the drone spins instead. What is the likely error?
medium
A. Left and right motors have different speeds causing spin
B. Front motors are slower than rear motors
C. Motors on opposite sides have same speeds causing rotation
D. All motors have equal speeds causing hover

Solution

  1. Step 1: Identify motor speed pairs

    Motors 1 and 2 are 110, motors 3 and 4 are 90; left and right sides differ.
  2. Step 2: Understand effect of left-right speed difference

    Different speeds on left vs right cause the drone to spin (yaw), not move forward.
  3. Final Answer:

    Left and right motors have different speeds causing spin -> Option A
  4. Quick Check:

    Unequal left-right speeds = spin [OK]
Hint: Left-right speed difference causes spin, not forward move [OK]
Common Mistakes:
  • Thinking front-rear speed difference causes spin
  • Assuming equal speeds cause spin
  • Mixing motor numbering sides
5. You want the drone to tilt forward and move forward smoothly. Which motor speed setting is best?
setMotorSpeeds(95, 95, 105, 105);

Why does this work?
hard
A. Front motors slower than rear motors tilt drone forward
B. Rear motors slower than front motors tilt drone backward
C. Left motors faster than right motors cause forward tilt
D. All motors equal speed cause forward movement

Solution

  1. Step 1: Identify motor speed distribution

    Motors 1 and 2 (front) run at 95, motors 3 and 4 (rear) at 105; front motors slower than rear.
  2. Step 2: Understand tilt direction from speed difference

    Slower front motors provide less lift upfront, tilting the nose down for forward movement.
  3. Final Answer:

    Front motors slower than rear motors tilt drone forward -> Option A
  4. Quick Check:

    Slower front motors = forward tilt [OK]
Hint: Slower front motors than rear tilt drone forward [OK]
Common Mistakes:
  • Thinking faster front motors tilt forward
  • Confusing left-right with front-rear speeds
  • Assuming equal speeds cause tilt
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard