MultiWii 328P controller from HK

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 🙂

Update 2012-12-15

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
1 (PD3/PCINT19/OC2B/INT1) AX4 D3
2 (PD4/PCINT20/XCK/T0) ROL D4
9 (PD5/PCINT21/OC0B/T1) PIT D5
10 (PD6/PCINT22/OC0A/AIN0) YAW D6
11 (PD7/PCINT23/AIN1) AX1 D7
12 (PB0/PCINT0/CLKO/ICP1) unconnected D8
13 (PB1/PCINT1/OC1A) D9, BUZ/D9 D9
14 (PB2/PCINT2/SS/OC1B) D10 D10
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
19 (ADC6) UN2(***)/PSE A6
22 (ADC7) UN1(***)/BAT A7
23 (PC0/ADC0/PCINT8) A0 A0
24 (PC1/ADC1/PCINT9) A1 A1
25 (PC2/ADC2/PCINT10) A2 A2
26 (PC3/ADC3/PCINT11) unconnected A3
27 (PC4/ADC4/SDA/PCINT12) SDA (*) A4
28 (PC5/ADC5/SCL/PCINT13) SCL (*) A5
29 (PC6/RESET) J5-5 RESET
30 (PD0/RXD/PCINT16) AX2, DSM-S(**), USB D0, RX
31 (PD1/TXD/PCINT17) AX3, LCD R1, TX
32 (PD2/INT0/PCINT18) THR D2

(*) – 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).

Update 2013.04.27

I ordered another one and it looks like a little different version. At least it has all labels near pins, so I updated table above. Additionaly it has soldered pin header on ISP (programming) pins.
HobbyKing's Multiwii controller with DSM input

This entry was posted in R/C and tagged , , , , , , . Bookmark the permalink.

