Hey,
In today's blog we are going to make a drone using raspberry pi.
STUFF YOU NEED :
Drone frame
Brushless motor×4
ESC × 4
Propeller × 4
Battery
Raspberry pi 2
Battery monitor
Multiwii
Pi camera
Wi fi key
USB key
SCHEMATIC:
Raspberry pi with flight controller
For install the two component at the same place we build a support who came on the top of the raspberry to place the multiwii (see picture).
- Install the raspberry with his support
- Put the multwii on the support with anti-vibration pad
- Conect the ESCs to the multiwii with the dedicated pins
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/
- Download arduino software from https://www.arduino.cc/en/Main/Software
- Open arduino project "Multiwii.ino"
- Change arduino board in "Tools">"Board">"Arduino Mega 2560 or Mega ADK"
- Select the port in "Tools">"Serial Port"> And select the multiwii port.
- Next, open file "config.h"
- Search at the begining of the file the line: "//#define QUADX" and uncomment it (remove the "//")
- Search again the line "//#define CRIUS_AIO_PRO" and uncomment it.
- All is ready, save the file and run compilation
- Next you will need to calibrate all sensor with MultiwiiConf, I let you search tutorial on internet.
At this moment, we don't connect the Multiwii to the Raspi so if you want to look your motors in action before configure you raspberry pi put them on your 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. (DONT use motor with their propellers)
GETTING READY RASPBERRY PI:
Debian installation:
Install raspbian with noobs by following this tutorial: www.raspberrypi.org/help/noobs-setup/
Launch raspi-config and enable pi-camera
IP configuration
sudo nano /etc/network/interfaces
remove all wlan0 configuration and edit to this:
allow-hotplug wlan0 iface wlan0 inet static address 192.168.10.1 netmask 255.255.255.0 gateway 192.168.10.1
Hostapd installation:
Before begin make all update:
sudo apt-get update && sudo apt-get upgrade
Install hostapd:
sudo apt-get install hostapd
And test with minimal configuration
sudo hostapd hostapd.conf
If you can see your network from you smartphone it work BUT DONT TRY TO CONNECT ( it will failed with ip error because we haven't got any DHCP server)
DHCP server installation:
Now we need yo install a DHCP server to give IP address to wifi clients.
sudo apt-get install isc-dhcp-server
Run this command to edit the file:
sudo nano /etc/dhcp/dhcpd.conf
Find the lines that say
option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org;
and add "#" before them to comment them
Install usbmount
We need usbmount to mount the USB key. This is to save the video on the USB key.
sudo apt-get install usbmount
Now all usb keys must be mounted on the folder "/media/"
Install Python quadcopter program:
First install dependencies:
sudo apt-get install python-pip build-essential python-dev sudo pip install tornado
and clone the git project
git clone https://github.com/reglisse44/Multiwii-raspberry-drone-server.git multiwiiControll
You can test the programm by launching like this:
Join and Make with Us.
Comments