Introduction: Quadcopter Using Zybo Zynq-7000 Board

Before we get started, here are some things you want for the project:

Parts List

1x Digilent Zybo Zynq-7000 board

1x Quadcopter Frame able to mount Zybo (Adobe Illustrator file for lasercutting attached)

4x Turnigy D3530/14 1100KV Brushless Motors

4x Turnigy ESC Basic-18A Speed Controller

4x Propellers(these need to be big enough to lift your quadcopter)

2x nRF24L01+ transceiver

1x IMU BNO055

Software Requirements

Xilinx Vivado 2016.2

NOTE: The motors above are not the only motors that can be used. They are just the ones used in this project. Same goes for the rest of the parts and software requirements. Hopefully, that is an unspoken understanding when reading this Instructable.

Step 1: Get the PWM Module Running

Program a simple SystemVerilog (or other HDL program) to register HI throttle and LO throttle using input switches.

Hook the PWM with a single ESC and Turnigy Brushless Motor. Check the following files to find out how to calibrate the ESC.

The final code is attached in step 5 for the PWM module.

A PWM starter is attached in this step

ESC Datasheet: Turnigy ESC Datasheet PDF (Things to pay attention to are the different modes you can select using HI and LO throttle)


Step 2: Set Up the Block Design

Create Block Design

Double click the newly generated block

Import XPS settings downloaded here:

Modify settings

PS-PL Configuration

M AXI GP0 interface

Peripheral I/O Pins

Ethernet 0


SD 0



I2C 0




MIO Configuration

Timer 0


Clock Configuration

FCLK_CLK0 and set frequency to 100 MHz

Make I2C and SPI external


Run block automation

Create Port and call it "gnd"

Step 3: Calibrate the IMU

The BNO055 transceiver uses I2C communication. (Beginner's Suggested Reading:

The driver to run the IMU is located here:

A quadcopter does not require use of the magnetometer from the BNO055. Because of this, the operation mode necessary is the IMU mode. This is changed by writing a binary number xxxx1000 to the OPR_MODE register, where 'x' is a 'don't care'. Set those bits to 0.

Step 4: Integrate the Wireless Transceiver

The wireless transceiver uses SPI communication. Attached is the specification sheet for the nRF24L01+

A good tutorial on the nrf24l01+ but with arduino:

Step 5: Program the Zybo FPGA


These modules are the final modules used for the control of the quadcopter's PWM.

Purpose: The wrapper takes in Euler angles and a throttle percentage. It outputs a compensated PWM that will allow the quadcopter to stabilize. This block exists, because quadcopters are prone to disturbances in the air and require some sort of stabilization. We are using Euler angles, as we don't plan on flips or heavy angles which might cause Gimbal Lock.

Input: 25-bit bus of data CTL_IN = { [24] GO, [23:16] Euler X, [15:8] Euler Y, [7:0] Throttle Percentage }, Clock (clk), Synchronous CLR (sclr)

Output: Motor 1 PWM, Motor 2 PWM, Motor 3 PWM, Motor 4 PWM, Throttle Percentage PWM The Throttle Percentage PWM is used for initializing the ESC, which will want a pure 30% - 70% range of PWM, not the one from the Motor 1-4 PWM values.

Advanced - Vivado Zynq IP Blocks:

8 Adds (LUTs)

3 Subtracts (LUTs)

5 Multipliers (Block Memory (BRAM)) (AKA

Purpose: Control the hardware, including the MUX, PWM output, and sclr for motor_ctl_wrapper. Any Finite State Machine (FSM) is used for one thing: control other hardware. Any large deviation from this objective can cause the supposed FSM to take the form of a different type of module (counter, adder, etc.).

pwm_fsm has 3 states: INIT, CLR, and FLY

INIT: Allow the user to program the ESC as desired. Sends a select signal to mux_pwm that outputs straight PWM to all motors. Loops back to itself until GO == '1'.

CLR: Clear data in motor_ctl_wrapper and the pwm out module.

FLY: Loop forever to stabilizing the quadcopter (unless we are reset). Sends the compensated PWM through the mux_pwm.

Input: GO, RESET, clk

Output: RST for other module resets, FullFlight to signal FLY mode, Period to run at



Output: PWM for all 4 motors