HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Apr 16, 2013, 04:43 PM
Registered User
Rochester, NY, USA
Joined Aug 2000
7,796 Posts
Discussion
Witespy Pro Ez3.0 Flight Controller - The Evolution of MEGA

Hi,

Before venturing blindly into a Multiwii project, consider this quote from the author of Multiwii, Alex Dubus. It speaks to the expectations of the hobbyist and to the spirit of experimentation. Open Source code projects are not for everyone so choose your fun time carefully.

Quote:
MultiWii is not a product, nor a plug and play solution. It is basically an open source project. Don't expect to buy a compatible board and run it without a minimum knowledge.
Now, it's time for another step in the evolution of the MEGA flight controller. Starting with the original Seeeduino Mega introduced on RCG over two years ago by kinderkram, we have more recently seen the Pro 1 and Pro 2 boards become a popular middle range choice for running either MultiWii or Mega Pirate Next Generation (MPNG).

The Witespy Pro 2.0 Flight Controller board was outfitted with new sensors and a higher quality GPS option. The boards were pre-loaded and pre-configured so that minimal knowledge was required to get flying. Other options like Bluetooth, 3DR Radio Telemetry, and a uBlox 6M GPS module could be purchased pre-configured with mating cables.

The Witespy Pro Ez3.0 Flight Controller board has everything that the Pro 2 board offers but also includes a 3.3v regulator, Spektrum Satellite receiver connection, and ALL the missing Atmega2560 I/O pins that are needed for taking full advantage of the MultiWii and MPNG feature set. The only remaining header option is for the 11 "D" outputs on the right side.

Here is the Witespy Pro2/Pro3 board thread for MPNG
Witespy Pro2 & Pro3 Flight Controllers for MegaPirate Next Generation (MPNG)

Here is the Witespy Pro 2 board thread for MultiWii
Whitespy MWC Pro 2.0 FC +uBlox GPS for MultiWii

Here is the HobbyKing Pro 1 board thread for MPNG
MegaPirate NG on HK MultiWii PRO Flight Controller w/MTK GPS Module

Here is the HobbyKing Pro 1 board thread for MultiWii
MultiWii on HK MultiWii Mega Board WITH MTK 3329 GPS

Here is the original thread for MultiWii by Alexinparis
MultiWiiCopter (previously TriWiiCopter)

Here is the original MEGA thread by kinderkram
Pirates' Productions Proudly Presents: the MegaPirate UAV

Here is the Witespy Flip Pro board thread for MultiWii
Witespy Flip Pro Flight Controller
Greg Covey is offline Find More Posts by Greg Covey
Last edited by Greg Covey; Aug 26, 2013 at 11:15 AM.
Reply With Quote
Sign up now
to remove ads between posts
Old Apr 16, 2013, 04:44 PM
Registered User
Rochester, NY, USA
Joined Aug 2000
7,796 Posts

MultiWii PRO Ez3.0 Flight Controller w/ GPS Option
.

The MEGA Pro 3 board has the same great sensors as Pro 2.0 board plus a separate 5v and 3.3v regulators. It also has a Spektrum Satellite receiver connection, and ALL the missing Atmega2560 I/O pins that are needed for taking full advantage of the MultiWii and MPNG feature set.
  • Atmega2560 - Super fast, tons of memory
  • MPU6050 Six Axis Gyro/Accelerometer
  • MS5611 Barometer
  • HMC5883L Magnetometer
  • Servo output for camera pitch and roll control
  • Supports direct connection of GPS module
  • On-board USB connection for programming
  • Mounting: Standard Mk style mounting holes 45mm X 45mm
  • Includes: one radio r/x cable and one motor quad cable.
  • Dimensions: 70x50x12mm
  • Weight: 16g
  • Pre-loaded with MultiWii R2.2 QUADX, and programed to fly almost out of the box with most any ESC's
  • To reflash the board, using the IMU config as : //FFIMUv43
Pro 3 board I/O detail.

------------------------------------------------ Powering the Pro3 Board --------------------------------------------------------
Powering Options and Limitations
Jumpering Vin and 5v
Arduino Legacy Power
------------------------------------------------ Covering the Pro2/Pro3 Board BARO --------------------------------------------------------
The ArduFlyer 2.5.2 BARO is the same as the Pro2/Pro3 boards and Joe Abram has it "covered".
3 different ways to Cover APM 2.5 Barometer to exclude LIGHT and Prop Wash
------------------------------------------------ External Compass --------------------------------------------------------
For those that want (or need) an external compass, Witespy now offers the "Black Edition" Pro 3 board with the Magnetometer chip removed. To compliment this board, a new uBlox 6M GPS Module with a mounting backplane and compass module is available that simply plugs into the Pro board with an included Ez cable. An optional shield (or hood) is also available when ordering. Note that using an external compass requires a slight change in the Multiwii code. The change is detailed below in post #3 or can be obtained from the special build in the Witespy dropbox.

MultiWii PRO Ez3.0 Flight Controller "Black Edition" w/o Compass
.

uBlox 6M GPS W/ Mounting backplane and Compass
.
-------------------------------------------------- LED Ring ------------------------------------------------------
Here is a summary of the new Readytofly MWC LED Ring.

