## mMWC shield - 5 USD stabilizing system for airplane and delta wings - Page 8 - RC Groups
Thread Tools
Nov 29, 2012, 02:01 AM
Registered User
### PRICE DROP ####
price including worldwide shipping:
1 board: 5 USD
2 boards: 8 USD

each board comes with blue SMD-LED, Resistor and BT-FC-Adapter
###################
Sign up now
to remove ads between posts
Jan 25, 2013, 08:59 PM
Registered User
hello,

My mMWC in my flying wing and have a little problem.

I can't change the servo direction

I changed this line and compile/download and not see any change in the servo response, are the same directions.

#define SERVO_DIRECTION { -1, 1, 1, -1, 1, 1, 1, 1 }

I need invert the elevator.

that's what happens? maybe I have something wrong in the configuration?

thanks.
best regards.
Ariel
Jan 25, 2013, 11:45 PM
Registered User
hi!

when you say you want to invert elevator, do you expect the two delta mixed aileron servos (since on a wing usually you have two aileron-servos mixed for elev as well)
a) to move to the opposite direction when giving commands with your transmitter
b) to move to the opposite direction when reacting to the sensor measurments
c) both?

Actually, just swapping the servo-connections (i.e. servo from D11->D12, servo from D12->D11) should do the trick.
Other than that try to change the servo direction for the aileron servos:

Code:
//                                 AIL1  AIL2  RUDD  ELEV 
#define SERVO_DIRECTION  { -1,   1,   1,   -1,    1,    1,   1,   1 }
Code:
//                                 AIL1  AIL2  RUDD  ELEV 
#define SERVO_DIRECTION  { -1,   1,   -1,   1,    1,    1,   1,   1 }
let us know your findings...
christian
Last edited by kornetto; Jan 26, 2013 at 08:21 AM.
Jan 27, 2013, 08:44 AM
Registered User
Quote:
Originally Posted by kornetto
hi!

when you say you want to invert elevator, do you expect the two delta mixed aileron servos (since on a wing usually you have two aileron-servos mixed for elev as well)
a) to move to the opposite direction when giving commands with your transmitter
b) to move to the opposite direction when reacting to the sensor measurments
c) both?

Actually, just swapping the servo-connections (i.e. servo from D11->D12, servo from D12->D11) should do the trick.
Other than that try to change the servo direction for the aileron servos:

Code:
//                                 AIL1  AIL2  RUDD  ELEV 
#define SERVO_DIRECTION  { -1,   1,   1,   -1,    1,    1,   1,   1 }
Code:
//                                 AIL1  AIL2  RUDD  ELEV 
#define SERVO_DIRECTION  { -1,   1,   -1,   1,    1,    1,   1,   1 }
let us know your findings...
christian

thanks by your fast reply Christian

the option b)

i move the flying wing and the response are oposite to correct.

i change any 1 by -1 and not see any change in the response.

best regards.
Ariel
Jan 27, 2013, 10:40 AM
Registered User
please zip all your source-files to one ZIP-archive and upload it here. I can then check and compare with my code.

best regards,
christian
Jan 27, 2013, 11:31 AM
Registered User
Quote:
Originally Posted by kornetto
please zip all your source-files to one ZIP-archive and upload it here. I can then check and compare with my code.

best regards,
christian
thanks Christian

the complete source-file attached.

and another question,
What is the direction of flight of the mmWC?

best regards.
Ariel

MultiWii_2_1_no_invert
Jan 27, 2013, 12:50 PM
Registered User
what I can see from your code, you did not apply the changes in def.h as I have described in the How To:


==============================================
2.) ONLY FOR FLYING_WING: swap servos
ATTENTION: If you use AIRPLANE mode, ignore this step and jump over to step 3.
Multiwii for some reason uses per default in flying wing mode different pins than in airplane mode for controling the aileron servos. Since all these is only software, this can be simply changed in def.h.

In fact swap
SERVO_1_ ←→ SERVO_5_
and
SERVO_4_ ←→ SERVO_2_

in the pro mini section.


This means, the original part:

