{"id":440,"date":"2012-09-22T21:37:30","date_gmt":"2012-09-22T19:37:30","guid":{"rendered":"http:\/\/majek.mamy.to\/?p=440"},"modified":"2018-03-18T19:19:16","modified_gmt":"2018-03-18T18:19:16","slug":"multiwii-328p-controller-from-hk","status":"publish","type":"post","link":"https:\/\/majek.sh\/en\/multiwii-328p-controller-from-hk\/","title":{"rendered":"MultiWii 328P controller from HK"},"content":{"rendered":"<p>Another useful brick for FPV is plane stabilizer and autopilot.<br \/>\nIn HobbyKing there is a new <a href=\"http:\/\/www.hobbyking.com\/hobbyking\/store\/uh_viewitem.asp?idproduct=27033&#038;aff=78124\" target=\"_blank\">multicopter controller<\/a> with all needed sensors: gyroscopes (3D), accelerometers (3D), magnetometer (3D) and barometer (pressure\/altitude sensor).<br \/>\nThis is mainly designed as multicopter controller but <a href=\"http:\/\/www.multiwii.com\/\" target=\"_blank\">MultiWii<\/a> is very advanced software and has also support for planes (traditional and flying wings).<br \/>\nWith 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).<\/p>\n<p>Small video from &#8216;unboxing&#8217; and what it can do just out of the box:<br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/VmvW1DjzZc4\" frameborder=\"0\" width=\"560\" height=\"315\"><\/iframe><\/p>\n<p>Next step will be to install Arduino environment and compile firmware with plane support.<br \/>\nMore to come \ud83d\ude42<\/p>\n<p><strong>Update 2012-12-15<\/strong><\/p>\n<p>Planes changed a little because I started to build a <a title=\"Tricopter\" href=\"https:\/\/majek.sh\/tricopter\/\">tricopter<\/a> \ud83d\ude42<\/p>\n<p>At start I checked all pins and made helpful pin assignment table:<\/p>\n<table>\n<tr>\n<th>Atmega328 pin and description<\/th>\n<th>HK&#8217;s controller pin<\/th>\n<th>Arduino pin<\/th>\n<\/tr>\n<tr>\n<td>1 (PD3\/PCINT19\/OC2B\/INT1)<\/td>\n<td>AX4<\/td>\n<td>D3<\/td>\n<\/tr>\n<tr>\n<td>2 (PD4\/PCINT20\/XCK\/T0)<\/td>\n<td>ROL<\/td>\n<td>D4<\/td>\n<\/tr>\n<tr>\n<td>9 (PD5\/PCINT21\/OC0B\/T1)<\/td>\n<td>PIT<\/td>\n<td>D5<\/td>\n<\/tr>\n<tr>\n<td>10 (PD6\/PCINT22\/OC0A\/AIN0)<\/td>\n<td>YAW<\/td>\n<td>D6<\/td>\n<\/tr>\n<tr>\n<td>11 (PD7\/PCINT23\/AIN1)<\/td>\n<td>AX1<\/td>\n<td>D7<\/td>\n<\/tr>\n<tr>\n<td>12 (PB0\/PCINT0\/CLKO\/ICP1)<\/td>\n<td>unconnected<\/td>\n<td>D8<\/td>\n<\/tr>\n<tr>\n<td>13 (PB1\/PCINT1\/OC1A)<\/td>\n<td>D9, BUZ\/D9<\/td>\n<td>D9<\/td>\n<\/tr>\n<tr>\n<td>14 (PB2\/PCINT2\/SS\/OC1B)<\/td>\n<td>D10<\/td>\n<td>D10<\/td>\n<\/tr>\n<tr>\n<td>15 (PB3\/PCINT3\/OC2A\/MOSI)<\/td>\n<td>D11, J5-4<\/td>\n<td>D11, MOSI<\/td>\n<\/tr>\n<tr>\n<td>16 (PB4\/PCINT4\/MISO)<\/td>\n<td>PWR, UN4(***)\/D12, J5-1<\/td>\n<td>D12, MISO<\/td>\n<\/tr>\n<tr>\n<td>17 (PB5\/SCK\/PCINT5)<\/td>\n<td>J5-4, led D4<\/td>\n<td>D13, SCK<\/td>\n<\/tr>\n<tr>\n<td>19 (ADC6)<\/td>\n<td>UN2(***)\/PSE<\/td>\n<td>A6<\/td>\n<\/tr>\n<tr>\n<td>22 (ADC7)<\/td>\n<td>UN1(***)\/BAT<\/td>\n<td>A7<\/td>\n<\/tr>\n<tr>\n<td>23 (PC0\/ADC0\/PCINT8)<\/td>\n<td>A0<\/td>\n<td>A0<\/td>\n<\/tr>\n<tr>\n<td>24 (PC1\/ADC1\/PCINT9)<\/td>\n<td>A1<\/td>\n<td>A1<\/td>\n<\/tr>\n<tr>\n<td>25 (PC2\/ADC2\/PCINT10)<\/td>\n<td>A2<\/td>\n<td>A2<\/td>\n<\/tr>\n<tr>\n<td>26 (PC3\/ADC3\/PCINT11)<\/td>\n<td>unconnected<\/td>\n<td>A3<\/td>\n<\/tr>\n<tr>\n<td>27 (PC4\/ADC4\/SDA\/PCINT12)<\/td>\n<td>SDA (*)<\/td>\n<td>A4<\/td>\n<\/tr>\n<tr>\n<td>28 (PC5\/ADC5\/SCL\/PCINT13)<\/td>\n<td>SCL (*)<\/td>\n<td>A5<\/td>\n<\/tr>\n<tr>\n<td>29 (PC6\/RESET)<\/td>\n<td>J5-5<\/td>\n<td>RESET<\/td>\n<\/tr>\n<tr>\n<td>30 (PD0\/RXD\/PCINT16)<\/td>\n<td>AX2, DSM-S(**), USB<\/td>\n<td>D0, RX<\/td>\n<\/tr>\n<tr>\n<td>31 (PD1\/TXD\/PCINT17)<\/td>\n<td>AX3, LCD<\/td>\n<td>R1, TX<\/td>\n<\/tr>\n<tr>\n<td>32 (PD2\/INT0\/PCINT18)<\/td>\n<td>THR<\/td>\n<td>D2<\/td>\n<\/tr>\n<\/table>\n<p>(*) &#8211; pins SDA and SCL are connected by 5V to 3.3V level converter<br \/>\n(**) &#8211; this pin is also connected to jumper J1 which connects DSM2 port <strong>OR<\/strong> USB interface.<br \/>\n(***) &#8211; 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: &#8230;AX3, AX4, UN1, UN2, BUZ, PWR, LCD, UN3. On bottom connector there are pins: &#8230; A2, UN4, D11,&#8230;<br \/>\nHeader J5 haven&#8217;t header soldered.<br \/>\nLed D1 indicates that main 5V voltage is applied to the board.<br \/>\nLed D5 is connected after 3.3V voltage regulator.<br \/>\nLeds D2 and D3 are connected to FTDI chip and indicate USB uart activity.<br \/>\nAnd one <strong>warning<\/strong>: this processor have only one serial port, DSM2 input uses it, so it&#8217;s not possible to connect receiver to this port and at the same time use usb interface for configuration!<\/p>\n<p>Inside <a href=\"http:\/\/arduino.cc\" target=\"_blank\">Arduino<\/a>, choose <em>Tools\/Board\/Arduino Pro or Pro Mini (5V, 16MHz) w\/ ATmega328<\/em><\/p>\n<p>I downloaded newest version of MultiWii from svn (revision 1244).<br \/>\nTo properly compile I had to get source from <em>MultiWii_shared<\/em> and rename directory to <em>MultiWii<\/em>.<br \/>\nOnce opened sketch <em>MultiWii.ino<\/em>, there should be multiple tabs with included files. In this version there is enough to modify <em>config.h<\/em>: uncomment <em>#define HK_MultiWii_328P<\/em> and copter specific options (for me there were <em>TRI<\/em>, <em>MINTHROTTLE<\/em> and <em>SERIAL_SUM_PPM<\/em> for CPPM output from FrSky receiver).<\/p>\n<p>I flashed it with this firmware without any problems using only usb cable and above configuration (this board already has flashed Arduino bootloader).<\/p>\n<p><strong>Update 2013.04.27<\/strong><\/p>\n<p>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.<br \/>\n<a href=\"https:\/\/majek.sh\/wp-content\/uploads\/2012\/09\/hk-multiwii.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2012\/09\/hk-multiwii-478x480.jpg\" alt=\"HobbyKing&#039;s Multiwii controller with DSM input\" width=\"478\" height=\"480\" class=\"alignnone size-medium wp-image-904\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2012\/09\/hk-multiwii-478x480.jpg 478w, https:\/\/majek.sh\/wp-content\/uploads\/2012\/09\/hk-multiwii-150x150.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2012\/09\/hk-multiwii-1020x1024.jpg 1020w, https:\/\/majek.sh\/wp-content\/uploads\/2012\/09\/hk-multiwii.jpg 1024w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>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 <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/majek.sh\/en\/multiwii-328p-controller-from-hk\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[38,50,11,31,13,42,32],"_links":{"self":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts\/440"}],"collection":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/comments?post=440"}],"version-history":[{"count":46,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":1743,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts\/440\/revisions\/1743"}],"wp:attachment":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/media?parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/categories?post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/tags?post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}