Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Diy Arduino Flight Controller PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15
At a glance
Powered by AI
The instructable outlines the steps to build a DIY Arduino flight controller for drones from readily available components.

The instructable details the necessary components, how to connect the Arduino and sensors, and designing a custom PCB.

The steps involve designing and fabricating the PCB, assembling components, designing a casing, initial testing, installing firmware, and replacing an existing flight controller.

Food Living Outside Play Technology Workshop

DIY ARDUINO FLIGHT CONTROLLER


by treyes4 on April 20, 2014

Table of Contents

DIY ARDUINO FLIGHT CONTROLLER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: DIY ARDUINO FLIGHT CONTROLLER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Parts and materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 2: Understand the connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 3: Redesign the PCB if you'd like . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 4: PCB fabrication first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 5: PCB done whats next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 6: Casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 7: Lets start Testing! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 8: MULTIWII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Step 9: Replace that old flight controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Step 10: Program your Drone with your phone! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Step 11: Go FLY! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Step 12: Video~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Author:treyes4 author's website
Hello There! I'm Timothy, I'm 15 years old and I love biking, Rc, arduino ,gadget hacking and 3D designing. I got into RC when I was young and that's where
everything started, from my fisrt time soldering at 5 to designing and fabricating PCB's at 12 its been a long journey to learn all these but now I would like to
share all the things I've learned and hopefully learn something in return as I make my projects here on instructables. My guides here instructables will focus
on arduino,multirotors,Robots and some easy weekend projects.....ok lets just say anything that pops up in my mind but dont expect me to make coocking
guides......maybe :P

Intro: DIY ARDUINO FLIGHT CONTROLLER


Lets build an Arduino based flight controller that can do wireless PID tuning, Orientation lock and altitude hold and position lock with the help of A GPS. Ok So
this DIY flight controller is an educational Arduino based module. It's simple to make, easy to program and is a great project for experienced hobbyist like me. The
program is open source and easy to configure.

This Flight controller will have features like those of NAZA and APM the only difference here is the PID wherein you will need to be patient in getting your drone tuned. To
make tuning easier I included a Bluetooth module to ease the tuning step with out the use of your computer.

NOTES ABOUT THE BUILD

You Will learn how to fabricate PCB's! Always check your connection.

Why make one?

Because I'm board and I dont have time going to hobby shops and just to find that its out of stock. + I have dozens of these sensors, why not make your own right? there
is the excitement and rewarding feeling as you finish the project.Lastly you get to understand whats going on the flight controller.

Total cost?

I guess I'll cost this by the amount i've spent this week for this project only

1x pre synthesized PCB 6x6cm almost 1.8$ here in the Philippines

3x 1mm Drill bit $1

1x Gizduino Mini $8.58

2x Pinheaders 1$

TOTAL 12.38$

--------------------------------------

Proceed to the next step for more price info

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 1: Parts and materials
As I started arduino 3 years ago I guess I've piled up some extra sensors such as the MPU6050 , BMP180, and the HMC5883L now getting frustrated of my old Flight
controller for my quadcopter I decided to make my own similar to those of MULTIWII "CRIUS SE"

So here are the main parts

An Arduino mini.... or something similar like mine from our local electronics shop exclusive on in the Philippines

1x MPU6050 I got these sensors for 22.31$ only!

1xBMP180 or 085

1x HMC5883L

_______________________________

1x Bluetooth module HC 05 or HC02

1x TTL converter such as the FTDI programmer module

2x Pin headers 1x40

1x pre synthesized PCB 6x6cm

A lot of female to female wires~

TOOLS and Chemicals FOR PCB fabcrication

Mini Drill

1mm Drill bit

Ferric Chloride

Developer Solution

BABY OIL

Exposure lamp or 10W florescent lamp

2x small Glass Plates "see through"

2x Containers big enough for the PCB and chemicals

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 2: Understand the connection
Important pins to enable Sensor communication the I2C pins "A4 asSDA" and A5 as "SCL"

As you connect your sensors you will need to connect each pin to the same pin on the arduino mini

Example "Sensor SDA" to "ARduino SDA A4" ... then Sensor SCL to Arduino SCL

Easy right? Just remember All sensors must connect all of their SDA and SCL pins to the proper terminals on the arduino mini

______________________________________________________________________________________________

To enable Motors~

D3 for the 1st motor

D10 for the 2nd motor

D9 for the 3rd Motor

and D11 for the 4th motor

______________________________________________________________________________________________

To enable controller inputs

THR D2

(ROLL) AIL D4

(PITCH) ELE D5

(YAW) RUD D6

AUX1 D7

AUX2 D12 (optional)

______________________________________________________________________________________________

POWER~

Do not use 7805 regulators USE a 5V UBEC

UBEC is an efficient Voltage regulator that can handle more than 7805

Connect the + and - to the respective terminals on the arduino board.

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 3: Redesign the PCB if you'd like
Download the RaR file and open up your eagle CAD if you are using a Legit Arduino mini cuz you will need to redesign the connection

If you live in the Philippines and you have the same parts just like mine feel free to skip this step.

NOTE for your MPU6050

Y AXIS is your forward direction!

File Downloads

FC.rar (43 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'FC.rar']
Step 4: PCB fabrication first
To Tell you the truth this is not the hard part of this build its actually easy as long as you follow the steps.

Prepare the following

Print out the PDF in HIGH Quality

Prepare the baby OIL

Prepare pre synthesized PCB 6x6cm

Prepare a container filled with ferric Chloride

Prepare a container with developer powder ... 3 tsp developer 1cup tap water (agitate until the powder dissolved)

Prepare 10 Florescent lamps

______________________________________________________________________________________________

Lets start!

