In today’s blog we are going to make a drone using raspberry pi.
STUFF YOU NEED :
ESC × 4
Propeller × 4
Raspberry pi 2
Wi fi key
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:
Install raspbian with noobs by following this tutorial: www.raspberrypi.org/help/noobs-setup/
Launch raspi-config and enable pi-camera
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
Before begin make all update:
sudo apt-get update && sudo apt-get upgrade
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
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:Making electronics project is too pretty simple with Us.
Join and Make with Us.
Image & Content Credit – Source