For those that are not familiar with this MultiWii feature you need to uncomment this line below in config.h In R2.2, this feature is already built in so there is no need to add extra ino files.

/********* DFRobot LED RING **************/
/* I2C DFRobot LED RING communication */
//#define LED_RING

From change.txt in R2.2, you can see the documentation links.

LEDRING pattern was refined thanks to shikra. See instructions here.

Instructions files and documents are here.

Connecting up Hardware

How to configure LEDring

How to configure Multiwii to work with LEDring

How to program a LEDring

The documentation is not all where it should be in the links above so here is the general feature list.

There are 2 modes available:
Mode 0 - Standalone - set LED sequence flash mode via Switch 1.
Mode 1 - MultiWii - LED sequence set via I2C connection from Multiwii
Switch S1 - Toggles between various flashing sequences when run standalone without I2C connection
Switch S2 - Toggles between standalone flashing sequences or I2C controlled. If no I2C, LEDs are off
Modes / flash sequence remembered between restarts

Standalone Mode:

Sequence 0 - Standard Naviugation lights. Red left, Green right, white rear, flashing red flashing white strobe
Sequence 1 - Flashing Red/Green. Red facing forward for orientation
Sequence 2 - Static Red/Green. Red facing forward for orientation
Sequence 3 - Fast Green flash
Sequence 4 - Static Green
Sequence 5 - Static Red
Sequence 6 - Static Blue
Sequence 7 - Flashing Green
Sequence 8 - Flashing Red
Sequence 9 - Flashing Blue
Sequence 10 - Alexander the great effect 1
Sequence 11 - Alexander the great effect 2
Sequence 12 - All off

Multiwii connected Mode:

Motors on - ACRO flying - Standard Navigation lights / strobe
Motors on - LEVEL flying - Static Red/Green. Red facing forward for orientation.
Motors on - Position hold - Static all Blue
Motors on - RTH - Flashing all Blue
TBD *** Motors on - battery level low
Motors off - Unstable position warning. Will not arm - Fast Green flash
Motors off - LEVEL mode - with BARO/MAG/GPS/CAMSTAB indicator - See below for sequence:
  • BASE color for all LED = GREEN
  • IF CAMSTAB=on flash D1
  • IF MAG=on flash D2,D12
  • IF BARO=on flash D3,D11
  • IF GPS SATS> 0 flash D4-D10 (no of sats max=7. Enough for accurate fix)

Here is Witespy's list formatted:

Multiwii Connected Mode:
Motors On:
  • ACRO flying - Cool Flashing MultiWiicopter Navi lights / strobe
  • HORIZON flying - Static MultiWiicopter Navigation lights. Position for orientation.
  • LEVEL flying - Static MultiWiicopter Navigation lights. Position for orientation.
  • GPS position hold - Static all Blue
  • GPS RTH - Flashing all Blue
  • Battery level low - Fast flashing all Red
Motors Off, BARO/MAG disabled:
  • Unstable position warning - Fast Green flash
  • Acc not calibrated - Fast Green flash
  • Acro mode with BARO/MAG disabled - cool flashing MultiWiicopter Navi lights / strobe
Motors Off, BARO/MAG enabled:
  • ACRO mode - base color = RED
  • LEVEL/ANGLE mode - base color = GREEN
  • HORIZON mode - base color = every 2nd LED GREEN
  • IF MAG = North direction indicated by single Blue
  • IF BARO = flash every other blue
Motors Off, GPS RTH/POSHOLD enabled:
  • base color = WHITE
  • no sats = circling RED LED on WHITE (NOT ready to fly)
  • sats < 5 = flashing RED count of number of sats (NOT ready to fly)
  • sats 5 pr more = steady RED count of number of sats (ready to fly)
  • IF MAG = North direction indicated by single Blue
  • IF BARO = non sats LED are white

For the Mega Pro 1 and 2 boards use the 4 pins (Gnd/SCl/SDA/5v) on the bottom of the board. For the Pro 3 board, use the second from the bottom left connector (Gnd, +5v, SCL_H, SDA_H).
Greg Covey is offline Find More Posts by Greg Covey
Last edited by Greg Covey; Apr 05, 2014 at 08:23 AM.
Reply With Quote
Old Apr 16, 2013, 04:44 PM
Registered User
Rochester, NY, USA
Joined Aug 2000
7,796 Posts
Tricks, Mods, and General Help