22 Responses to MultiWii 328P controller from HK

  1. Faraz says:

    Hi, really looking forward for your test of multiwii for aeroplane. especially RTH function

  2. Herman says:

    Hi,MAJEK
    I am having a problem with my multiwii board. I have connected it to my spektrum radio, downloaded firmware and have everything working correctly on GUI. Throttle moves, GPS finds me on map, mag and horizon move correctly, but I cannot arm motors. I have calibrated all separately from receiver, all run. Have tried various minthrottle commands on config.h.
    Any suggestions to get it to arm?

    Thanks
    Herman

    • majek says:

      Did you arm controller (throttle down, yaw right)?

      • Herman says:

        Yes no results, no beeps. I only get a beep when I first power up.
        Herman

        • majek says:

          Ok, so it looks like you have problems with arming control board, not motors.
          I had the same issue at start;-).
          Problem is in transmitter – all sticks/channels should be calibrated to output full range of signal (1000-2000). In MultiWiiConf you could check how wide the signal range really is (it shows values near bars). To arm or perform other magic sticks combination, output must be below 1100 or above 1900, otherwise nothing will happen.
          Another way of arming is to configure some trasmitter switch connected to AUX input to make ARM in some position.
          If you are brave enough, you could also hack MultiWii.ino (MAXCHECK and MINCHECK defines) to change such thresholds but I don’t recommend it:-)

          • krzysiek says:

            witam. mam ten sam problem. po podalczeniu zasilania sa 4 sygnaly dzwiekowe i nie moge uruchomic obrotow. w jaki sposob zmienic ustawienia uruchomianioa silnikow. wystarczy zmienic paramatry w config.h?
            ps. u mnie wartosci sie mieszcza w granicy od 1100-1900

          • majek says:

            Najlepiej jednak zwiększyć zakres na aparaturze. Jak tego się nie da, to osobiście polecam skonfigurowanie sobie po prostu uzbrajanie i tryby lotu na przełączniku na jakimś wolnym kanale (sam tak mam – jakoś ustawienie drążków w dziwnych pozycjach mi nie pasuje). Ostatecznie można poszukać w kodzie MAXHECK i MINCHECK, ale nie wiem jak to teraz działa, bo do kodu dawno nie zaglądałem (od wersji 2.2).

  3. neo777 says:

    witam,
    właśnie zakupiłem ten FC. Mam prośbę czy możesz podać link ew. pdf z ustawieniami co i jak do tego FC? Chciałbym ustawić go bardzo dokładnie i stabilnie i nie mieć problemów. Bardzo dzękuję i czekam 🙂

    pozdrawiam
    Maciek

    • majek says:

      Wgrany jest soft do quada, jeżeli chcesz cokolwiek innego (tricopter czy hexakopter), to musisz sam skompilować Multiwii z odpowiednią konfiguracją. I tak polecam tak zrobić, bo do końca nie wiadomo jaka wersja jest tam wgrana. Po ściągnięciu i instalcji Arduino jest to dosyć proste.

      Ja jeszcze nie użyłem tej płytki w kopterze, więc o używaniu w życiu się nie wypowiem, o kopterach też wiem tyle co przeczytałem 🙂

      Co do ustawiania, to jeżeli już zainstalujesz Arduino, to jest tam jakiś ‘przykład’, którym można wyczyścić eeprom, wtedy nowy soft wystartuje z domyślnymi ustawieniami, które podobno wystarczają na początek.

      Co do samego tuningu PID, to znalazłem kilka stron z opisami:
      http://www.rcgroups.com/forums/showthread.php?t=1375728
      http://rc-fpv.pl/viewtopic.php?t=5118

      Poza tym nastawy PID zależą silnie od tego jakiem masz regulatory, czy z szybkim softerm czy standardowe, ile waży kopter, jakie silniki itp., więc nie ma tu niestety uniwersalnych nastaw,

  4. Tejas says:

    Hey,
    I am using this board for my QuadX configuration. all the sensors are working fine and the RC inputs are coming well but there is no output from the board itself. The motors are not running. I tried calibrating the ESC’s which worked fine but once I load the original Program only the motors doesn’t work. Please help me out as soon as possible. Am I missing out anything in conf.

    Tejas

  5. David says:

    Hi,

    I’m not familiar with this board, but maybe you can help.
    My question is: can the SPI interface of the microcontroller be used somehow?
    As I see, one of the lines is connected to a LED, etc…

    Thank you,
    David

    • majek says:

      Led is connected via 330 Ohm resistor, so it shouldn’t be a problem. At least, you’ll have flashing led during SPI communication 🙂
      Of course it needs also programming.
      But basically this is bare Arduino board with sensors connected through level converter, most pins connected to headers (sometimes multiple times) and with two unconnected CPU pins (error in pcb design?).

  6. Olof says:

    Have you got aux3 and aux4 to work? When I got my board, only aux1 registered any input. I recompiled multiwii width aux2 as D12 and it works now but no luck with aux3 and 4… Maybe my board is broken…

    • majek says:

      I use Frsky and CPPM, so I get all channels via one cable (THR), so I didn’t need to connect all cables from receiver.
      I read that Multiwii on Promini boards can handle only up to 6 inputs for channels, so I think that using AUX3 and AUX4 on this board is possible only by CPPM/PPMSUM. Look for explanations here: http://www.multiwii.com/forum/viewtopic.php?f=16&t=3093

      • Olof says:

        Ah I see. Thank you for the link! Seems the print on the board is a bit confusing 🙂

  7. YY says:

    Hi,

    May I know how to power-up this board using battery? Which pin? Or I can use 5VDC power supply
    connected to usb port.

    THANKS.

    • majek says:

      You can use any pin labeled with ‘+’ and ground sign, or usb connector.
      It should be powered only from 5V as it doesn’t have voltage regulator and reverse voltage protection as typical Arduino board, so be careful and do not apply higher voltage.

  8. Tyler says:

    I have a multiwii 328p board. I can only get it to arm when it is connected my usb. I don’t have to start the gui at all (however everything looks fine when I do). I have calibrated the esc’s and it will start up noramlly and run fine ONLY when connected to the usb. If I just plug it into my battery a few moments go by and my motors begin to beep ever few seconds. Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.