Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Make a Drone with Arduino

· 5 min read · Home Tech

In this article
  1. What do you need before you start?
  2. How to assemble the drone frame and motors
  3. How to wire the Arduino flight controller
  4. How to program the flight control software
  5. Which parts cause the drone to wobble or drift?
  6. Why won't the motors spin or sync?
  7. How to handle propeller and motor mismatches
  8. Arduino drone builds for different sizes

Building a drone with an Arduino board results in a custom quadcopter that you can program and tune from the ground up. This project takes several weekends to complete depending on your familiarity with coding and electronics. Follow these steps to assemble your craft.

What do you need before you start?

You will need a lightweight frame to hold all the components. Gather four brushless motors and four electronic speed controllers. You need propellers that match the rotation direction of your motors. An Arduino board serves as the flight controller, and you will need an inertial measurement unit containing a gyroscope and accelerometer. A radio receiver and transmitter are required for control. A lithium polymer battery provides power, and a power distribution board manages the current. Ensure you have a soldering iron, solder, and zip ties for securing wires. See the safety notes below before handling batteries or propellers.

How to assemble the drone frame and motors

  1. Mount the four brushless motors to the ends of the frame arms. Use the screws provided by the motor manufacturer to ensure a tight fit.
  2. Attach the electronic speed controllers to the arms of the frame. Secure them with zip ties or double-sided foam tape.
  3. Solder the three wires from each motor to the corresponding pads on the speed controllers. If a motor spins the wrong way later, you can swap any two of these wires to reverse the direction.
  4. Connect the power leads of the speed controllers to the power distribution board. Solder the positive and negative wires to the main power rails.
  5. Mount the power distribution board to the center of the frame. Use nylon spacers to prevent the board from touching the frame material.
  6. Solder the main battery lead to the power distribution board. Check for solder bridges that could cause a short circuit.

How to wire the Arduino flight controller

  1. Place the Arduino board on the center of the frame. Use vibration-damping mounts to prevent motor noise from confusing the sensors.
  2. Connect the signal wire from each speed controller to the digital pins on the Arduino. Refer to your specific code for which pin controls which motor.
  3. Connect the inertial measurement unit to the Arduino using the communication pins. Ensure the sensor is oriented so the axes match the direction of the drone.
  4. Wire the radio receiver to the Arduino input pins. This allows the board to read the signals from your transmitter.
  5. Connect the power lead from the power distribution board to the Arduino power input. Use a voltage regulator if the battery voltage exceeds what the board can handle.
  6. Secure all loose wires with small ties to keep them away from the spinning propellers.

How to program the flight control software

  1. Install the Arduino development environment on your computer.
  2. Download a flight control library or write a custom loop that reads sensor data and calculates the necessary motor adjustments.
  3. Configure the PID constants in the code. These values determine how aggressively the drone corrects its position.
  4. Upload the code to the board via a USB cable.
  5. Use the serial monitor to verify that the gyroscope and accelerometer are providing stable readings while the drone is level.
  6. Calibrate the radio receiver by mapping the stick movements on your transmitter to the values expected by the code.

Which parts cause the drone to wobble or drift?

Wobbling is often caused by incorrect PID tuning. If the proportional gain is too high, the drone will oscillate rapidly. If the derivative gain is too low, the drone may feel sluggish and drift. You can adjust these values in the code and test the results. Mechanical issues also cause drift. Check if the propellers are balanced or if a motor mount is loose. A loose inertial measurement unit can send noisy data to the Arduino, causing the drone to twitch. Ensure the sensor is glued or bolted firmly to the board. If the drone drifts in one direction, check if the center of gravity is offset. Move the battery to balance the weight across the center of the frame.

Why won't the motors spin or sync?

If the motors do not spin, check the power distribution board for continuity. A cold solder joint can prevent current from reaching the speed controllers. If only some motors spin, verify the signal wires are connected to the correct Arduino pins. Speed controllers often require a calibration sequence to learn the range of the throttle signal. This typically involves powering the drone on with the throttle at maximum and then lowering it, but check your speed controller manual for the exact sequence. If the motors stutter, check for loose connections between the motor and the controller. Ensure the propellers are not touching the frame, as this creates friction that prevents the motor from reaching full speed.

How to handle propeller and motor mismatches

Propellers come in different pitches and diameters. Using a propeller that is too large for the motor can cause the motor to overheat or draw too much current from the battery. Check the manufacturer specifications for the maximum propeller size supported by your motor. You must use a mix of clockwise and counter-clockwise propellers. If you put two propellers of the same rotation on the same axis, the drone will flip over immediately upon takeoff. Ensure the propellers are tightened securely with lock nuts. A propeller that flies off mid-air will cause an immediate crash. If you notice a motor running hotter than the others, it may be failing or struggling with a damaged propeller.

Arduino drone builds for different sizes

Small drones use smaller motors and lighter batteries to stay agile. These builds require very lightweight frames, often made of carbon fiber or thin plastic. Larger drones can carry heavier payloads like cameras, but they require motors with more torque and larger propellers. For larger builds, you must use thicker wiring to handle the increased current. The Arduino code remains largely the same, but the PID values must be tuned differently because a larger mass has more inertia. You will find that larger drones are more stable in the wind but less responsive to quick movements. Always check the weight limits of your frame when adding extra components like GPS modules or telemetry radios.