15
http://www.instructables.com/id/The-Drone-Pi/ technology workshop craft home food play outside costumes The Drone Pi by reglisse44 on September 4, 2015 Table of Contents The Drone Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: The Drone Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 2: How it works ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Step 3: The frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 4: Propulsion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Step 5: Flight controller and raspberry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Step 6: Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Step 7: This is the end !!! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

technology      workshop      craft      home      food      play      outside      costumes     

The Drone Piby reglisse44 on September 4, 2015

Table of Contents

The Drone Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   The Drone Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1:   Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2:   How it works ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 3:   The frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 4:   Propulsion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Step 5:   Flight controller and raspberry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Step 6:   Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Step 7:   This is the end !!! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

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

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

Page 2: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Intro:  The Drone PiNOTE: THIS INSTRUCTABLE IS BEING WRITTEN

This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B. This drone has a particularity because he's using 2 differents controllerand he could be pilot with 2 differents devices : a remote control or a smartphone.

The Multiwii controller look after the 4 motors and distribute the power to supply them whereas the Raspberry Pi collect the informations who came from the smartphoneand relay them to the Multiwii. The Raspi take care of the drone's camera too ! This is a Pi camera and it places on the frontground of the Drone Pi. It could recording orjust take a screenshot to a USB key.

The frame of this drone is constituating with different recycled elements and it was another challenge : create a quadcopter with sometimes heavy elements... But we didit !

We are some young french students and it was our first creation. We were helping during this project with some internet website whose Instructables and now we want toshare with you our Drone Pi. Enjoy !

Step 1: PartsTo build our drone you will need the following parts :

A frame - You can buy it on the internet or you can make it like us. It's not difficult to create your frame, you just have to make a X of approximately 0,45m ofdiameter (for a stable drone) and you put different levels on the center to put your Raspberry, Multiwii, battery, ESCs, etc...

4 motors (16€) - For a quadcopter you need 4 motors but if you want to make a octocopter you will need 8 motors as well. We are using Turnigy brushlessmotors. (we will come back to the motors in the step 2)

4 ESCs(10€) - The electronic speed controller is using to delivery the power to the motor with the informations of the Multiwii. We're using Hobbyking 30A ESC.

Battery (27,5€) - Of course if you want to fly you must to supply your motors so you need a Battery. We're using a Turnigy 3S 3300mAh.

Battery monitor(4€) - It ring when your battery is down. We're using a Hobbyking battery monitor 3S.

Power distribution board (4€) - This board is using to connect your ESCs to the Battery.We're using a Hobbyking quadcopter power distribution board forquadcopter.

Connectors(4,5€) (4,6€) - If you don't want to weld your ESCs to your motors or weld your Power distribution board to your battery you have to buy some goldconnectors.

Propellers(5€) - A drone with some motors but whithout propellers it isn't a drone so choose your props according with your frame. For our frame of 40cm youneed some props with lenght=10 and pitch=4,5. We're using 10x4,5 SF props.

Multiwii (49€) - This controller is using to command the motors and share the power. We're using a CRIUS AIO PRO Multiwii.

Mounting pad(2€) - Because the motors create a lot of vibration you have to buy some mounting pad to reduce them.

Page 3: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Raspberry pi 2 B(35€) - It could also run with another model of Raspberry pi but we have just tested with this Raspi and it's more powerful than the previousversion.

Pi camera(19€) - It's only run with a Raspberry pi

Wifi key(9€) - It connect to the Raspi and create a wifi network to relay the informations from the smartphon app to the Raspi.

USB key - To save the video

Remote control + rc receiver - If you want to control your drone with this. You will connect the rc receiver to the Multiwii.

You have to weld the connectors to the ESC wire, to the motors wire and to the distribution board wire.

Page 4: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Page 5: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Page 6: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Step 2: How it works ?The multiwii

Multiwii is a open source french project who was based on a arduino. The project is open source so we can find many kind of multiwii. We use a similare version ofCRIUS AIO PRO V2

The Raspberry

In our project the raspberry made the main role. First at the startup it create a private wifi network with a DHCP server (to give IP address), this wifi network has nointernet access and this only to communicate with the smartphone. Secondly we created a python program who start a websocket. A websocket is a permanentconnexion between the server (raspberry) and the client (the smartphone app). Then it connect to the multiwii via USB. It will serve to send commands informations whocome from the smartphone to the multiwii ( see schema for understand). Sources are available on github (https://github.com/reglisse44/Multiwii-raspberry-drone-server)

The Application

The application is made in html/css/javascript with cordova. Cordova is a technology who permit to create an application with web technology compatible with android, iosand more ... The user think it is a standard android app but in fact this is a web view :), it's easy to develop applications like this for web devellopers ... Sources areavaillable in github (soon ...)

