Go Down

Topic: Falcon 2 Flight Controller (Read 5856 times) previous topic - next topic

MartinL

May 17, 2016, 03:23 pm Last Edit: May 18, 2016, 10:26 am by MartinL
The Falcon 2 is a 50mm x 50mm (2" x 2") multi-rotor (drone) flight controller based on the Arduino Zero. It's also an enhanced version of the Falcon 1, detailed here: https://forum.arduino.cc/index.php?topic=399882.0





It uses the larger sibling of the SAMD21 micro-controller family: the 32-bit, 48MHz ARM Cortex M0+ SAMD21J18A, (rather than the Zero's and Falcon 1's smaller SAMD21G18A). The Falcon 2 itself is programmable via the micro-controller's own native USB port. This allows the board to be selected and programs to be uploaded directly using the Arduino IDE. It's essentially an Arduino Zero in a flight controller's body.

The Falcon 2 is a capable of both manual and automated flight with the following flight modes: rate (gyroscope only), auto-level, heading free, altitude hold, loiter and return to lauch (RTL). To this end, it uses an I2C based motion processing unit, the MPU-9250. The MPU-9250 is a 3-axis gyroscope/accelerometer/magnetometer (compass) in a tiny 3mm x 3mm package. The board also has a MS5611 barometer for altitude measurement. A uBlox GPS can be attached to one of the board's serial ports to acquire latitude/logitude position.

The flight control firmware's been written from the ground up and isn't based on any existing code such as multiwii, baseflight, cleanflight, etc... This allows for seamless integration with the hardware and freedom to control all aspects of the design.

Communication with the processor is via 4 buttons and a super fast, SPI driven, miniature OLED display. Using a menu system, the pilot can select the flight controller's various settings, all stored in its on-board 32K EEPROM. There's also a reset button (top left).

The Falcon 2 has 8 input channels (on the left hand side), these connect to a traditional RC receiver and are for throttle, airelon, elevator, rudder, gear, aux1, 2 and 3 (the gear and auxillary channels are used to switch between flight modes). Alternatively, it's possible to connect a single CPPM (Pulse Position Modulation) receiver channel, or a satellite receiver, (nothing to do with satellites, just a tiny receiver that communicates the channels' data over a serial port instead).  

It also has 8 PWM outputs (on the right hand side), these are high resolution, hardware PWM outputs allowing the flight controller to control various brushless motors and servos from Tri, Quad, Hexa and Octocopters, through to stranger configurations such as Single and Dual copters. The mixer tables for each PWM channel allow custom configurations for the stabilization of any practical motor and servo combination. In addition to 400Hz PWM for motors/digital servos, or 50Hz PWM for analog servos, there's also an option for Oneshot125.

The Falcon 2 has provision for a battery monitor, that's capable of measuring LiPo battery voltages up to 6S (25V) and a +5V buzzer connector. The buzzer can be used to indicate to the pilot: a change of flight mode, motors armed, battery low warning, lost alarm, etc... On board LEDs indicate power and armed status. The Falcon 2 also has an external I2C and 3 serial ports. The external I2C is used to connect an external magnetometer (compass). One of the serial ports is used for GPS the others are reserved for future expansion.



Here's the Falcon 2's specification:

Hardware:

Board Dimensions: 50.5mm x 50.5mm
Mounting Holes: diameter 3mm, 45mm spacing
Processor: RISC 32-bit, 48MHz, Atmel ARM Cortex M0+ SAMD21J18A, 64-pin TQFP package
Memory: 256k flash, 32k RAM, 32k on-board external EEPROM
Display: 1.3" monochrome OLED (super fast hardware SPI bus driven)
Gyro/Accel/Magnetometer: MPU9250
Barometer: MS5611 + cable tie and foam to protect it from wind and sunlight
Inputs: 8 receiver channels (T, A, E, R, G, 1, 2 & 3) + battery voltage monitor input
Outputs: 8, 11-bit resolution PWM channels at 400Hz (motors/digital servos) or 14-bit resolution at 50Hz (analog servos) + buzzer output
Serial1: general purpose serial port
Serial2: general purpose serial port
Serial3: general purpose serial port
Serial4: satellite receiver input (on the throttle input channel)
I2C: I2C expansion port
Firmware updates: via micro USB connector
Off-board GPS: uBlox, automatic configuration, supports UBX binary protocol, 10Hz at 9600bps, connects to general purpose serial port

Software:

