Bird
Raised Fist0
Drone Programmingprogramming~6 mins

How motor speed controls movement in Drone Programming - Step-by-Step Explanation

Choose your learning style10 modes available
Introduction
Imagine trying to steer a toy car by changing how fast its wheels spin. Controlling a drone's movement works similarly by adjusting the speed of its motors. Understanding this helps you see how drones move up, down, and turn in the air.
Explanation
Lift and Thrust
Each motor on a drone spins a propeller that pushes air downwards. When the motor spins faster, it pushes more air down, creating more lift that raises the drone. Slowing a motor reduces lift, causing the drone to descend.
Motor speed controls how much lift the drone generates to move up or down.
Balancing Motor Speeds for Stability
Drones have multiple motors arranged in a pattern. By changing the speed of individual motors differently, the drone can tilt or rotate. This balance of speeds keeps the drone stable or allows it to turn smoothly.
Adjusting motor speeds unevenly makes the drone tilt or turn.
Yaw Control Through Opposite Motor Speeds
To rotate left or right (yaw), the drone changes the speed of motors spinning in opposite directions. Increasing speed on one side and decreasing on the other causes the drone to spin around its vertical axis.
Yaw movement is controlled by varying speeds of motors spinning in opposite directions.
Forward and Sideways Movement
To move forward, the drone tilts by speeding up the rear motors and slowing the front ones. This tilt directs the lift force slightly forward, pushing the drone ahead. Sideways movement works the same way by adjusting left and right motor speeds.
Tilting the drone by changing motor speeds directs movement forward or sideways.
Real World Analogy

Think of a person on a skateboard pushing off the ground with one foot. Pushing harder with one foot makes the skateboard turn or move in that direction. Similarly, a drone changes motor speeds to push air differently and move or turn.

Lift and Thrust → Pushing down on the ground harder to jump higher
Balancing Motor Speeds for Stability → Using both feet evenly to stay balanced on a skateboard
Yaw Control Through Opposite Motor Speeds → Pushing harder with one foot and less with the other to spin on the skateboard
Forward and Sideways Movement → Leaning forward or sideways on the skateboard to move in that direction
Diagram
Diagram
       ↑ Lift
       │
  ┌────┴────┐
  │  Drone  │
  └─┬────┬─┬┘
    │    │ │
  M1│    │M2│
    │    │ │
  ──┴────┴─┴──→ Forward

M1 and M2 motors spin at different speeds to tilt drone forward.
Diagram shows how different motor speeds tilt the drone forward by changing lift forces.
Key Facts
Motor Speed → The rate at which a drone's motor spins its propeller, controlling lift and movement.
Lift → The upward force created by spinning propellers pushing air down.
Yaw → The rotation of a drone around its vertical axis, controlled by opposite motor speeds.
Tilt → The angle change of a drone caused by uneven motor speeds to move in a direction.
Common Confusions
All motors must spin at the same speed for the drone to move.
All motors must spin at the same speed for the drone to move. Motors spin at different speeds to tilt and steer the drone; equal speeds only keep it hovering.
Increasing motor speed always makes the drone go up.
Increasing motor speed always makes the drone go up. Increasing speed on some motors while decreasing others can make the drone tilt and move sideways or rotate, not just go up.
Summary
Changing motor speeds controls how a drone lifts, tilts, and moves in the air.
Unequal motor speeds cause the drone to tilt and turn, enabling forward, sideways, and rotational movement.
Understanding motor speed adjustments helps explain how drones fly and maneuver smoothly.

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