Another useful brick for FPV is plane stabilizer and autopilot.
In HobbyKing there is a new multicopter controller with all needed sensors: gyroscopes (3D), accelerometers (3D), magnetometer (3D) and barometer (pressure/altitude sensor).
This is mainly designed as multicopter controller but MultiWii is very advanced software and has also support for planes (traditional and flying wings).
With such range os sensors this controller is able to act almost as autopilot, as it features navigation based on magnetic heading from compass. With gps attached it should be able to do RTH (return to home).
Small video from ‘unboxing’ and what it can do just out of the box:
Next step will be to install Arduino environment and compile firmware with plane support.
More to come 🙂
Planes changed a little because I started to build a tricopter 🙂
At start I checked all pins and made helpful pin assignment table:
|Atmega328 pin and description||HK’s controller pin||Arduino pin|
|13 (PB1/PCINT1/OC1A)||D9, BUZ/D9||D9|
|15 (PB3/PCINT3/OC2A/MOSI)||D11, J5-4||D11, MOSI|
|16 (PB4/PCINT4/MISO)||PWR, UN4(***)/D12, J5-1||D12, MISO|
|17 (PB5/SCK/PCINT5)||J5-4, led D4||D13, SCK|
|27 (PC4/ADC4/SDA/PCINT12)||SDA (*)||A4|
|28 (PC5/ADC5/SCL/PCINT13)||SCL (*)||A5|
|30 (PD0/RXD/PCINT16)||AX2, DSM-S(**), USB||D0, RX|
|31 (PD1/TXD/PCINT17)||AX3, LCD||R1, TX|
(*) – pins SDA and SCL are connected by 5V to 3.3V level converter
(**) – this pin is also connected to jumper J1 which connects DSM2 port OR USB interface.
(***) – pins named UNx are pins without names (on old version of board, new one has labels near all pins). On right row there are pins: …AX3, AX4, UN1, UN2, BUZ, PWR, LCD, UN3. On bottom connector there are pins: … A2, UN4, D11,…
Header J5 haven’t header soldered.
Led D1 indicates that main 5V voltage is applied to the board.
Led D5 is connected after 3.3V voltage regulator.
Leds D2 and D3 are connected to FTDI chip and indicate USB uart activity.
And one warning: this processor have only one serial port, DSM2 input uses it, so it’s not possible to connect receiver to this port and at the same time use usb interface for configuration!
Inside Arduino, choose Tools/Board/Arduino Pro or Pro Mini (5V, 16MHz) w/ ATmega328
I downloaded newest version of MultiWii from svn (revision 1244).
To properly compile I had to get source from MultiWii_shared and rename directory to MultiWii.
Once opened sketch MultiWii.ino, there should be multiple tabs with included files. In this version there is enough to modify config.h: uncomment #define HK_MultiWii_328P and copter specific options (for me there were TRI, MINTHROTTLE and SERIAL_SUM_PPM for CPPM output from FrSky receiver).
I flashed it with this firmware without any problems using only usb cable and above configuration (this board already has flashed Arduino bootloader).