Before we get into the details of this project, let me say there are cheaper ways of creating a auto-stabilizing system such as using the sensors out of the Nintendo Wii controllers, but I choice this method for it’s simplicity and small form factor. The skill level for this project is Intermediate. This guide requires you to have experience uploading Arduino code and reading schematics. That said, let’s get started!
This project is based on the Arduino Nano board. This board features a ATmega328 the same micro controller as the Arduino Uno. The Nano pack the same functionality as a Uno (minus the DC power jack) all in a small form factor. The sensor board (IMU) is the Sparkfun 6DOF IMU. This IMU contains the 3-axis ADXL345 accelerometer and the 3-axis ITG-3200 gyro. The IMU is used to sense the orientation of the quadcopter in space. The next component in our parts list is the Logic Level Converter board. This board converts a 5V signal to a 3.3V signal or convert a 3.3V signal to a 5V signal. The Sparkfun IMU is 3.3 volts board and the Nano is a 5 volt board. In order for the Nano to read the IMU’s data we need to bring the IMU signals voltage from 3.3 volts to 5 volts.
I am using a breadboard and jumper wire for demonstration and experimenting purposes. If you choice to use this flight controller in a quadcopter, please use a ProtoBoard and solder your connections.
Let’s get started
First, place the Nano board along the center of the breadboard. Each row of pins need to be on each side of the center divide (See photo). Note: Each numbers row is electrically connected. The center divide separates the numbered rows electrical connection.
Next place the Sparkfun 6DOF IMU along the F column. Place the Logic Level board across the center divide.
Before we wire the components, we need to upload the flight controller code to the Nano.
The firmware and software I am using is the Aeroquad software. The Aeroquad platform uses regular Arduino boards to run their flight controller software.
- Download the firmware
- Download Arduino version 0023
- Download the Software for PC or Mac
- Upload the firmware via Arduino.
- Install the software for your PC or Mac
Once the code is uploaded to the Nano and the software is installed on your computer, we can now wire up the boards.
The wiring in this picture looks scary but it’s actually pretty simple.
Use the following schematic diagram to wire your board with the jumper wires. For this guide it is not necessary to wire the motors, RC Receiver and RC battery. I have included those connections, if you wish to proceed further with this project.
Open the Aeroquad software type in ‘57600’ for the baud rate. Under ‘Com Port’ take note of the listed ports. Connect the Nano board to your computer. Click refresh under the ‘Com Port’ and select the newly listed ‘com port’ and click connect.
Once connected a 3D quadcopter will appear on the screen. Move the flight board around, the onscreen quadcopter will mirror your boards orientation.
This guide stops short of wiring the motors and RC receiver. These connections should be soldered, but if you wish to experiment further and wire the motors and RC receiver here’s how.
Take the Straight Header pins and break them off into 3 pins headers. Place the 3-pin header into the female connector of the ESC. Make the signal wire (usually the white wire) of the ESC is connected to the signal wire from the individual pins of the Nano board.
For the R/C receiver order this Jumper Wire and connect one female end to the signal row of your receiver. Cut off the other female end and solder the individual wires to their respective pins on the Nano board.