Modes: Rate, Auto-Level, Heading Free, Altitude Hold, Loiter and Return To Launch
Receivers: Standard, CPPM, plus DSM2 and DSMX satellite receivers, (sorry, no S.BUS yet)
Mixer modes: 12 channels with the following pre-set configurations - Tricopter, V-Tail, Quadcopter x, Quadcopter +, Hexacopter x, Hexacopter +, Octocopter x, Octocopter +, Singlecopter 1M4S, Singlecopter 2M2S, Dualcopter, Y4, Y6, X8 +, X8 x, H6, H8, V6 and V8
Sub Menus: Radio, PI Editor, Settings, Display, Calibrate, Motor Layout, Factory Reset, Version
Camera Gimbal: 2 axis gimbal option on outputs 7 and 8, standard and SS gimbals supported, (though currently only tested on two HS-82MG servos)

Here's a Youtube video of my earlier "Raven" flight controller (8-bit, Mega based design) in action: https://www.youtube.com/watch?v=rx33SYrK2aE

MartinL

#1
May 26, 2016, 01:37 pm Last Edit: May 26, 2016, 01:52 pm by MartinL
The Falcon 2 has just undergone its first flight test and I'm really pleased with the results. Altitude hold is rock solid, loiter and Return To Launch (RTL) performed well, albeit in perfect conditions.

Here's the Falcon 2 ready to fly:






MartinL

#2
Jul 13, 2016, 01:16 pm Last Edit: Jul 13, 2016, 01:34 pm by MartinL
I'm using a 84MHz Arduino Due prototype flight controller to test the data fusion of the accelerometer and GPS for improved loiter (position hold). In loiter the multi-rotor holds its current position based on information from the GPS, (rather than the pilot). Currently the Arduino Zero based Falcon 2 firmware uses GPS only to calculate position. It works well, but can be adversely affected by windy conditions.



The Due flight controller in this instance is attached to a T-Copter frame, although it's capable of flying any practical motor and servo configuration. It uses Drotek's MPU-9250/MS5611, gyro/acceleromter/magnetometer/barometer breakout board. The 8-pin DIP package is a 24LC256 I2C EEPROM to store the settings, (the Due unfortunately has no EEPROM). The external boards are Drotek's uBlox 8MN GPS and HMC5983 magnetometer (compass). The red board is Sparkfun's Openlog board for logging data from the Due's serial port. Useful for post-flight analysis.

The firmware leverages the portability the Arduino libraries to allow practically the same code to be used on both the Falcon 2 and the Due with only minimal changes. So any advancement on one flight controller can quickly be transfered to the other.

Isaac96

I have a tricopter too! 
The board looks like the KK2. 
How much is it?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MartinL

#4
Jul 22, 2016, 12:21 pm Last Edit: Jul 22, 2016, 12:23 pm by MartinL
Hi Isaac96,

Quote
I have a tricopter too!
Although I think we're in a minority, as unfortunately tricopters don't really get the following they deserve. I guess a lot of people are put off by the servo operated tail. I prefer flying them as I think they have a more natural feel and have that tail "swoosh" that quads don't have. (Although I like flying quads as well).

Quote
The board looks like the KK2.
Yes, both the Falcon 1 and Falcon 2 boards were inspired by the KK2 board. Outwardly they have a similar appearance and the menu system will be familiar to anyone who's used the KK2. Internally however they are very different, the Falcon boards being based on the Arduino/Genuino Zero. I've now integrated both Falcon boards into the Arduino IDE so you can select them from the IDE's "Boards Manager" and program them over their native USB port like any Arduino.

The Falcon 1 is like the KK2, in as much as it's designed for pilots who (like me) prefer just a manual (rate and auto-level) flight controller. It uses a 32-bit ARM Cortex M0+ microcontroller, more accurate hardware PWM motor outputs, super fast OLED display, firmware updates via micro USB port and has serial and I2C expansion ports.

The Falcon 2 does the same as the Falcon 1, but in addition has 8 receiver input channels, 2 extra serial ports, as well as a magnetometer and barometer for automated flight, such as altitude hold, loiter and RTL (return to launch). It connects to an external uBlox GPS for automated navigation via one of its serial ports.

Quote
How much is it?
The Falcon boards aren't in currently in production, although I've made up a limited batch of hand built prototypes, (same as the ones pictured). I plan to make these available in next few weeks, at the cost of the just parts + shipping, (no labor). Obviously the Falcon 2 will cost a bit more, owing to its sightly larger microcontroller and barometer. I haven't a reached a final definitive cost just yet, as this will also depend on how I go about distributing them.

If you're interested, I've produced a set-up guide for the Falcon 1 here: http://www.rcgroups.com/forums/showatt.php?attachmentid=9154694&d=1467974582.

Falcon 2 set-up guide to follow soon.

Isaac96

Amazing writeup.  :)
You have a long feature list!