Image Notes1. Start navigation2. connexion in progress

Page 7: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Step 3: The frameTo make a good frame you need to use the lightest elements as you can. For our Drone Pi, we had to build it with recycling elements so our frame is a bit heavy butanyway it doesn't matter for our motors.

The diameter of the frame is 0,45m because we wanted a "stable drone" for the camera and not a "speed drone". On the center of the X they are 3 levels to put thecontrollers, the ESCs and our battery (you have all quotations in the pictures on the top of the page).

We've created a platform to the multiwii on the top of the drone and another to the battery on the underneath of the drone. For the Multiwii's platform, we wanted to putthe raspberry under the multiwii because there are some connections between them. For the battery's platform, we wanted to take on or take off the battery to recharge it.

Finally, we put 4 feet to the drone to be able to land it.

Page 8: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Page 9: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Page 10: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Page 11: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Step 4: PropulsionFor the propulsion you need your 4 motors, your 4 ESCs (to adapt the voltage to the motors), your battery and finally your Multiwii.

Connect your motors to your ESCs. You can invert the wire to invert the rotation of your propellers (see schema to know rotation direction).To begin, DON'T put1.your props on the motors to don't have any accident, the props are fragile and they could be break.Connect the ESC to the distribution board (respect the color).2.If all is ok you can install the components on the frame3.

At this moment, we don't connect the Multiwii to the Raspi or we don't connect the raspi to the smartphone so if you want to look your motors in action before put them onyour frame, you'll need a remote control with a rc reciever and connect the rc reciever to the Multiwii. We'll don't explain to you how to do this but Google is your friend ;)and it's not difficult to do this.

Image Notes1. clockwise2. counter clockwise

Page 12: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Image Notes1. clockwise2. counter Clockwise3. clockwise

Page 13: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Step 5: Flight controller and raspberryNow we will install the multiwii ans the raspberry pi. For install the two component at the same place we build a support who came on the top of the raspberry to place themultiwii (see picture).

Install the raspberry with his support1.Put the multwii on the support with anti-vibration pad2.Conect the ESCs to the multiwii with the dedicated pins3.

Next we will compile multiwii firmware into the board. To begin connect the multiwii board to your computer via USB

To configure the multiwii:

Download multiwii firmware from https://code.google.com/p/multiwii/1.Download arduino software from https://www.arduino.cc/en/Main/Software2.Open arduino project "Multiwii.ino"3.Change arduino board in "Tools">"Board">"Arduino Mega 2560 or Mega ADK"4.Select the port in "Tools">"Serial Port"> And select the multiwii port.5.Next, open file "config.h"6.Search at the begining of the file the line: "//#define QUADX" and uncomment it (remove the "//")7.Search again the line "//#define CRIUS_AIO_PRO" and uncomment it.8.All is ready, save the file and run compilation9.Next you will need to calibrate all sensor with MultiwiiConf, search tutorial on internet like this:10.

Page 14: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Step 6: Raspberry Pi

<strong><u>Hostapd installation:</u></strong>

Before begin install raspbian on your raspberry pi and make all update:

sudo apt-get update && sudo apt-get upgrade

Install hostapd with

sudo apt-get install hostapd iptables dnsmasq

Note: If you use a wifi key who use the nl80211 driver like our tp-link wn722n, you'll need to to manually compile hostapd to support it.

Now configure the wifi network:

sudo nano /etc/hostapd/hostapd.conf

and configure the NAME, PASSWORD, DRIVER, etc Then save and exit

IP configuration:

sudo nano /etc/network/interfaces

remove all wlan0 configuration and edit to this:

allow-hotplug wlan0iface wlan0 inet static

adress 192.168.10.1

netmask 255.255.255.0

gateway 192.168.10.1<br>

Page 15: Instructables.com - The Drone Pi€¦ · NOTE: THIS INSTRUCTABLE IS BEING WRITTEN This project is a quadcopter drone powered by a Multiwii and controlled with a Raspberry Pi 2 B

http://www.instructables.com/id/The-Drone-Pi/

Step 7: This is the end !!!If you have any questions you can post a comment and Thank you to read our instructables :)

Related Instructables

IndestructibleDrones ForDummies Thekey to Realstable flights bytreyes4

BluetoothcontrolledQuadcopterusing MultiWiiby rbanga

Make an HQuadcopterwith 3D printingby treyes4

DIY ARDUINOFLIGHTCONTROLLERby treyes4

How To BootRaspberry PiWith NOOBS byAnthonyD13

DIYMultipurposeRobot(Sumobot,Spybot,Mazebot,Bluetooth...) bytreyes4

Advertisements

Comments

1 comments Add Comment

 tomatoskins says:  Sep 16, 2015. 1:48 PM  REPLYThis looks great! I'd love to see links to where you got all your parts from!