You are on page 1of 5

technology workshop craft home food play outside costumes

Arduino micro Quadcopter


by Montvydas on October 21, 2015

Table of Contents

Arduino micro Quadcopter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino micro Quadcopter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Frame & Plastic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: The rest of the parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3: Weight Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5: Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

http://www.instructables.com/id/Arduino-micro-Quadcopter/
Intro: Arduino micro Quadcopter
(ONGOING Project, currently need to solder the circuit)

This is Arduino based, 3D printed micro Quadcopter project for 8.5 mm diameter DC motors. However if you have some experience (or just have an hour of free time)
you can adapt the design to fit to a different size motors.

I am doing this during my free time while I study in the university, thus I think it should take quite some time to finish (exams approaching!).

I decided to control the Quadcopter through Bluetooth using an Android phone/tablet. In the future I might redesign a bit to control it using Wifi or some radio
communication. I will also write and publish an Android App for the control using bluetooth.

So lets get it started@!

P.S. The robot is dedicated for M.O.N.T.E. (Mobile Omnidirectional Neutralization and Termination Eradicator) killer robot from The Big Bang Theory :D

Step 1: Frame & Plastic


I wanted the frame to be light-weight and strong, thus decided to use a 3D printer. This also saved me loads of time. Which printer to use I'll leave up to you as I do not
actually own a 3D printer myself and use the one that is in the University. The total wight of the design was around 10 - 15 g (The University didn't have any scales...) but
it will vary depending on the printer and the plastic

For the design I used a free web design tool TinkerCAD, which is probably the best design tool for beginners or for smaller projects.

I added the files here so that you could go and print it right away. However if you want to look into the design from all angles then visit Thingiverse. Likewise, you can
visit TinkerCAD to modify my previous design the way you like it (change the name of the Quadcopter?).

For a single quadcopter you need to print oneQuadcopter_bottom_3.stl and oneQuadcopter_top_2.stl. I tried printing everything myself and noticed that the printer I had
did not print the screws very well (I could not fit the screws in the holes), so I do not even suggest printing them as well... You could of course try doing that thus I also
add Quadcopter_screw_2.stl if you're curious... I redesigned the bottom part so that you could stick in the top part and then you could simply use some plastic ties to hold
everything together.

File Downloads

quadcopter_bottom_3.stl (700 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'quadcopter_bottom_3.stl']

Quadcopter_top_2.stl (691 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Quadcopter_top_2.stl']
http://www.instructables.com/id/Arduino-micro-Quadcopter/
Quadcopter_screw_2.stl (40 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Quadcopter_screw_2.stl']
Step 2: The rest of the parts
Microcontroller:

We need some small chip/microcontroller board for this Micro Quadcopter. Thus you can possibly use Arduino Micro, this official Arduino Beetle, this fake Chinese
Arduino Beetle Arduino USB chip or possibly follow this tutorial to program bare chips of ATMEL ATmega328/168, which you can get for free from ATMEL website (If
you're a student go to Atmel -> samples -> order a sample) or ebay otherwise. I myself will use Arduino Beetle (wither official or either Chinese one as the connections for
both are the same) for it's lightweight. The weight of each chip varies depending on the microcontroller: Arduino Micro ~13g, Arduino Beetle ~5g, bare chip + crystal ~4-
5g(?).

Motors:

I myself used a little more expensive motors from here. They are supposed to be a lot faster than the original Hubsan X4 motors. I plan to use custom made hardware
thus I need fast motors to lift the weight. If I was to buy a new motor set now, I would most likely buy them from the same shop, however the ones which say speed:
insane. There are a few types of those as well, so choose the ones with the best reviews. The difference is quite significant with speed: insane as they can reach at max
3.2 A instead of 2.75 A with speed: fast (somehow still says that thrust is 40g/motor for both motor types). For those you can't afford expensive motor, there is always an
alternative from ebay or even cheaper from China. They, of course do not fly that fast, at least I assume that from performance curves. I haven't tried myself, but max
current is 1.85 A and thrust is 34g/motor, which is lower than on previous motors. (Total weight ~20g)

Bluetooth:

For the project I used the usual HC-06 Bluetooth module. It works as a slave only, which is what we need if we want to control it using a smart phone. (Total weight ~5g)

MPU:

For the project I used MPU6050 which I already had bought some long time ago. It has 3 axis Gyroscope and a 3 axis Accelerometer only. In later releases I might use
some more expensive MPU, which would have Barometer and a Magnetometer. (Total weight ~1.4g)

Expensive Motors Batteries:

Specifically for the motors you will need 1S 3.7V LiPo batteries. You can buy them from HobbyKing pretty cheaply or again, ebay. There are a few things important to
look when buying batteries: capacity (mAh), max allowed discharge (C) and average discharge rate (C). The larger the capacity, the longer the motor will run and larger
discharge rate means the battery will be able to provide large currents for constant and for peak times. A rule of thumb is multiplication of both to get the currents that you
quadcopter can get. For example, you have a battery with 500 mAh and 10 C of average/constant discharge. 500 mAh * 10 C = 5 A. Thus on average such a battery can
supply 5 A. However, always give around 20 % safe margin! So for our example, we used 2.75 A max current motors. Lets say I will be flying always at this max speed
(which most of the time I am not, but who cares now) and I want to at least get 6 min of flight. Lets say that motors apart from motors the rest of electronics uses around
100 mA of current constantly. Total current = 2.75 * 4 + 0.1 = 11.1 A. To give 5min of flight: mAh = 11.1 A * 6 min = 11.1 A * 0.1 h = 1.11 Ah = 1110 mAh. Also a battery
thus must have average discharge rate = 11.1 A/ 1.11 Ah * 120 % (safe margin) = 12 C. After looking for a minute into HobbyKing you can find these batteries, which
weight 23 g and have both, constant discharge rate and the capacity, larger than we calculated, which is good as it will withstand higher currents. I could of course take
some smaller batteries as I performed calculations using max values but that's really not needed for now, unless we will see that batteries are too heavy for our design.
(Total weight ~23 g)

Cheap motors batteries: (for explanation on how these were calculated look above into expensive motor Batteries)

Assume max current of 1.85 A. In total giving = 1.85 A * 4 + 0.1 A = 7.5 A. mAh = 7.5 A * 6 min = 0.75 Ah = 750 mAh. Discharge rate = 7.5 A/ 0.75 Ah* 120 % = 12 C
(you noticed, that discharge rate is the same for both motors! This is because we want to get the same flying time using different total currents). These batteries will be
the best solution in our case as even though they have less capacity (meaning shorter flying time), the discharge rate will still be sufficient. The best thing about them is
the weight, which is only 13g! After all, we want it to not only fly, but fly like crazy!

Motor Connectors

The motors usually use micro JST type connections, thus you would need to get something like this or this to be able to connect the motors to the whole circuit.

Propellers:

Many of you might want to use Hubsan X4 propellers and you can do that if you want to, however I will use Walkera LadyBird props. They are a little pricey if you buy
them in UK (around 5 times more when comparing with original Hubsan X4 props), however really cheap from China. If you yet do not have props, then I would
recommend using them either - if I am correct, I read somewhere that they provide more thrust, thus giving our little beast more speed (Well, after all, Walkera LadyBird is
known to be the best micro quadcopter up to date! I wonder who tested that but lets just trust them for now...) (A few grams in total ~3-5g)

Transistors:

We will need to use MOSFET transistors. Basically, any MOSFET which can withstand the required power and current is good to go. I prefer N-type MOSFETs and in my
case the max current is 2.75 A with voltage of 3.7 V. This means I need a MOSFET, which would at least withstand around 4 - 5 A just in case. Also such MOSFETs
should heap up less either. In the lab I had some of those leftover which I decided to use here. (Total weight ~2g)

Resistors:

For the project I needed a few 1 kOhm and maybe a few 10 kOhm resistors, which you can find in any electronics shop. (Total weight ~1g)

Diodes:

DC motors have high inductance and thus if you pass a changing current through it, it generates voltage. The higher the current change, the larger the voltage it
generates, thus sometimes the peak can reach hundreds of volts, which can destroy the MOSFET. Thus we need a free-wheeling diode, which would not let fast changes
to occur. Again any high voltage diode should do the job and in the lab I had some of these, thus used them for the project. (Total weight ~1g)

Charger

Time by time the batteries will need to be charged of course... You might already have a good chargers, however in case you don't you can always get something like this
. It uses JST type connectors, thus you will have to get the same connectors for batteries and the whole board.

http://www.instructables.com/id/Arduino-micro-Quadcopter/
Step 3: Weight Calculations
Expensive motors:

For our quadcopter to fly nicely there is a rule of thumb that 50 % of the max thrust of motors should be equal to the weight of the quadcopter itself. Thus meaning that
the quadcopter will be in the constant height when giving 50% of its full power. The motors that I bought have 40g/motor of thrust. In total that adds up to 160g. 50% of
that is 80g. Now lets add up all of the electronics + the frame:

15g (frame) + 20g (motors) + 23g (battery) + 5g (bluetooth module) + 5g (microcontroller) + 1.4g (MPU) + 2g (transistors) + 1g (diodes) + 1g (resistors) = 73.4g, which is
more or less what we need! Of course there will be some additional weight from wires, etc. but they are small and at most it will increase the weight until 85g, which is still
only 6% more than what we need.

Cheap motors:

Total thrust from motors is 4 * 34g/motor = 136g. 50% of that is 68g. Total electronics will be more or less the same, just the battery will be 10g lighter, giving around 65g
in total with everything, which is still lighter than 50% of the thrust! Actually, it will not fly as good as with faster motors, but oh well, you are using at least 4 times cheaper
motors!

Conclusion:

The quadcopter should fly! With more expensive motors it will fly better/faster, but yet still both quadcopter should fly.

Step 4: Circuit Diagram


I am at the stage where I need to connect the circuit myself, however the connections should be alright as I tested them prior to drawing the wire connections.

There is a wire dedicated for INT (Interrupt) of MPU6050. You can use it or you could connect some LEDs there to fly the quadcopter in the night. I still haven't decided
which approach I will be using and might simply test both in the end.

I suggest making some blocks for 3.7V and GND connections (see the diagram), where you will have to connect all of the wires together.

Step 5: Code
I wrote a library and an example program using mbed for a quadcopter which you can find in here. I am still modifying it time by time to optimise for the best performance.
I will have to modify the code or write a new one to use it with an Arduino.

If you decided to use my frame & motors, most likely you won't need to modify the code any more as the PID controller was already set for more or less good
performance. However if you use a different frame, you will need to set new values for the PID controller. It takes quite some time if you're doing it for the first time.

Related Instructables

Custom Arduino
3D Printed Arduino Make your own How do I use Micro DIY ARDUINO
Arduino Modular Robot activity tracker the RFduino Quadcopter FLIGHT
Quadricopter by 20b by GodsTale with a 6 Axis CONTROLLER
accelerometer Concept by
by by treyes4
by RFduino jackjackboom
AwesomeAwesomeness

http://www.instructables.com/id/Arduino-micro-Quadcopter/
Advertisements

Comments
2 comments Add Comment

JesusG33k says: Nov 5, 2015. 7:01 AM REPLY


I'm assuming you changed the motor orientation, because in the diagram they all were connected the same.

Probably an oblivious question but I'm just asking.

Nice project and thanks for sharing! - Sam

tomatoskins says: Nov 5, 2015. 6:31 AM REPLY


I can't wait till it's finished so I can see it in action!

http://www.instructables.com/id/Arduino-micro-Quadcopter/

You might also like