Saturday, April 7, 2018

Arduino Self Levelling Drone (Part 1)

The Plan


F450 Airframe Kit


My latest project is an Arduino based self levelling drone. Being a rubbish pilot, I want the drone to be easy to handle and have the capability to carry a small video camera. There are a number of different designs available and I want to use a combination of the best available. One of my frustrations while building the drone was that none of the designs were complete, I would get a certain way into construction only to discover that I am missing a part. Where this happened to me I have made sure that I added the part to the list below (including connectors and specific cables).

Arduino Uno - used for the Flight Controller


I wanted to use an Arduino as the flight controller so that I have control over the drone firmware and can modify it as required. There is no better way to learn about drones / quadcopters than to build one! The base drone firmware is based on the YMFC-AL code from Joop Brokking. An electronic schematic of the drone is available from the Brokking.net site. Download a copy of this and print it out, you will refer to it frequently. It is in the zip file that contains the firmware (more on this later).




The drone platform I will utilise is the F450 Airframe kit. This airframe has an integrated PCB board built into the lower platform for connecting ESC's. This makes wiring the electronics much easier.


FlySky (FS-T6) 6 Channel Transmitter


The original versions of the DJI F450 airframe are still very expensive (over $1K), but you can get very cheap copies from China. My aim is to build the drone for under $250. You will be able to do it cheaper than this if you already have some of the parts and consumables. The motor and ESC kit comes with 1045 props but I have replaced these with 8045 props to reduce the ESC/motor load and make the drone more responsive (as suggested by Mr Brokking).

The end result.

Parts List


You will need to purchase the following parts. I have indicated part numbers, price and a link to where I bought them.


Qty Description Price (AUD)
1 F450 Air Frame $17.96
4 1000kV motor / 10 x 4.5 props / ESC $12.77
1 2S/3S lipo battery charger $10.93
1 3S / 2200mAh / 40C LiPo Battery $29.95
1 Flysky FS-T6 6-CH TX Transmitter & Receiver $62.79
1 8045 8X4.5 Carbon Fiber Propellers (2 pairs) $8.43
1 Arduino Uno $29.95
1 MPU-6050 gyro / accelerometer $2.99
1 1k Ohm 0.5 Watt Metal Film Resistors - 8 Pack $0.55
1 1.5k Ohm 0.5 Watt Metal Film Resistors - 8 Pack $0.55
1 330 Ohm 0.5 Watt Metal Film Resistors - 8 Pack $0.55
1 1N4004 1A 400V Diode - 4 Pack $0.70
1 200mm Black Cable Ties - 100 $10.95
1 5mm Green LED $4.25
4 Right Angle, 2.54 mm, 4 Contacts, Header $1.19
1 M3 15mm nylon spacer (25 pack) $11.95
1 M3 Bolts x 10mm -25 pack $3.00
1 5 PAIR Deans T Plug (5 x Female 5 x Male) $5.25
1 Heatshrink $14.50
1 Loctite 243 10ml Adhesive Threadlocker $14.55
5 Light Duty Hook up wire (4 colours) $2.75
5 Extra Heavy Duty Hook up wire (Red & Black) $1.25
1 5 x 15cm Servo Cables (Rx to Arduino) $7.30
1 12 Pairs 3.5mm Bullet Banana Plug Connector $7.00
1 Falcon 25mm x 2.5m Double Sided Tape $12.00
1 2.1mm DC Power Line Female Connector $1.95
$276.01


3S, 2200 mAh, 40C LiPo Battery


Feel free to replace with compatible models. Make sure they are compatible, for example we are using a 3S version of the LiPo batteries because this is at the upper voltage limit of the Arduino regulator.

3S LiPo Balanced Battery Charger



Tools


You will require the following tools to put the drone together.

  • 2.0mm Hex Wrench For frame and motor installation.
  • Scissors to open up all the packaging!
  • Diagonal Cutters
  • Long nosed pliers
  • Wire Strippers
  • Small phillips head screw driver
  • Hot glue to insulate solder
  • Soldering-iron and solder
  • Multimeter
  • 3D Printer (optional)

FlySky 6 Channel Receiver (comes with Transmitter)


Specifications


1000kV motor / 10 x 4.5 props / ESC Kit


A2212 motor:

KV: 1000
Max Efficiency: 80%
Max Efficiency Current: 4-10A (>75%)
Current Capacity: 12A/ 60s
No Load Current @ 10V: 0.5A
No. Of Cells: 2-3 Li-Poly
Motor Dimensions: Φ27.5* 30mm
Shaft Diameter: Φ3.17mm

30A brushless ESC:

Output: Continuous 30A, Burst 40A up to 10 Secs.
Input Voltage: 2-4 cells lithium battery or 5-12 cells NiCd/NIMh battery.
BEC: 2A / 5V (Linear mode).
Max Speed: 210,000rpm for 2 Poles BLM, 70,000rpm for 6 poles BLM, 35,000rpm for 12 poles BLM. (BLM: BrushLess Motor)

1045 Propellers (original):

Diameter of Shaft: 6.0mm
Adjustable by hole adapter (3mm, 3.2mm, 4mm, 5mm, 6mm, 6.35mm, 7.95mm)
Thickness of center: 9.7mm
Recommended wheelbase: 550mm - 700mm


8045 8 X 4.5 Carbon Fiber Propellers (replacements):

8045 Carbon Fibre Propellers


- Material: carbon fiber
- Size: 8 x 4.5"
- Shaft diameter: 5mm
- Total length: 20cm
- Weight: 5.2g for each prop

MPU 6050

MPU-6050 gyro / accelerometer


- Power supply: 3~5V
- Communication mode: standard IIC communication protocol
- Chip built-in 16bit AD converter, 16bit data output
- Gyroscopes range: +/- 250 500 1000 2000 degree/sec
- Acceleration range: +/- 2g, +/- 4g, +/- 8g, +/- 16g

Next up we will start construction...



1 comment:

  1. The Arduino community is huge, and I love seeing how it's applied to various projects. Have you considered open-sourcing the code for Dji Air 3 Drone? It could inspire others to try their hand at building one. Thanks for sharimg this informative blog.

    ReplyDelete