1.Cut out the PCB layout and apply a small amount of baby oil and gently spread the fluid around the paper.next gently remove any excess baby oil by wiping it with any
cloth

2.Get your pre synthesized PCB 6x6cm, Remove the film and place the print side of the paper facing the green side of the PCB "that is important". Get your glass plate
and stack the PCB and paper in between.

3.Get your florescent lamp and Elevate by at least 3 inch

4.Get your Phone-> clock and then Timer... Set it to 5 minutes

5. Place the GLass plate with the PCB under the Florescent lamp and immediately turn on the time and the lamp..Turn the lamp of as your phone rings.

6. Remove the glass and the paper go to the sink and run the exposed PCB with running water make sure the oil is removed.

7. Get your container with the developer solution dip the whole PCB "Copper side facing you" and agitate untill the ink is removed

8. Rinse the PCB again with water to remove the developer solution on it
http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
9. Get your Container with Ferric Chloride and dip the PCB until unwanted copper is removed.

10. DONE!! all you have to do now is to drill the holes.

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
File Downloads

MULTIWII.pdf (14 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'MULTIWII.pdf']
Step 5: PCB done whats next?
Get your soldering Iron and start assembling duhh....

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 6: Casing
Now printing a casing is highly suggested because your barometer sensor is sensitive to external factors like air and temperature.

1 Print a casing

2 Cut a small sponge and glue it near the Barometer sensor "do not glue the barometer sensor as is" apply hot glue on the sides only just to make the sponge act as a
filter.

Step 7: Lets start Testing!


Connect the following onto the flight controller. The HMC5883L, TTL converter, and might as well connect the wire to the receiver module.

To start initial testing connect your FC to your computer.... the Arduino mini should light up as well as the MPU 6050 after that its time download some stuff over the
internet.

Multiwii arduino program and and Multiwii Config

And the latest ARDUINO IDE which you probably have.

1. Open the Multiwii.ino inside the Multiwii Folder once done go to the tabs within the arduino program and go to "config.h" this is where you will start

2. Scroll down and follow through from //#define QUADX to "#define QUADX only" removing the "//" uncomments the line

3. scroll down and uncomment #define MINTHROTTLE 1064 if you are using SimonK ESC and add // to the default setting which is #define MINTHROTTLE 1150 // (*)
(**)

4. scroll down a little #define MAXTHROTTLE 2000

5. #define I2C_SPEED 400000L

6. Combined IMU Boards -> uncomment //#define GY_521 to #define GY_521

7 sroll down I2C barometer and uncomment //#define BMP085 to #define BMP085

8. I2C magnetometer uncomment //#define HMC5883 to #define HMC5883

9. Once done Go to Arduino Tools on the upper left -> Board -> Duemilanove or UNO depends on your arduino MCU.

10. Tools and then set your port where the Flight controller is connected.

11. UPLOAD!

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 8: MULTIWII
Now that you are done uploading its time to use the Multiwii GUI

Open the MultiwiiConf folder

application.windows32 for Windows 64bit or 32bit do not use the application.windows64 since it is not working

Open MultiWiiConf.exe

1.select com port where the flight controller is connected and click on "start"

after that it should now have readings .

2. To make the dashboard move calibrate the Acc first by putting your FLight controller on a flat surface and hit the calibrate ACC leave it for 10 seconds or so and then
calibrate your Magnetometers, After clicking CALIB_MAG you are given 30 sec to rotate your Flight controller in all axis make sure it reaches 360 rotation.

3. Once done explore the GUI and proceed to the next step.

Step 9: Replace that old flight controller


Let lessen the detail and just get to the point here

Replace your old flight controller in my case CC3D

Install your DIY Flight controller

Position your Magnetometer somewhere on the frame wherein its not affected by the motors or battery.

For Bluetooth Programming replace the FTDI programmer with an HC 05 or HC 02 Bluetooth module Note that some BLuetooth modules need to be reconfigured to
115K baud for it to work

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 10: Program your Drone with your phone!
Wireless programming~

Programming with a Wire sucks lets go to the next level which is a lot better

Download this on your android phone

For apple devices try looking for some multiwii programs because I have no idea about apple~

This app is very useful, It eliminates all the drag of bringing a laptop and tuning it on the field and then testing the values all over and over again through a "cable and a
laptop" ..that sucks. So here I wish you a safe flight and have nice day!

BTW For me the hardest part to tune here is the barometer or ALT HOLD PID nonetheless everything can be search through Youtube and Google for PID tuning tips and
tutorials.

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Step 11: Go FLY!
Fly safe guys dont fly your drones on streets or crowded areas, Tune your drone on an open area like a soccer field or something.

Step 12: Video~


commin right up

Related Instructables

2-Wheel Self
Debugging DIY Balancing Bike wheel 3D Printed Bluetooth/Gyroscope/Accelerometer
Guide of MWC Multipurpose Robot by using WS2811 LED Arduino controlled
Flight Controller Robot Arduino and effects with Quadricopter Lightball (with
MPU6050 (Sumobot, MPU6050 by Arduino by by individual
HMC5883L by Spybot, Ufactory balrog-k1n adjustable leds
AwesomeAwesomeness
ICStation Mazebot, in each side) by
Bluetooth...) by janth
treyes4

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/
Advertisements

Comments
3 comments Add Comment

seamster says: Oct 24, 2014. 3:23 PM REPLY


This is so cool! I'm very curious to see a video of the flight controller in use.

treyes4 says: Oct 25, 2014. 4:11 PM REPLY


I guess its done uploading... :D

SparkySolar says: Oct 24, 2014. 8:30 PM REPLY


Thank you for this nice Instructable.

I like it.

Rima

http://www.instructables.com/id/DIY-ARDUINO-FLIGHT-CONTROLLER/

You might also like