3DR Radio Configuration for APM
3DR Radio Installing by Joe Abram
3DR Radio Configuration Utility
Magnetic Declination Finder #1
Magnetic Declination Finder #2
MinimOSD Basic Setup
MinimOSD User Manual
MinimOSD Hardware Mods
MinimOSD 5v Operation Mods
MinimOSD User Post 1
MinimOSD User Post 2
MinimOSD Development on Multiwii Forum
MultiWii EZ-GUI - Android App by ezio
MultiWii WinGUI - PC App by EOSbandi
Multiwii FAQ
Multiwii Firmware Downloads
Multiwii Forum
Multiwii Wiki
Multiwii Flight Modes 1
Multiwii Flight Modes 2
MultiWii GPS assited Position Hold and RTH functions
Multiwii Extra Features
MultiWii Custom Motor Mixes
MultiWii PID Tuning
Pilot Lamp Product
Pilot Lamp Doc 1
Pilot Lamp Doc 2
Silabs CPD USB to UART Bridge Drivers for Witespy Pro 3.0 board
Tortoise SVN Client
uBlox Module Configuration
uBlox u-center GPS evaluation software
u-blox-config.ublox.txt - uBlox u-center GPS configuration file
-----------------------------------------------------------------------------------------
MultiWii WinGUI is a .NET based configuration and GCS interface for the famous MultiWii multicopter controller software. It does not intend to replace the original Java-based MultiWiiConf utility, but trying to offer a richer user experience by sacrificing multi-platform capabilities for a Windows-specific application.
-----------------------------------------------------------------------------------------
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. The Arduino platform is used to compile and load the code into the Witespy Pro 3.0 Ez Flight Controller via USB. For the MWC Mega Pro boards you need to select “Arduino Mega 2560 or Mega ADK” in the Tools>Board menu.
-----------------------------------------------------------------------------------------
MultiWii PRO Ez3.0 Flight Controller support software is here. This includes the USB drivers, MultiWii R2.2 with GPS, and LED_Ring support.
-------------------------------------------------- Blue Board LEDs ------------------------------------------------------
LED1 changes from green to red when the motors are armed and back to green when safely disarmed. If LED1 is blinking red, there is an accelerometer error and recalibration is necessary.

LED4 is the GPS_LED_INDICATOR which indicates a valid GPS fix with at least 5 satellites by flashing the LED. It's Blue on the MEGA Pros and Yellow on CRIUS AIO. The flashing acts as a satellite number indicator:
  • No GPS FIX -> LED blink at speed of incoming GPS frames
  • Fix and satellite number bellow 5 -> LED off
  • Fix and satellite number >= 5 -> LED blinks, one blink for 5 sat, two blinks for 6 sat, three for 7 sats, etc.
I don't use any of the other LEDs but it seems like LED2 indicates the max angle has been reached.
-------------------------------------------------- Black Board LEDs ------------------------------------------------------
  • LED1 is off when disarmed and red when armed. If LED1 is blinking red, there is an accelerometer error and recalibration is necessary.
  • GPS is on LED3 but not LED4 - could it depend on the serial number where gps is attached to?
  • When max angle reached LED1 and LED2 start blinking in sequence. When armed just LED2 is blinking (LED1 is red because armed).
  • LED4 is always on, yellow.
-------------------------------------------------- Broken USB Connector ------------------------------------------------------
For those of you that managed to break off the USB connector, the first diagram below shows how to get your USB back using an inexpensive FTDI adaptor.

If you break off your USB connector and need to use the FTDI adapter, the jumper is no longer needed on the Pro 2 and Pro 3 boards like it was on the Pro 1 board. The system now takes care of the Tx/Rx pins so that there is no conflict with the USB interface chip.

Paul also sells Micro USB ports now so if you damaged yours you can solder a new one back on. When using the Pro3 boards, you can even solder it to the bottom side.
-------------------------------------------------- Battery Voltage Monitoring ------------------------------------------------------
Multiwii uses the single ended mode so you will need the resistor divider connected to A0 in the middle of the two resistors and Vbatt connected to the top resistor. The bottom of the resistor divider goes to GND. Use the "Multiwii Battery Voltage Monitor" image below for proper hook-up. For other cell counts, use this Voltage Divider Calculator.

For a 3s Lipo (12.6v)
R2=33k and R1=51k (33K/84K=.393) 84K=sum of both resistors
12.6v*.393 = 4.95v at A0
vbat = [0;1023]*16/VBATSCALE
vbat = 1023*16/131 = 125 (or 12.5v reading)

For a 4s Lipo (16.8v) (from rephlex00 in post #1594)
R2=24k and R1=56k (24K/80K=0.3) 80K=sum of both resistors
16.8v*0.3 = 5.04v at A0
vbat = [0;1023]*16/VBATSCALE
vbat = 1023*16/98 = 167 (or ~16.8v reading)

Uncomment the "define VBAT" in config.h to avtivate the battery voltage monitoring and tailor the VBATSCALE value in config.h for voltage accuracy.
-------------------------------------------------- Multiwii Stick Commands ------------------------------------------------------
Here are the MultiWii Stick Commands from Hamburger.
-------------------------------------------------- Cam Stab / Gimbal Control ------------------------------------------------------
Here is a summary of the Multiwii Gimbal Control setup in post #2 of the Witespy Pro 2 board thread.
-------------------------------------------------- Dialing in Position Hold ------------------------------------------------------
For those that need help with dialing in the PH performance, here is a good source of information on the MultiWii GPS assited PH and RTH functions written by EOSBandi.

MultiWii GPS assited Position Hold and RTH functions

If you first test Horizon Mode then test Alt Hold Mode, you can disable MAG if you get compass interference (hence the need for the Black Edition) and then adjust the Altitude PID for best results based upon your setup.

Save the GPS Hold testing for last. You'll need to adjust the PosHold, PosHoldRate, and Nav Rate PIDs for stability unless you get lucky! Some folks using TBS Discovery or clone type quads have gotten lucky. As previously posted, I have found that the dreaded "circle mode" effect in GPS Hold Mode can be killed by increasing the Nav Rate P value to around 4.0.
-------------------------------------------------- External MAG Compass ------------------------------------------------------
If your MAG functionality is suffering from interference and all your efforts to reduce noise have failed and you don't want to purchase the newer Blacked MAG Edition Pro 3 board mentioned above in post #2, I have had success with installing my new HMC5883L Compass Module from Witespy. This appears to be the same version offered by HK but is much quicker for us to get in the US.

Unfortunately, I was not able to properly disable the on-board MAG module through a software change. This was likely due to the fact that it also uses the I2C bus with the same address. I used Van's link here for reference but merely cut out (hacker style) the on-board MAG module because I was never going to reuse it and didn't care about breaking it apart. Note that you could also use a Dremel tool, if careful to only cut the chip pins away.

The line in BOLD below must be commented out for MEGA boards like the Pro 1-3. I simply cable wrapped it to the side of my GPS board and what an amazing difference! My new MAG is now noise-free! Remember to recalibrate the MAG first with the GUI.
  • Load your Multiwii sketch and click on the def.h tab.
  • Type Ctrl-F to search or use the Edit, Find pull-down menus.
  • Search for this string below:
  • #define MPU6050_I2C_AUX_MASTER
  • You'll find it in the code like below and add the // (as shown) to comment it out.
#if defined(FREEIMUv043) || defined(MICROWII)
#define MPU6050
#define HMC5883
#define MS561101BA
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = -Z;}
//#define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050
#undef INTERNAL_I2C_PULLUPS
#endif