Code:
  #define SERVO_1_PINMODE            pinMode(A0,OUTPUT); // TILT_PITCH - WING left
  #define SERVO_1_PIN_HIGH           PORTC |= 1<<0;
  #define SERVO_1_PIN_LOW            PORTC &= ~(1<<0);
  #define SERVO_2_PINMODE            pinMode(A1,OUTPUT); // TILT_ROLL  - WING right
  #define SERVO_2_PIN_HIGH           PORTC |= 1<<1;
  #define SERVO_2_PIN_LOW            PORTC &= ~(1<<1);
  #define SERVO_3_PINMODE            pinMode(A2,OUTPUT); // CAM TRIG  - alt TILT_PITCH
  #define SERVO_3_PIN_HIGH           PORTC |= 1<<2;
  #define SERVO_3_PIN_LOW            PORTC &= ~(1<<2);
  #if !defined(MONGOOSE1_0)
    #define SERVO_4_PINMODE            pinMode(12,OUTPUT); // new       - alt TILT_ROLL
    #define SERVO_4_PIN_HIGH           PORTB |= 1<<4;
    #define SERVO_4_PIN_LOW            PORTB &= ~(1<<4);
  #endif
  #define SERVO_5_PINMODE            pinMode(11,OUTPUT); // BI LEFT
  #define SERVO_5_PIN_HIGH           PORTB |= 1<<3;
  #define SERVO_5_PIN_LOW            PORTB &= ~(1<<3);
will then look like:

Code:
  #define SERVO_5_PINMODE            pinMode(A0,OUTPUT); // TILT_PITCH - WING left
  #define SERVO_5_PIN_HIGH           PORTC |= 1<<0;
  #define SERVO_5_PIN_LOW            PORTC &= ~(1<<0);
  #define SERVO_4_PINMODE            pinMode(A1,OUTPUT); // TILT_ROLL  - WING right
  #define SERVO_4_PIN_HIGH           PORTC |= 1<<1;
  #define SERVO_4_PIN_LOW            PORTC &= ~(1<<1);
  #define SERVO_3_PINMODE            pinMode(A2,OUTPUT); // CAM TRIG  - alt TILT_PITCH
  #define SERVO_3_PIN_HIGH           PORTC |= 1<<2;
  #define SERVO_3_PIN_LOW            PORTC &= ~(1<<2);
  #if !defined(MONGOOSE1_0)
    #define SERVO_2_PINMODE            pinMode(12,OUTPUT); // new       - alt TILT_ROLL
    #define SERVO_2_PIN_HIGH           PORTB |= 1<<4;
    #define SERVO_2_PIN_LOW            PORTB &= ~(1<<4);
  #endif
  #define SERVO_1_PINMODE            pinMode(11,OUTPUT); // BI LEFT
  #define SERVO_1_PIN_HIGH           PORTB |= 1<<3;
  #define SERVO_1_PIN_LOW            PORTB &= ~(1<<3);
and mMWC will handle your wing's servos connected same way like airplane aileron-servos to D11/D12, but of course with delta mixing done by multiwii.

==========================================


concerning the direction of the mMWC:
It's actually not the mMWC, but the sensor board which defines the direction it should be used. There are 2 arrows shown on it. The Y arrow must point forward and the X arrow to the right.
see the attached picture...
Jan 27, 2013, 02:07 PM
Registered User
I did what had changed.

is this correct? extracted from my code:

#define SERVO_5_PINMODE pinMode(A0,OUTPUT); // TILT_PITCH - WING left
#define SERVO_5_PIN_HIGH PORTC |= 1<<0;
#define SERVO_5_PIN_LOW PORTC &= ~(1<<0);
#define SERVO_4_PINMODE pinMode(A1,OUTPUT); // TILT_ROLL - WING right
#define SERVO_4_PIN_HIGH PORTC |= 1<<1;
#define SERVO_4_PIN_LOW PORTC &= ~(1<<1);
#define SERVO_3_PINMODE pinMode(A2,OUTPUT); // CAM TRIG - alt TILT_PITCH
#define SERVO_3_PIN_HIGH PORTC |= 1<<2;
#define SERVO_3_PIN_LOW PORTC &= ~(1<<2);
#if !defined(MONGOOSE1_0)
#define SERVO_2_PINMODE pinMode(12,OUTPUT); // new - alt TILT_ROLL
#define SERVO_2_PIN_HIGH PORTB |= 1<<4;
#define SERVO_2_PIN_LOW PORTB &= ~(1<<4);
#endif
#define SERVO_1_PINMODE pinMode(11,OUTPUT); // BI LEFT
#define SERVO_1_PIN_HIGH PORTB |= 1<<3;
#define SERVO_1_PIN_LOW PORTB &= ~(1<<3);
#define SERVO_6_PINMODE pinMode(3,OUTPUT); // TRI REAR - BI RIGHT
#define SERVO_6_PIN_HIGH PORTD|= 1<<3;
#define SERVO_6_PIN_LOW PORTD &= ~(1<<3);
#define SERVO_7_PINMODE pinMode(10,OUTPUT); // new
#define SERVO_7_PIN_HIGH PORTB |= 1<<2;
#define SERVO_7_PIN_LOW PORTB &= ~(1<<2);
#define SERVO_8_PINMODE pinMode(9,OUTPUT); // new
#define SERVO_8_PIN_HIGH PORTB |= 1<<1;
#define SERVO_8_PIN_LOW PORTB &= ~(1<<1);
Jan 27, 2013, 02:21 PM
Registered User
Quote:
Originally Posted by kornetto
hi!

