Introduction: Pi Zero Plane: a $150 Smart Fixed Wing Drone With the Pi Zero

Picture of Pi Zero Plane: a $150 Smart Fixed Wing Drone With the Pi Zero

About:

Build your own autonomous low cost fixed wing drone with the Raspberry Pi Zero and the PXFmini autopilot shield.

Hardware components:

Erle Robotics PXFmini×1
Raspberry Pi Zero ×1

X-1 Mini Flying Wing EPO×1

Battery×1

Servo×2

Motor×1

ESC×1

Software apps and online services:

APM flight stack

Debian-based Linux file system for drones

Hand tools and fabrication machines:

Soldering iron (generic)

Screwdriver

Cutter

Glue

Step 1: Story

Picture of Story

This tutorial demonstrates how to build a low cost Linux drone with the Raspberry Pi Zero and the PXFmini autopilot.

The PXFmini is totally compatible with the Raspberry Pi Zero, and it provides different kind of sensors which allow, for example, autonomous missions. The drone uses a real-time capable Linux kernel, a Debian-based file system and Dronecode’s APM flight stack compiled for the PXFmini autopilot board. All these components have been put together by Erle Robotics in their OS image for the PXFmini.

Plane X1

X1-Plane is a Linux based smart fixed wing drone that uses robotic frameworks such as ROS (the Robot Operating System) and the award winning APM software autopilot to achieve different navigations modes.

Mechanical features

  • Dimensions: 400 * 600 mm
  • Weight: 275 grams fully assembled (battery included)
  • Colour: White

Step 2: Step 1: Assembling the Frame

Picture of Step 1: Assembling the Frame

First of all we are going to attach the wings with the help of a screwdriver. We are using plastic washers to avoid breaking the wings because of the pressure.

Step 3: Step 2: Cutting the Frame

Picture of Step 2: Cutting the Frame

We are going to cut a piece of the plane wing with the help of a cutter to free it.

Step 4: Step 3: Mounting Elevons Mechanism

Picture of Step 3: Mounting Elevons Mechanism

The next step consists on mounting the elevons mechanism for allow the wings moving up and down.

We recommend to paste the orange piece to the wing with super glue.

Step 5: Step 4: Getting the Autopilot Ready

Picture of Step 4: Getting the Autopilot Ready

Connect the PXFmini shield on top of the Raspberry Pi Zero as described in the pictures & video.

You're almost done but you still need to get the right software on the Raspberry Pi Zero+PXFmini set. This should include the flight stack, an appropriate kernel, enabled daemons that auto-launch on boot, and additional goodies...

Fortunately, if you purchased the PXFmini from Erle Robotics you'll get access to their Debian images which include all this so just fetch a PXFmini compatible Debian image and flash it into a microSD card.

Step 6: Step 5: Making Space for the Components

Picture of Step 5: Making Space for the Components

With the elevons mechanism mounted we are going to put the battery, the PXFmini and the Raspberry pi zero inside the plane.

As you can see the battery and the autopilot are bigger than the hole, so using a cutter again, we are going to make the hole bigger.


IMPORTANT: Try not making the holes very big, it is better if all components are tight (You will avoid them to move when flying).

We have fitted the battery inside the plane, now it is the autopilot's turn. We will fit it in the same way we have done with the battery.

It is important to put the autopilot horizontal. If the sensors are not in a good position, the plane will not fly correctly.

Step 7: Step 6: Adding and Modifying the ESC

Picture of Step 6: Adding and Modifying the ESC

We are putting the ESC inside the plane. It is important to have a ESC with a BEC. With the BEC we will power the autopilot from the PWM pin without using a power module. The PXFmini can be powered in some different ways and one of them is from the PWM inputs. In this case we will use the the 3# PWM pin for giving the signal to the motor and for powering the PXFmini.

In the second image we can see the connector of the ESC. The yellow cable is the signal for the motor, and with the brown and the red cables we will power the PXFmini.

Step 8:

Picture of

We are going to pass the cables which are connected to the motor through the hole.

This two cables (red and black) must be connected to the battery in order to power the ESC.

As we can see in the images, the ESC power connector and the battery connector are not the same, so we are going to cut the ESC connector and solder a compatible one.

Step 9: Step 7 : Connecting the RC Receiver

Picture of Step 7 : Connecting the RC Receiver

You must connect the RC receiver in the #14 PWM pin.