I made up my own cable to connect the external Compass Module to the I2C connector with the 3.3v supply. It is not recommended to use the 5v supply although others have tried it successfully. Paul has since made a new cable for connecting the external Compass Module to the Pro 3 board.
-------------------------------------------------- MAG Chip Orientation ------------------------------------------------------
The images below labeled "MAG Chip Orientation" show the correct orientation between the MAG chip and the Flight Controller for Multiwii.

On the MAG chip, when you are standing behind the MRC looking down at it, the white dot next to the "L" goes on the lower left for Multiwii. (Note: On APM:Copter the white dot next to the "L" goes on the upper right) The external 5883 MAG module chip is the same on the GPS/MAG combos. Use this as an example of the white labeling on any 5883 MAG module.

Once the MAG and FC are both in the proper orientation, then do a calibration.

-------------------------------------------------- Satellite Receiver ------------------------------------------------------
At only $5, the Lemon DSM2 Satellite Receiver even comes with the connecting cable and makes for a great low-cost, low-weight receiver that really cleans up the wires on those smaller MRCs. The cable works fine when you connect it to a regular Spektrum receiver for binding. However, when you plug it into the Pro3 satellite port (and enable the define in config.h) it does nothing until you reverse the two outer wires; +3.3v and RxD1 signal. The image below shows the correct color orientation.

#define SPEKTRUM 1024
-------------------------------------------------- Buzzer Fix ------------------------------------------------------
I finally have the buzzer working on the Pro2 board. The issue is the same for all MEGA Pro series boards from the HK original to the Witespy Pro 1, 2, and 3.

Credit for this fix goes to RCG member GSD in Greece for finding it on the original HK board. The D8 pin header is connected to pin 17 (or Port H5) on the ATmega2650 and Multiwii is not written to use the correct pin. In fact, it was trying to toggle a GND pin 32. I suspect it was written for a different chip.

The image below shows the wiring diagram for the Arduino Buzzer Module that I used. It can connect directly to the D8 pin header using a regular male-to-male servo lead. Note that 12v is not needed so you can tie it to +5v on the board and it works fine. Also, some buzzers do not have the transistor driver circuit and can still work when tied directly to the PH5 pin. There has been some discussion about the maximum current sourcing capability of the ATmega2650 pin but several folks seem to have the buzzer working directly. If you have concerns, use the Arduino Buzzer Module or the Multiwii Pilot Lamp.

Here are the code changes:

1) First enable your buzzer features as desired in config.h. In the example below, I used the RC Mode Changes (like Horizon Mode to GPS Hold Mode) on the AUX switches to test my buzzer.

/************************************************** ******************/
/**** Buzzer ****/
/************************************************** ******************/
#define BUZZER
#define RCOPTIONSBEEP // uncomment this if you want the buzzer to beep at any rcOptions change on channel Aux1 to Aux4
//#define ARMEDTIMEWARNING 330 // (*) Trigger an alarm after a certain time of being armed [s] to save you lipo (if your TX does not have a countdown)
//#define PILOTLAMP //Uncomment if you are using a X-Arcraft Pilot Lamp

2) Now change the pin used for the buzzer toggle in def.h. This can be done several ways but this works. Add the three lines in bold and then comment out the other three lines

Code:
/**************************  all the Mega types  ***********************************/
#if defined(MEGA)
  #define LEDPIN_PINMODE             pinMode (13, OUTPUT);pinMode (30, OUTPUT);
  #define LEDPIN_TOGGLE              PINB  |= (1<<7); PINC  |= (1<<7);
  #define LEDPIN_ON                  PORTB |= (1<<7); PORTC |= (1<<7);
  #define LEDPIN_OFF                 PORTB &= ~(1<<7);PORTC &= ~(1<<7);
//  #define BUZZERPIN_PINMODE          pinMode (32, OUTPUT);

  #define BUZZERPIN_PINMODE          DDRH |= (1<<5) ;

  #if defined PILOTLAMP
    #define    PL_PIN_ON    PORTC |= 1<<5;
    #define    PL_PIN_OFF   PORTC &= ~(1<<5);
  #else
//  #define BUZZERPIN_ON               PORTC |= 1<<5;
//  #define BUZZERPIN_OFF              PORTC &= ~(1<<5);
    #define BUZZERPIN_ON               PORTH |= (1<<5);
    #define BUZZERPIN_OFF              PORTH &= ~(1<<5);  
  #endif
-------------------------------------------------- MWC Pilot Lamp Fix ------------------------------------------------------
The MWC Pilot Lamp suffered from the same MEGA-Death code bug that the buzzer had. This fix below will work on either Pro2 or Pro3 boards.

1) Use the normal BUZZER pin D8 and supply power to the device from a known 5v source (not the D8 header row). D8 signal, 5v, and GND go to the Pilot Lamp (just like the buzzer)

2) In config.h select your choices (no need for the define BUZZER)

/******************/
/**** Buzzer ****/
/*****************/
//#define BUZZER
#define RCOPTIONSBEEP // uncomment this if you want the buzzer to beep at any rcOptions change on channel Aux1 to Aux4
//#define ARMEDTIMEWARNING 330 // (*) Trigger an alarm after a certain time of being armed [s] to save you lipo (if your TX does not have a countdown)
#define PILOTLAMP //Uncomment if you are using a X-Arcraft Pilot Lamp

In def.h, make the following code changes in BOLD:

Code:
/**************************  all the Mega types  ***********************************/
#if defined(MEGA)
  #define LEDPIN_PINMODE             pinMode (13, OUTPUT);pinMode (30, OUTPUT);
  #define LEDPIN_TOGGLE              PINB  |= (1<<7); PINC  |= (1<<7);
  #define LEDPIN_ON                  PORTB |= (1<<7); PORTC |= (1<<7);
  #define LEDPIN_OFF                 PORTB &= ~(1<<7);PORTC &= ~(1<<7);
//  #define BUZZERPIN_PINMODE          pinMode (32, OUTPUT);
    #define BUZZERPIN_PINMODE        DDRH |= (1<<5) ;

  #if defined PILOTLAMP
//    #define    PL_PIN_ON    PORTC |= 1<<5;
//    #define    PL_PIN_OFF   PORTC &= ~(1<<5);
      #define PL_PIN_ON               PORTH |= (1<<5);
      #define PL_PIN_OFF              PORTH &= ~(1<<5);
  #else
//    #define BUZZERPIN_ON            PORTC |= 1<<5;
//    #define BUZZERPIN_OFF           PORTC &= ~(1<<5);
      #define BUZZERPIN_ON            PORTH |= (1<<5);
      #define BUZZERPIN_OFF           PORTH &= ~(1<<5);
  #endif
-------------------------------------------------- Moving the Buzzer or Pilot Lamp from D8 to D9 ------------------------------------------------------
Make a code change as below in the “all the Mega types” section of def.h and then connect the Buzzer or Pilot Lamp to D9. Also, make sure the three OVERRIDE_BUZZERPIN lines in config.h are commented out and the appropriate features are enabled.

Code:
 #define BUZZERPIN_PINMODE DDRH |= (1<<6) ; 
  #if defined PILOTLAMP
    #define    PL_PIN_ON    PORTH |= 1<<6;
    #define    PL_PIN_OFF   PORTH &= ~(1<<6);
  #else
    #define BUZZERPIN_ON    PORTH |= 1<<6;
    #define BUZZERPIN_OFF   PORTH &= ~(1<<6);
  #endif
Isaac's Video Totorial
-------------------------------------------------- Changing MEGA Pro Board Orientation ------------------------------------------------------
The "board orientation shift" section in config.h is for 45 degree changes. The sensor axis change in def.h is for 90 degree changes. I updated the code clips below for the new imu object in Multiwii r2.3.

Use this section in def.h as one way to change the board orientation. The example below is for normal orientation with the white arrow on the board facing forward.
Code:
#if defined(FREEIMUv043)  || defined(MICROWII)
  #define MPU6050
  #define HMC5883
  #define MS561101BA
  #define ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -X; imu.accADC[PITCH]  = -Y; imu.accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] =  Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  X; imu.magADC[PITCH]  =  Y; imu.magADC[YAW]  = -Z;}
  #define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050
  #undef INTERNAL_I2C_PULLUPS
#endif
The example below is for the white arrow on the board facing 90 degrees to the right.
Code:
#if defined(FREEIMUv043)  || defined(MICROWII)
  #define MPU6050
  #define HMC5883
  #define MS561101BA
  #define ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -Y; imu.accADC[PITCH]  =  X; imu.accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = -X; imu.gyroADC[PITCH] = -Y; imu.gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  Y; imu.magADC[PITCH]  = -X; imu.magADC[YAW]  = -Z;}
  //#define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050
  #undef INTERNAL_I2C_PULLUPS