when you say you want to invert elevator, do you expect the two delta mixed aileron servos (since on a wing usually you have two aileron-servos mixed for elev as well)
a) to move to the opposite direction when giving commands with your transmitter
b) to move to the opposite direction when reacting to the sensor measurments
c) both?

Actually, just swapping the servo-connections (i.e. servo from D11->D12, servo from D12->D11) should do the trick.
Other than that try to change the servo direction for the aileron servos:

Code:
//                                 AIL1  AIL2  RUDD  ELEV 
#define SERVO_DIRECTION  { -1,   1,   1,   -1,    1,    1,   1,   1 }
Code:
//                                 AIL1  AIL2  RUDD  ELEV 
#define SERVO_DIRECTION  { -1,   1,   -1,   1,    1,    1,   1,   1 }
let us know your findings...
christian
but....
in How do document say:

// AIL1 AIL2 RUDD ELEV
#define SERVO_DIRECTION { -1, 1, 1, -1, 1, 1, 1, 1 }

what is the correct??
Jan 27, 2013, 04:37 PM
Registered User
hahaha, sorry. I was completely confused. seems I still suffer from my flue I had a couple of days ago...

forget about what I wrote in the last posting and just simply check config.h again and go a few lines up.

you will find a special "Flying Wing" section and right after the comment written there the first two lines are:

Code:
    #define PITCH_DIRECTION_L 1 // left servo - pitch orientation
    #define PITCH_DIRECTION_R -1  // right servo - pitch orientation (opposite sign to PITCH_DIRECTION_L, if servos are mounted in mirrored orientation)
and guess what they do...

Sorry for the confusion.

greetings from vienna,
Christian
Last edited by kornetto; Jan 27, 2013 at 04:46 PM.
Jan 29, 2013, 09:07 AM
Registered User
jajajaj

no problem.

now work fine !!

I am very happy with the mmWC, thanks for your help.

best regards
Jan 29, 2013, 09:11 AM
Registered User
glad to hear, it is working now for you
Mar 03, 2013, 12:20 PM
aka Nigel Uno
My new Stryker F27Q ParkZone FPV with mMWC with MultiWii 2.1

The MWii 2.1 mixer table has been rewrited by me (with Dynamic PID attenuation mod too)

https://www.rcgroups.com/forums/show...postcount=7233


Later the maiden flight video

Ciao
Mar 03, 2013, 01:15 PM
aka Nigel Uno
Maiden FPV flight (Stryker F27Q)

Striker F27Q Maiden flight (2 min 11 sec)


The mMWC needs some pid tuning but it's a good starting point

Ciao

Luca
Mar 25, 2013, 10:20 PM
Registered User
Do you still have boards available? I'm interested in a couple.


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Bob's Super Simple Shield - MWC board Qrome Multirotor Drone Talk 563 Dec 26, 2013 09:20 PM
Discussion Bob's Super Simple Shield - MWC bob4432 Multirotor Drone Talk 3 Aug 30, 2011 10:53 PM
Sold Paris MWC board Ready for flight w/Arduino Pro Mini 5/16mhz,Wii Motion+,Bosch BMA02 Z06 Tony Aircraft - Electric - Multirotor (FS/W) 16 May 27, 2011 09:56 AM