I believe this is better than the Naze32 in many ways. How durable is the screen?
I hope you have a software package for the board? Or does it use the Zero's board, even though the MCU is dfferent?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MartinL

#6
Jul 23, 2016, 08:36 pm Last Edit: Jul 23, 2016, 09:17 pm by MartinL
Quote
How durable is the screen?
The screen's low profile, less than 1.5mm high and is protected by the surrounding pin headers. It's bonded to the PCB using a strong, double sided Tesa adhesive tape, so it's held securely in place. 

Quote
I hope you have a software package for the board? Or does it use the Zero's board, even though the MCU is dfferent?
Both the Falcon boards like the KK2 are self contained, allowing the flight controller settings to be changed using the screen and buttons alone. The various settings are stored in an external, on-board EEPROM, so are persistant between power cycles. So there's no external configuration program like Baseflight, Cleanflight, Betaflight, etc... The only time you need to connect to the USB port is for auxillary power, or to upload new firmware.

The Falcon 1 is based on an Arduino Zero prototype. The Falcon 1 design therefore uses the same microcontroller as the Zero, the SAMD21G18A. The Falcon 2 takes a step further away from the Zero and uses the slightly larger SAMD21J18A, but it's still similar enough to make it possible to burn the Zero's bootloader and upload sketches with the Arduino IDE.

In terms of comparison with the Naze32, obviously they are very different boards. The Falcon boards maintain the KK2 dimensions and screen, while the Naze is designed around a smaller racing footprint. For flight control the less powerful 48MHz, ARM Cortex M0+ microcontrollers used by the Falcon boards can nevertheless hold their own against the more powerful 72MHz, ARM Cortex M3/M4 used by the Naze32 and its derivatives, both in terms of processor functionality and for output to ESCs using standard PWM. The PWM signals to the motors are just as fast and accurate.

The slight disadvantage of Falcon boards is that they aren't quite as quick when it comes to the newer, looptime based ESC protocols, such as Oneshot125; although they do support it. The main advantage of using Oneshot125 is that it reduces pilot stick movement to motor latency by a few milliseconds.

Isaac96

Then this would be an ideal board for me. I would assume the inputs and outputs are level shifted?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MartinL

#8
Jul 23, 2016, 10:32 pm Last Edit: Jul 23, 2016, 11:18 pm by MartinL
Quote
I would assume the inputs and outputs are level shifted?
The inputs and outputs aren't level shifted. The flight controller's inputs rely on the fact that modern RC receivers take +5V power, but their output channels are at +3.3V (or less). The flight controller's motor/servo outputs are also at +3.3V, but it doesn't matter, because this still exceeds the input high level threshold on the ESCs and servos.

On the Falcon 2 the uBlox GPS also works entirely at +3.3V over the serial port.


Isaac96

Wow. I never knew that. Your knowledge is astounding.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MartinL


Isaac96

#11
Aug 26, 2016, 11:28 pm Last Edit: Aug 26, 2016, 11:30 pm by Isaac96
When will the boards be available?

Is there a specific socket for the satellite RX?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MartinL

Hi Isaac96,

Quote
When will the boards be available?
A small batch of hand built prototype Falcon 1 and 2 boards will be available at the end of August/beginning of September. They're identical to those pictured.

Quote
Is there a specific socket for the satellite Rx?
No, there isn't a specific JST-ZH socket. It's necessary to use a ZYX-S DSM2/DSMJ Compatible Satellite Receiver Cable that connects the satellite receiver to the Falcon board's throttle input. Here's a link to the cable on the Hobbyking website: http://www.hobbyking.co.uk/hobbyking/store/uh_viewitem.asp?idproduct=24524

The Falcon boards have been tested with both Orange DSM2 and Spektrum DSMX satellite receivers.

Isaac96

Awesome!
I actually made myself a adapter cable for my Naze-type board.
Any thoughts on price?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MartinL

#14
Sep 05, 2016, 10:37 am Last Edit: Sep 05, 2016, 10:39 am by MartinL
Hi Isaac96,

Thanks for your interest.

Quote
Any thoughts on price?
Yes. I'm selling them in UK pound sterling, simply because this is the currency I used to buy the parts. Also, I'm shipping from the UK, so local import taxes may apply.

At the moment, I'm offering a limited number of these hand-built prototypes at just the cost of the parts + postage.

The Falcon 1 will be around £35 (approximately US$45) + postage.

The Falcon 2 will be around £45 (approximately US$60) + postage.

A buzzer is included, as are cable ties and foam to cover the barometer on the Falcon 2. The boards also come with straight headers pre-soldered.

I'm looking to put them on ebay this week. I'll let you (and others that have expressed an interest) know when they become available.

Martin

Go Up