#endif
Use this section in config.h as one way to change the board orientation shift for "X" and "+" mode frames.

Code:
* If you have frame designed only for + mode and you cannot rotate FC phisycally for flying in X mode (or vice versa)
* Board Orientation Shift
* you can use one of of this options for virtual sensors rotation by 45 deegres, then set type of multicopter according to flight mode.
* Check motors order and directions of motors rotation for matching with new front point!  Uncomment only one option! */
//#define SENSORS_TILT_45DEG_RIGHT        // rotate the FRONT 45 degres clockwise
//#define SENSORS_TILT_45DEG_LEFT         // rotate the FRONT 45 degres counterclockwise
-------------------------------------------------- MinimOSD Programming ------------------------------------------------------
See the MinimOSD images below and posts #1677 and #1713 for more details. Also, visit the links below.
MinimOSD Basic Setup
MinimOSD Development on Multiwii Forum

Before plugging the FTDI card into the MinimOSD board, bend the ground and power pins from the FTDI card's side out of the way. Next, plug the FTDI card in and plug that into the PC. Then plug in 12v to the camera side of the card, on the out pin side (3-cell Lipo with JST connectors fits perfect). Lastly do the KV Team OSD GUI, Font tools and upload. The chip needs 12v in order to take the Font upload.

One trick that gets some people is that you have to hit the BROWSE button first and then select the MW_OSD_Team.mcm file in the data directory before pressing the "Upload" button. If you just click the "Upload" button first, it looks like it flashes but it's not uploading anything.

The OSD and FTDI should line up. GND to GND, 5V to 5V, RX to TX and TX to RX(GND and 5V bent out of the way).
The key is to leave a ground on but no 5v. Also remember to solder the two GND jumpers together on the bottom side of the board and the two supply jumpers together on the top side of the board as shown in the images below. The Witespy MinimOSD boards will already have this done.
  • Be sure you have the correct driver for your FTDI installed.
  • Be sure you have the correct board selected in Arduino: Arduino Pro or Pro Mini (5V,16MHz) w/ATmega328
  • Be sure you select the correct COM port for your FTDI in Arduino.
  • For the WiteSpy MinimOSB connect your FTDI as in the pic below.
  • Follow these instructions to the letter: MinimOSD Basic Setup
  • I used the r370 firmware and GUI.
  • If you are having a problem use the KV_Team code to erase the eprom before trying to reload the firmware.
To operate the OSD I found I had to disconnect the 5V line from my FC's serial connection. Only TX, RX and GND are connected and it works perfectly.

An alternate technique for loading code prior to the KV_Team_dev_r370 is here.
-------------------------------------------------- MPU6050 Gyro Flip Fix ------------------------------------------------------
Quote:
Originally Posted by acessford101 View Post
Greg, thought you could add this to the first page.

http://www.rcgroups.com/forums/showthread.php?t=1979006

OK so ive been flying since the beginning of the year, many crashes but never gave up. Got relatively good and have been having fun flying and doing videos. Wanted to try flips but with some sort of auto level. When using multiwii 2.2 and trying flips many have reported problems. Well after making it my mission to find a fix here it is for anyone using one of Witespy's/Pauls boards or one with the MPU6050 gyro.

Found the gyro scale was wrong so when the board sees its self flip it forgets where level is and the quad wants to fly off at an angle.

Ok to get horizon working correctly do the following.

Open up your multiwii 2.2 sketch.
Go to the IMU tab.
Go down to line 111 (arduino tells you what line your on, look at the bottom left of the window as you press down)
You should see the following;

#define GYRO_SCALE ((2279 * PI)/((32767.0f / 4.0f ) * 180.0f * 1000000.0f)) //(ITG3200 and MPU6050)

Replace the entire line with this one.


#define GYRO_SCALE (4 / 16.4 * PI / 180.0 / 1000000.0) // <--- Backported from 1428. Only correct for MPU6050

Now happy flying. Remember as far as i can test this fixes boards with the MPU6050 gyro. And im not responsible for anything but i can promise i wouldnt post something if i didnt try it first!

I take no credit for this other than finding answers online, trying it myself and bringing it to you. Here is a quick video showing it.
http://youtu.be/ri-JT55YBTo
Remember just throttle up, back off the throttle a little bit, go full left or right to start and hold it until the flip is almost over and throttle back up. if you get confused and let go, once the stick is centered auto level takes over.
-------------------------------------------------- Programming a Bluetooth Module Name ------------------------------------------------------
If you have several Bluetooth modules, they all show up with the same name on your tablet or laptop. You can reprogram the device name using an FTDI adapter and a freeware setup utility called Hercules.

Download the utility and use the image below for changing BT names. Note the need for <CR><LF> notation. Also note that there is no space in the name I was programming "Pro3x250" and the "AT+NAME" command. The entire line "AT+NAMEPro3x250<CR><LF>" contains no spaces.

Connect the VCC, Rx, Tx and Gnd lines between the BT module and the "FTDI". The Rx and Tx lines are crossed.

-------------------------------------------------- SBUS Tips and Mods ------------------------------------------------------
The inverter is built-in on the Pro3 board so you don't need to do anything but plug in the cable from the receiver and enable it in the code. You have to enable the SBUS defines in the config.h. For the Futaba S-Bus receiver on the Pro2/Pro3 boards, use RX1 on (Serial 1). Use the image in the upper right of post #2 to see where the SBUS connects.

In config.h, enable both SBUS lines.
Code:
    /*******************************    SBUS RECIVER    ************************************/
      /* The following line apply only for Futaba S-Bus Receiver on MEGA boards at RX1 only (Serial 1) or PROMICRO boards.
         You have to invert the S-Bus-Serial Signal e.g. with a Hex-Inverter like IC SN74 LS 04 */
      //#define SBUS
      //#define SBUS_SERIAL_PORT 1
      #define SBUS_MID_OFFSET 988 //SBUS Mid-Point at 1500
From Muddiman,
If you are using a Futaba Sbus connection to the flight controller, you need to change the channel sequence in the RX.ccp file. Changes needed are in bold print.

From:
Code:
#elif defined(SBUS) //Channel order for SBUS RX Configs
// for 16 + 2 Channels SBUS. The 10 extra channels 8->17 are not used by MultiWii, but it should be easy to integrate them.
static uint8_t rcChannel[RC_CHANS] = {PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4,8,9,1 0,11,12,13,14,15,16,17};
To:
Code:
#elif defined(SBUS) //Channel order for SBUS RX Configs
// for 16 + 2 Channels SBUS. The 10 extra channels 8->17 are not used by MultiWii, but it should be easy to integrate them.
static uint8_t rcChannel[RC_CHANS] = {ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11,12,13,14,15,16,17};
There were problems with SBUS not working in Multiwii r2.2 so use r2.3. Nick summed it up in post #1479. For FrSky SBUS mods, you need Multiwii r2.3 r1648 or newer.

FrSky setup from kapu in post 2896

-------------------------------------------------- Pro3 Mini Flight Controller ------------------------------------------------------
The only code change for the Pro3 Mini Controller is the MAG orientation change in def.h. Start with a Pro3 code set for Multiwii.

Select the Pro2/Pro3 board as usual in config.h
#define FREEIMUv043

In def.h change:
Code:
#if defined(FREEIMUv043)  || defined(MICROWII)
  #define MPU6050
  #define HMC5883
  #define MS561101BA
  #define ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -X; imu.accADC[PITCH]  = -Y; imu.accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] =  Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}
  //#define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  X; imu.magADC[PITCH]  =  Y; imu.magADC[YAW]  = -Z;} // normal Pro3 MAG chip orientation
  #define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  Y; imu.magADC[PITCH]  = -X; imu.magADC[YAW]  = -Z;} // rotated MAG chip for Pro3 Mini board
  #define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050
  #undef INTERNAL_I2C_PULLUPS
#endif
The change is in bold on the "define MAG_ORIENTATION" line.

Note that if you plan to use an external MAG on the GPS, stick to the changes in post #3 and treat it like a Pro3 board.
--------------------------------------------------------------------------------------------------------
Greg Covey is offline Find More Posts by Greg Covey
Last edited by Greg Covey; May 11, 2014 at 07:09 AM.
Reply With Quote
Old Apr 16, 2013, 05:14 PM
Registered User
Clearwater, FLorida !
Joined Sep 2009
2,270 Posts
I hope this board will take some of the fear out of MWC, and get more people in the air faster and at a great price.

The Mega Ez3 has simple to use connection cables for plug and play GPS, Bluetooth,LED RING, OLED, Rx,and motors esc. but has the flexibility to be easily installed, or use more the one system.

For the Rx connection. you have the the Ez connection cable. Direct Spectrum satellite connection, S.bus, and PPM sum headers.
witespy is offline Find More Posts by witespy
Last edited by witespy; Apr 16, 2013 at 06:20 PM.
Reply With Quote
Old Apr 16, 2013, 07:25 PM
DOLLA DOLLA BILL YALL
quad007's Avatar
United States, FL, Orlando
Joined Oct 2012
880 Posts
at what point will these 8 bit cpus be ancient enough?
quad007 is offline Find More Posts by quad007
Reply With Quote
Old Apr 16, 2013, 11:27 PM
we dont NEED roads!
AcroFPV's Avatar
United States, CA, Sacramento
Joined Aug 2012
3,321 Posts
Of course I see this, only hours after spending all my money on an APM 2.5