Once the receiver and the ESC are connected to the autopilot you can put them where you prefer. In this case both of them are below the PXFmini but it would be better not to put the ESC under the autopilot due to the temperature of the ESC .

Step 10: Step 8: Connecting the Elevons

Picture of Step 8: Connecting the Elevons

We are going to connect the elevons in the #1 and #2 PWM pins like in the image below.

We need to put a plastic part in the gear of the elevon (It is included with the elevon).

After adding the plastic part we need to make a bigger hole to continue with the assembly. You can use a scissors or something hot.

Now, we are going to put the elevons in the hole of the wing and attach them to the metal stick.

With the elevons, the ESC and the RC receiver connected we are going to power the autopilot from the ESC's BEC (#3 PWM pin), without using a power module.

We will see the elevons moving after launching the autopilot, don't worry, it is normal.

With the FBWA mode on, we must put the plane horizontal and we will reassembly the elevon such that the elevon's plastic stais vertical. This will be it's starting point, after doing this with the plane in an horizontal position we will adjust the wing to stay in the middle and finally we will screw it.

Step 11: Step 9: Assembling the Motor

Picture of Step 9: Assembling the Motor

Finally, we are going to add the motor. In the image, apart from the motor can be seen a 3d piece. The function of this plastic piece is to move the motor backward and balance the plane without adding any relevant extra weight. You can assembly the motor without this piece if you want, anyway, you can download the STL HERE.

Using an allen wrench we are going to attach the motor and the piece.

There is only one way to attach it to the motor, so don't worry, it is very easy.

Now, we are going to connect the motor with the ESC. You should read the specifications of the motor you are using to know what is the positive pole. In this case, the positive pole is in the middle, so we will attach it to the red cable of the ESC. It doesn't matter the position of the other two cables, when the plane is assembled and you put the throttle on, you will see if the motor is turning in the right way. You will know it because the air which is getting out from the propeller must go backward. If it goes forward, you have to change those two cables, that's all.

The next thing we are going to do is paste the motor to the wood of the plane. We use super glue, it is strong enough to endure crashes, but you can use the glue you want. If you have any recomendation to improve something, please, let us now, we will be very grateful.

With the glue dry and the motor well pasted, we are going to add the propeller. You can use an allen wrench to tight it.

Step 12: Step 10: Testing the Center of Gravity

Picture of Step 10: Testing the Center of Gravity

The last thing we have to do is some tests to know if it is well balanced. In the first test, we are going to test the pitch by using the 2 circles that we can see under the wings of the plane. We are going to put one finger in each circle. The plane should be horizontal or a little bit forward pitched, but it must never be pitched backward or it will lose stabilization.

If it is not balanced, you should try moving the components of the plane to balance it without adding any extra death weight.


With the pitch properly balanced, we are going to test the roll. For this text we are going to use two cords or two rubber cords like in the image below. If it is properly balanced, it should rest horizontal.

If all went well, we should have our plane almost ready to fly. We have to make sure that the flashed microSD card with the last parameters for the plane is in the Raspberry Pi Zero and that we have our RC calibrated.

IMPORTANT: Be care with the propeller, and before powering the PXFmini make sure the RC is on. If it isn't, the autopilot will enter in RTL mode and the throttle will active.

Step 13: Interesting Links

  • You can download our last parameters HERE, but if you want to know which parameters are the most important for flying this plane, please, enter in the link below:

http://erlerobotics.com/docs/Robots/Projects/Plane...

  • To know how to calibrate and configure the RC, please, enter in the link below:

http://erlerobotics.com/docs/Robots/Projects/Plane...

  • If you are interest in this kind of projects, in the link below you will see more information about t:

http://erlerobotics.com/docs

Comments

Moose188 (author)2017-06-15

you can also put a power control module with an adjustable buck charger and 2 5v 1a solar panels on the wings to power for daytime flight. with the buck charger you can tone it back down to 5v but double the amps. you would have to extend the size of the wings though.

ErleRobotics (author)Moose1882017-06-16

That is a great idea. Thank you!

About This Instructable

2,778views

88favorites

License:

Bio: At Erle Robotics we aim to simplify robot and artificial intelligence creation and to do so, we build the next generation of artificial robotic brains.
More by ErleRobotics:Pi Zero Plane: a $150 Smart Fixed Wing Drone With the Pi ZeroPi0Boat: a $250 Smart Aquatic Vehicle With the Pi ZeroPi0Rover: a Smart Rover With the Pi Zero
Add instructable to: