Welcome, Guest. Please login or register | Contrast:

Author Topic: Build a drone with Raspberry Pi as controller (thread is in progress)  (Read 362 times)


  • Senior Forum Technician
  • *
  • Full Contributor

  • Total posts: 51
  • Reputation: 19

  • Lord of the skies it is I, Thoraxe! Hear my call!

    • Entercoders
This thread is unfinished and is going to be updated as I research further

This tutorial is aimed at people who wants to build a drone using Raspberry Pi, while also using Raspberry Pi itself as a flight controller. I will also describe two methods.

Step 1: Base parts, those are required no matter which method you ll chose later.
Item list: View!

  • A drone frame of your choice (lighter = better, more motors = worse maneuverability, but better stability)
  • Raspberry Pi (1, 2 or 3, newer = better)
  • Brushless motors (lower KV rate, easier it will be for motor to spin a bigger propeller (or the same length, just tri-bladed instead of di-bladed), but max RPM will be more limited)
  • Electronic Speed Controllers (amount depending on the amount of motors)

Step 2: Getting appropriate shields for your Raspberry Pi

Method 1 (Easy): using Raspberry Pi with all in one shield like NAVIO2 : View This!

Coming soon!
Substep 1: Getting parts

Substep 2: Connecting everything

Method 2 (Advanced): using Raspberry Pi with different separate shields: View This!

Substep 1: Getting parts
  • Ublox NEO6M GPS module (or any other Raspberry Pi compatible module if you wish to enable on board navigation and ability for your drone to return home)
    Note: This module can come with different sized ceramic antennas, wider antenna = better!

  • GY-87 10DOF full orientation module (or any other gyroscope, accelerormeter, magnetometer and barometer on a single board modules, used to stabilize your drone and measure altitude above sea level)

  • HC-SR04 ultrasonic range meter (used to measure altitude above the surface)

Substep 2: Connecting everything

The software and programming wizardry:
To achieve fastest response times, your Raspberry Pi will require a real time kernel core. To be continued

Step 3: Determine the way you want your drone to be controlled

Method 1 (Easy):  This describes the controlling of your drone to be via standard RC 2.4Ghz Transmitter and Receiver of your choice: View!

Method description

  • 2.4 Ghz Transmitter and Receiver of your choice (doesn't have to be 2.4 Ghz)

  • MCP 3008 or MCP 3208 Analog to digital converter (used to enable your Raspberry Pi to read analog PWM (pulse wave modulation) of your 2.4 Ghz receiver. Each only has up to 8 channels, use multiple MCPs of the same type and use daisy chaining method if you need more than 8 analog input channels. MCP can also be used to precision control your servos, for example servos in retractable landing skids of your drone)
    Note: Difference between 3008 and 3208 is resolution, MCP3008 is 10bit and MCP3208 is 12bit.

Method 2 (Advanced):  This method will use 2 of your Raspberry Pis with 2 of 2.4 GHz NRF24L01+PA+LNA SM for long rage bidirectional communication: View!

Method description

Step 4: Adding video transmitter, FPV camera or Gimbal

  • Raspberry Pi native CSI port camera of your choice (if you wish to add a primary built in camera to your drone)

  • 5.8 Ghz video transmitter of your choice and a display with built in video receiver (doesn't have to be 5.8 Ghz either, lower frequency = longer range, but lamer quality)

  • Camera gimbal of your choice which would be compatible with your drone frame (optional, if you wish to have secondary camera for aerial photography (or spying) which could rotate and stabilize independently from the drone's frame)

Description on how to send a video via separate 5.8Ghz transmitter (or any other desirable frequency) to send FPV (first person view) video signal from the drone.

Step 6: Adding other optional drone sensors to make it smarter and more advanced

  • Sharp GP2Y0A21YK0F infrared range meters (optional. Can be used for obstacle avoidance, must be connected via MCP as this sensor is analog)

  • DHT 22 temperature and humidity sensor (optional, can be used to predict rains, avoid exceeding maximal or minimal operational temperature range of your motors)

  • Any photo resistor of your choice (optional, could be used to automatically dim or turn on/off your collision lights based on environmental light, this can help to preserve battery)

Step 7: Coding and snippets
If you found an error in any topic head with a tutorial, plz click Report to moderator and state what exactly worth an attention.

"It's not the hardware that is slow, it's lazy and effeminate programmers! Remember back in the days when hardware resources were limited, but systems still worked snappy enough?"
"To understand recursion, you should first understand recursion... GNU Not Unix! GNU Not Unix get it?!"
"There were plenty pilots who died because they chose to stay and fix an unfixable issue, rather than eject and face consequences of conviction for crashing a multi million dollar jet."


  • Senior Paper Clip
  • *
  • Full Contributor

  • Total posts: 62
  • Reputation: 31

  • [Moon of the South]

Im gonna have to try this out!! Sounds really cool!  :good:
"It seems like you're trying to copy and paste the code, would you like help with that?"
-Whale Squad


  • *
  • Newbie Contributor

  • Total posts: 3
  • Reputation: 2

Gotta try that