This board looks awesome.
AcroFPV is online now Find More Posts by AcroFPV
Reply With Quote
Old Apr 17, 2013, 04:11 AM
Registered User
Joined Jun 2006
1,880 Posts
very good!
it s a good new to see a real improvement about our fc for multiwii
the only thing that you should consider,is to put compass on the gps module and not on the board!!
we will have better results with gps features...if it will be the case,you board will be perfect and many people will not have problem with their compass
titeuf007 is offline Find More Posts by titeuf007
Last edited by titeuf007; Apr 17, 2013 at 04:41 AM.
Reply With Quote
Old Apr 17, 2013, 05:57 AM
Registered User
United States, NC, Wallburg
Joined Dec 2011
89 Posts
Release Date? Never mind must have populated over night. Great Price BTW!
HeliCopCR1 is offline Find More Posts by HeliCopCR1
Last edited by HeliCopCR1; Apr 17, 2013 at 06:08 AM.
Reply With Quote
Old Apr 17, 2013, 06:40 AM
Registered User
cruiser73's Avatar
Singapore, Singapore
Joined Apr 2012
1,384 Posts
Hi everyone. A newbie question. Want to get a FC for my next F450 build. Am enjoying my Flip RTF and an Ecks frame Kk2 acro quad. What would the Mega Pro 3.0 offer that the Flip FC with GPS pod doesn't?
cruiser73 is offline Find More Posts by cruiser73
Reply With Quote
Old Apr 17, 2013, 06:48 AM
Registered User
Joined Jun 2006
1,880 Posts
Quote:
Originally Posted by cruiser73 View Post
Hi everyone. A newbie question. Want to get a FC for my next F450 build. Am enjoying my Flip RTF and an Ecks frame Kk2 acro quad. What would the Mega Pro 3.0 offer that the Flip FC with GPS pod doesn't?
you will have more input/output....
now for the price(if it s already the same price for the v3 than v2) you should go for the v3
for me the spektrum port is a GREAT thing and i am very happy to see it
only compass on the baord is not good in my point of view...this board is almost perfect
if the price is still the same(or a bit more),crius aio pro will have problem
titeuf007 is offline Find More Posts by titeuf007
Reply With Quote
Old Apr 17, 2013, 07:04 AM
Registered User
Rochester, NY, USA
Joined Aug 2000
7,796 Posts
quad007,

Remember this is a "middle ground" flight controller. You have other options if you want more processing power. Wait until you see the price!

titeuf007,

I agree that I would love to see the compass on the GPS board like the DJI products. Sometimes it is difficult to get the board sufficiently high to avoid the magnetic fields of the MRC.

HeliCopCR1,

The boards are in stock so you can order them here.
Greg Covey is offline Find More Posts by Greg Covey
Reply With Quote
Old Apr 17, 2013, 07:47 AM
Registered User
Rochester, NY, USA
Joined Aug 2000
7,796 Posts
cruiser73,

The Pro 3 board has a MS5611 Barometer, HMC5883L Magnetometer, and a servo output for camera pitch and roll control regardless of motor count.

As titeuf007 mentioned, you have much more I/O that you can interface with all at once without limiting your options. The ATmega328 is replaced by the Atmega2560 which has much more memory so you run MPNG, if desired.
Greg Covey is offline Find More Posts by Greg Covey
Reply With Quote
Old Apr 17, 2013, 07:52 AM
Registered User
cruiser73's Avatar
Singapore, Singapore
Joined Apr 2012
1,384 Posts
Quote:
Originally Posted by titeuf007 View Post
you will have more input/output....
now for the price(if it s already the same price for the v3 than v2) you should go for the v3
for me the spektrum port is a GREAT thing and i am very happy to see it
only compass on the baord is not good in my point of view...this board is almost perfect
if the price is still the same(or a bit more),crius aio pro will have problem
Thanks Titeuf. The price on the website is $50+$30 for the GPS. This would be a good FC for practising AP with the GPS option, I think😊
cruiser73 is offline Find More Posts by cruiser73
Reply With Quote
Old Apr 17, 2013, 07:57 AM
Registered User
cruiser73's Avatar
Singapore, Singapore
Joined Apr 2012
1,384 Posts
Quote:
Originally Posted by Greg Covey View Post
cruiser73,

The Pro 3 board has a MS5611 Barometer, HMC5883L Magnetometer, and a servo output for camera pitch and roll control regardless of motor count.

As titeuf007 mentioned, you have much more I/O that you can interface with all at once without limiting your options. The ATmega328 is replaced by the Atmega2560 which has much more memory so you run MPNG, if desired.
Cheers Greg. Will probably go for this FC with GPS instead of the Flip with GPS and CC3D (the two FCs I had short listed).
cruiser73 is offline Find More Posts by cruiser73
Reply With Quote
Old Apr 17, 2013, 09:08 AM
Too Many Thread Subscriptions
TheFernMan's Avatar
United States, FL, Miami
Joined Jul 2012
2,083 Posts
About time! its been awhile lol

Quote:
Originally Posted by witespy View Post
thanks for the kind words. I have your name on one of these as soon as I get them.

MWC PRON, but still needs more time....

mega 3.0 --- A0 to A5 - no drooling on the keyboard. GO FLY !!!!

TheFernMan is online now Find More Posts by TheFernMan
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Witespy Pro2 & Pro3 Flight Controllers for MegaPirate Next Generation (MPNG) Greg Covey Multirotor Electronics 339 Aug 11, 2014 02:44 PM
For Sale MultiWii PRO 2.0 flight controller w/gps. mando608 Aircraft - Electric - Multirotor (FS/W) 3 Feb 27, 2014 09:48 AM
Discussion sk-450 + MultiWii PRO 2.0 Flight Controller wont get off ground any ideas ? smz Multirotor Talk 17 Jan 16, 2014 05:21 AM
Sold MultiWii PRO 2.0 Flight Controller w/ GPS Option xhover Aircraft - Electric - Multirotor (FS/W) 1 Jan 21, 2013 03:24 PM
Discussion Witespy MWC Pro v2.0 HeliCopCR1 Multirotor Electronics 11 Jan 06, 2013 05:09 PM