HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 09, 2012, 02:23 AM
Registered User
1-2-hak's Avatar
Joined Nov 2012
91 Posts
The ftdi is still a bit hit and miss after cutting the rx tx leads - time to get another board I think.

Some more findings from 2.8

Its a lot less aggressive in acceleration. When you do a quick power up it has a lot less go than 2.7 R4. Not sure why.
I have also tested Mission using CH 7 waypoints and that works OK.

So tested OK is
Stabilze
Acro
Position Hold
Alt Hold
Loiter
Auto

I have gone back to 2.7 now for fun flying as I think 2.8 needs some massaging. Maybe Sir Alex will address this when he gets some free time.

So I got all the LED leds working using the led.pde and CH8.

What I did was use this relay board as it makes life easy
http://www.jaycar.com.au/products_up...arge_16134.jpg

Rough image attached.

I powered RGB led strips that run at 12V from my 3s battery as source.

I have modified the led.pde to point to pins 32-35 for LED 1-4 in the script.

I have also started some mods to this script to replace copter_leds.pde. I am using the last pin to run navigation leds on the copter. When the motors are armed and gps is locked it flashes differently so I know the status.

Apart from my limitation of loading sketch up it all works well.
1-2-hak is offline Find More Posts by 1-2-hak
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 09, 2012, 04:00 AM
;-)fellow pacifist(-;
fpvme's Avatar
Australia, VIC, Balnarring
Joined Aug 2010
219 Posts
im not sure what to do here i had it working now all it dose is light up these 3 lights and the esc's beep like there is nothing connected to them. tried reflashing MPNG several times with no luck. heres a pic.

what should be done to get it working?
fpvme is offline Find More Posts by fpvme
Reply With Quote
Old Dec 09, 2012, 04:14 AM
Registered User
Germany, Berlin
Joined Feb 2008
84 Posts
Quote:
Originally Posted by mr_cat View Post
Its a lot less aggressive in acceleration. When you do a quick power up it has a lot less go than 2.7 R4. Not sure why.
.
.
I have gone back to 2.7 now for fun flying as I think 2.8 needs some massaging. Maybe Sir Alex will address this when he gets some free time.

Yes, less aggressive. So perfekt for FPV-Flying.

Havent tested it with FPV yet due to Snow and stormy weather here. But flying in my garden and indoor in a big hangar it seems to be perfect for FPV.

So please dont change, Sir Alex.

@mr_cat: For funflying and acrobatics you can use KK2.0...
critical_limit is offline Find More Posts by critical_limit
Reply With Quote
Old Dec 09, 2012, 04:36 AM
Registered User
1-2-hak's Avatar
Joined Nov 2012
91 Posts
Quote:
Originally Posted by critical_limit View Post

@mr_cat: For funflying and acrobatics you can use KK2.0...
Understand what you are saying but this indicates a bug in the pid loop. The 2.8 should be similar response but more stable with the new code.

What I am seeing is less responsiveness in acceleration - you can limit this out for fpv flying with your transmitter if needed then
1-2-hak is offline Find More Posts by 1-2-hak
Reply With Quote
Old Dec 09, 2012, 06:09 AM
Registered User
The Netherlands, FR, Harlingen
Joined Apr 2012
9 Posts
Quote:
Originally Posted by Andrew Radford View Post
When using the Nano do you need any other hardware to talk to the FrSKY receiver? I heard there is a need for a level converter or a MAX232 or a logic inverter or somehing. Or is it straight from Nano => Frsky.

Also did you double up on the telemetry port TX or did you attach to S0?

Thanks!
There is no additional hardware needed, the FrSky receiver expects 5V TTL signals, so the Nano can be connected directly.

The hardware serial port of the Nano (ftdi port or RX0/TX0 depending on board) connects to the S3 TX/RX telemetry port of the Crius board. I do not (yet) have anything else running on the S3 port, but a 3DR is on its way, so I think I will use S0 for 3DR.

Pins D5/D6 from the Nano connect to the hub-port of the FrSky receiver.
ThaLX is offline Find More Posts by ThaLX
Last edited by ThaLX; Dec 09, 2012 at 06:22 AM.
Reply With Quote
Old Dec 09, 2012, 06:12 AM
Registered User
almtmd's Avatar
Singapore
Joined Nov 2004
150 Posts
Where can I get the MP 2.8?
Can't find it here http://code.google.com/p/megapirateng/downloads/list
almtmd is offline Find More Posts by almtmd
Reply With Quote
Old Dec 09, 2012, 07:08 AM
Woof!
Denmark, Region Zealand, Roskilde
Joined Oct 2012
14 Posts
Quote:
Originally Posted by ThaLX View Post

For the people that want 2.8, you need an SVN client and type in the commandline
"svn checkout http://megapirateng.googlecode.com/svn/trunk/ megapirateng-read-only" to download the source.

But remember, it's experimental code at the moment, as it is not tested verry much.
You can search this thread - if you don't want to read it all..
Great_Dane is offline Find More Posts by Great_Dane
Reply With Quote
Old Dec 09, 2012, 08:22 AM
In progress...
Skewp's Avatar
Estonia, Tartu County, Tartu
Joined Jul 2012
212 Posts
Problem - cannot get the gimbal stabilization to work. It seems to me like there is no signal nor +5V in roll/pitch servo ports. I would also like to get the manual pitch/roll ports working.

I'm using MP 2.7 R4 and Crius AIO Pro board.
Skewp is online now Find More Posts by Skewp
Reply With Quote
Old Dec 09, 2012, 12:42 PM
Registered User
Sverige, Örebro Län, Hallsberg
Joined Oct 2011
126 Posts
A quick question:

How does this FC handle cold weather? Currently it is -12 degrees celsius here and I'd like to know if this board will work properly or if it is too cold.

The old KK boards I have been using prior to this board didn't like cold weater very much...

//KK
Kaptenklister is offline Find More Posts by Kaptenklister
Reply With Quote
Old Dec 09, 2012, 01:15 PM
In progress...
Skewp's Avatar
Estonia, Tartu County, Tartu
Joined Jul 2012
212 Posts
Quote:
Originally Posted by Kaptenklister View Post
A quick question:

How does this FC handle cold weather? Currently it is -12 degrees celsius here and I'd like to know if this board will work properly or if it is too cold.

The old KK boards I have been using prior to this board didn't like cold weater very much...

//KK
I've been flying with it in cold (up to -15) and haven't had any problems.
Skewp is online now Find More Posts by Skewp
Reply With Quote
Old Dec 09, 2012, 06:50 PM
Registered User
Joined Nov 2012
49 Posts
Quote:
Originally Posted by mr_cat View Post
So I got all the LED leds working using the led.pde and CH8.

I have modified the led.pde to point to pins 32-35 for LED 1-4 in the script.

I have also started some mods to this script to replace copter_leds.pde. I am using the last pin to run navigation leds on the copter. When the motors are armed and gps is locked it flashes differently so I know the status.

Apart from my limitation of loading sketch up it all works well.
sounds good, can you post your code?
I´d like to do something similar.
jimbobsi is offline Find More Posts by jimbobsi
Reply With Quote
Old Dec 10, 2012, 01:27 AM
Registered User
1-2-hak's Avatar
Joined Nov 2012
91 Posts
Sir Alex

- Just looking through the arducopter.pde and was thinking the following value seems high. Could this cause the reduction in response?

if ((timer - fast_loopTimer) >= 10000 && imu.new_data_available()) {

** Not to worry see you have reused the 2.7 loop **
1-2-hak is offline Find More Posts by 1-2-hak
Last edited by 1-2-hak; Dec 10, 2012 at 08:03 AM. Reason: reviewed it
Reply With Quote
Old Dec 10, 2012, 07:50 AM
Registered User
1-2-hak's Avatar
Joined Nov 2012
91 Posts
LEDS working

You can go here to see how they work

MegapirateNG 2.7/8 LED light mods (0 min 0 sec)


Heres the code

/*
Programmable LED sequencer for MegaPirate B8+ by Syberian

Mod using some code from leds.pde by 12-HAK 10/12/12
#########
- 4 programs selectable by RC channel
- each program may consist of up to 64 states
- up to 8 split LED channels
- automatic sequence restart
#########
Usage of sequencer:
Flip the Tx control switch on. The first program will be selected
Flip the switch off to dim the LEDs
Flip the switch off and on again in less than 1 second to change the program
#########

Programming instructions:
entry format (2 numbers) A,B,
A - timespan in 1/50 of one second
B - LED channels ON mask LED_1,CH,2...LED_8 delimited by | sign
if LEDs should be off, put LED_OFF instead
Last record should end by 0,LED_OFF, - this is mandatory!

*/

//#include <APM_RC.h>

#define LED_1 1
#define LED_2 2
#define LED_3 4
#define LED_4 8
#define LED_5 16
#define LED_6 32
#define LED_7 64
#define LED_8 128
#define LED_OFF 0


// Define Pin numbers for LEDs (unused LED channels should be commented
#define SQ_LED1 32 // A1
#define SQ_LED2 33 // A2
#define SQ_LED3 34 // A3
#define SQ_LED4 35 // A4
//#define SQ_LED1 51
//#define SQ_LED1 51
//#define SQ_LED1 51
//#define SQ_LED1 51

// Define RX channel to control
#define SQ_LED_CH 8 // ch7 is used for SIMPLE MODE selection


// LED program # 1
const byte led_seq1[]= // White
{ 10, LED_1 | LED_2 | LED_3,
0, LED_OFF,
};
// LED program # 2
const byte led_seq2[]= // White Blink
{ 20, LED_1 | LED_2 | LED_3,
10, LED_OFF,
0, LED_OFF,
};

// LED program # 3
const byte led_seq3[]= // Police
{ 2, LED_1,
2, LED_OFF,
2, LED_1,
10, LED_OFF,
2, LED_3,
2, LED_OFF,
2, LED_3,
10, LED_OFF,
0, LED_OFF,
};

// LED program # 4
const byte led_seq4[]= // Red
{ 1, LED_1,
0, LED_OFF,
};
// LED program # 5
const byte led_seq5[]= // Green
{ 1, LED_2,
0, LED_OFF,
};
// LED program # 6
const byte led_seq6[]= // Blue
{ 1, LED_3,
0, LED_OFF,
};

// LED program # 7
const byte led_seq7[]= // Red+Green
{ 1, LED_1 | LED_2,
0, LED_OFF,
};

// LED program # 8
const byte led_seq8[]= // Red+Blue
{ 1, LED_1 | LED_3,
0, LED_OFF,
};

// LED program # 9
const byte led_seq9[]= // Green+Blue
{ 1, LED_2 | LED_3,
0, LED_OFF,
};

// LED program # 10
const byte led_seq10[]= // cycle
{ 20, LED_1,
5, LED_OFF,
20, LED_2,
5, LED_OFF,
20, LED_3,
5, LED_OFF,
0, LED_OFF,
};

// LED program # 11
const byte led_seq11[]= // all the LEDs blinks at 1Hz
{ 10, LED_1|LED_2|LED_3|LED_5|LED_6|LED_7|LED_8,
10, LED_OFF,
0, LED_OFF,
};


long led_hb=0;
static byte sq_led_span=0, sq_led_ctr=0, sq_led_sqnum=0,sq_led_prognum=0, sq_led_state=0;
byte sq_led_seq[128];
int copter_leds_blink;
static void nav_leds_fast_blink(void) {
copter_leds_blink++; // this increments once every 1/10 second because it is in the 10hz loop
if ( copter_leds_blink < 15 ){ // when the counter reaches 3 (1/5 sec), then toggle the leds
digitalWrite(SQ_LED4,HIGH);
}else if (copter_leds_blink < 30){
digitalWrite(SQ_LED4,LOW);
}
else copter_leds_blink = 0; // start blink cycle again
}
static void nav_leds_medium_blink(void) {
copter_leds_blink++; // this increments once every 1/10 second because it is in the 10hz loop
if ( copter_leds_blink < 50 ){ // when the counter reaches 3 (1/5 sec), then toggle the leds
digitalWrite(SQ_LED4,HIGH);
}else if (copter_leds_blink < 65){
digitalWrite(SQ_LED4,LOW);
}
else copter_leds_blink = 0; // start blink cycle again
}
static void nav_leds_slow_blink(void) {
copter_leds_blink++; // this increments once every 1/10 second because it is in the 10hz loop
if ( copter_leds_blink < 100 ){ // when the counter reaches 3 (1/5 sec), then toggle the leds
digitalWrite(SQ_LED4,HIGH);
}else if (copter_leds_blink < 115){
digitalWrite(SQ_LED4,LOW);
}
else copter_leds_blink = 0; // start blink cycle again
}

void sq_led_init(void)
{
#ifdef SQ_LED1
pinMode(SQ_LED1,OUTPUT);
#endif
#ifdef SQ_LED2
pinMode(SQ_LED2,OUTPUT);
#endif
#ifdef SQ_LED3
pinMode(SQ_LED3,OUTPUT);
#endif
#ifdef SQ_LED4
pinMode(SQ_LED4,OUTPUT);
#endif
#ifdef SQ_LED5
pinMode(SQ_LED5,OUTPUT);
#endif
#ifdef SQ_LED6
pinMode(SQ_LED6,OUTPUT);
#endif
#ifdef SQ_LED7
pinMode(SQ_LED7,OUTPUT);
#endif
#ifdef SQ_LED8
pinMode(SQ_LED8,OUTPUT);
#endif
// load program0 into the buffer
for (sq_led_ctr=0;sq_led_ctr<sizeof(led_seq1);sq_led_c tr++) sq_led_seq[sq_led_ctr]=led_seq1[sq_led_ctr];
led_hb=0;
#if (SQ_LED_CH<6)
#error "LED seqiencer control should be assigned to ch6 and above!"
#endif
}


void sq_led_heartbeat(void) // 20Hz loop led sequencer
{ static long tmp=0,rc_ts=0;
static int tmp2=0,tmp01=0,tmp02=0;
static byte led_ena=1;

tmp=millis();

// sequencer
// mode selection and load the program

tmp2=APM_RC.InputCh(SQ_LED_CH-1); // read the RC value
if (tmp2>1500) tmp01=1; else tmp01=0;
if (tmp01!=tmp02) //only toggle states
{
if (tmp01==0) {rc_ts=tmp;led_ena=0;}
else { // enable indication or load a new program when off pulse shorter than 1 sec
led_ena=1;
if ((tmp-rc_ts)>1000) {sq_led_sqnum=0;}// just ON
else { //load a new sequence (4 programs)
sq_led_prognum++;
if (sq_led_prognum>11){
sq_led_prognum=0;
}
switch(sq_led_prognum)
{
case 0:for (tmp2=0;tmp2<sizeof(led_seq1);tmp2++) sq_led_seq[tmp2]=led_seq1[tmp2]; break;
case 1:for (tmp2=0;tmp2<sizeof(led_seq2);tmp2++) sq_led_seq[tmp2]=led_seq2[tmp2]; break;
case 2:for (tmp2=0;tmp2<sizeof(led_seq3);tmp2++) sq_led_seq[tmp2]=led_seq3[tmp2]; break;
case 3:for (tmp2=0;tmp2<sizeof(led_seq4);tmp2++) sq_led_seq[tmp2]=led_seq4[tmp2]; break;
case 4:for (tmp2=0;tmp2<sizeof(led_seq5);tmp2++) sq_led_seq[tmp2]=led_seq5[tmp2]; break;
case 5:for (tmp2=0;tmp2<sizeof(led_seq6);tmp2++) sq_led_seq[tmp2]=led_seq6[tmp2]; break;
case 6:for (tmp2=0;tmp2<sizeof(led_seq7);tmp2++) sq_led_seq[tmp2]=led_seq7[tmp2]; break;
case 7:for (tmp2=0;tmp2<sizeof(led_seq8);tmp2++) sq_led_seq[tmp2]=led_seq8[tmp2]; break;
case 8:for (tmp2=0;tmp2<sizeof(led_seq9);tmp2++) sq_led_seq[tmp2]=led_seq9[tmp2]; break;
case 9:for (tmp2=0;tmp2<sizeof(led_seq10);tmp2++) sq_led_seq[tmp2]=led_seq10[tmp2]; break;
case 10:for (tmp2=0;tmp2<sizeof(led_seq11);tmp2++) sq_led_seq[tmp2]=led_seq11[tmp2]; break;


}
}




}
}
tmp02=tmp01;


// end mode selection


sq_led_ctr++;
if (sq_led_ctr>sq_led_span) // load next seq step
{sq_led_ctr=0;
sq_led_sqnum+=2;
if (sq_led_seq[sq_led_sqnum]==0) sq_led_sqnum=0; // reset at the end of program
sq_led_span=sq_led_seq[sq_led_sqnum];
if (led_ena) sq_led_state=sq_led_seq[sq_led_sqnum+1]; else sq_led_state=0;
}

// GPS LED on if we have a fix or Blink GPS LED if we are receiving data
// ---------------------------------------------------------------------
switch (g_gps->status()){

case(2):
if(home_is_set) {
if (motors.armed() == true) {

digitalWrite(SQ_LED4,HIGH);
} //Turn GPS LEDs on when gps has valid fix AND home is set
else {
nav_leds_medium_blink();
}
}
break;

case(1):
if (motors.armed() == true) {

nav_leds_slow_blink(); //if GPS has valid reads, but no fix, blink GPS LED slow
}
else
{
nav_leds_fast_blink();
}

break;

default:
nav_leds_fast_blink();
//if no valid GPS signal, turn GPS LED off
break;
}
// update LEDs
#ifdef SQ_LED1
if (sq_led_state & 1) digitalWrite(SQ_LED1,HIGH); else digitalWrite(SQ_LED1,LOW);
#endif
#ifdef SQ_LED2
if (sq_led_state & 2) digitalWrite(SQ_LED2,HIGH); else digitalWrite(SQ_LED2,LOW);
#endif
#ifdef SQ_LED3
if (sq_led_state & 4) digitalWrite(SQ_LED3,HIGH); else digitalWrite(SQ_LED3,LOW);
#endif
//#ifdef SQ_LED4 Disabled to stop led 4 being switched by sequencer
//if (sq_led_state & 8) digitalWrite(SQ_LED4,HIGH); else digitalWrite(SQ_LED4,LOW);
//#endif
#ifdef SQ_LED5
if (sq_led_state & 16) digitalWrite(SQ_LED5,HIGH); else digitalWrite(SQ_LED5,LOW);
#endif
#ifdef SQ_LED6
if (sq_led_state & 32) digitalWrite(SQ_LED6,HIGH); else digitalWrite(SQ_LED6,LOW);
#endif
#ifdef SQ_LED7
if (sq_led_state & 64) digitalWrite(SQ_LED7,HIGH); else digitalWrite(SQ_LED7,LOW);
#endif
#ifdef SQ_LED8
if (sq_led_state & 128) digitalWrite(SQ_LED8,HIGH); else digitalWrite(SQ_LED8,LOW);
#endif
}
1-2-hak is offline Find More Posts by 1-2-hak
Reply With Quote
Old Dec 10, 2012, 08:15 AM
Sweden
tvbcom's Avatar
Sweden, Stockholm County, Djurö
Joined Apr 2012
139 Posts
Quote:
Originally Posted by mr_cat View Post
You can go here to see how they work

}
Nice feature, as a nob in programming, where do you put this code?
/Goran
tvbcom is offline Find More Posts by tvbcom
Reply With Quote
Old Dec 10, 2012, 08:48 AM
Registered User
1-2-hak's Avatar
Joined Nov 2012
91 Posts
Quote:
Originally Posted by tvbcom View Post
Nice feature, as a nob in programming, where do you put this code?
/Goran
This will replace the led.pde (led.ino)

make sure this is defined in apm_config
#define LED_SEQUENCER ENABLED // Old Oleg's LED Sequencer, see led.pde for more info
1-2-hak is offline Find More Posts by 1-2-hak
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion New updated Crius Multiwii SE flight controller SGsoar Multirotor Electronics 72 May 15, 2013 08:36 PM
Mini-HowTo Arduino and HobbyKing Multi-Rotor Control Board V3.0 or KKmulticontroller v5.5 pprioverde Multirotor Talk 29 Nov 21, 2012 09:58 PM
Discussion Jim, any plans for more multi rotor flight controller? chris24g Xtreme Power Systems 12 Jun 25, 2012 08:11 PM
Sold One New, one used ArduPilot 2560 APM1.0 Flight Controlls/autopilots wingspinner FPV Equipment (FS/W) 3 May 28, 2012 12:55 AM
Question Quad Build Using HobbyKing Multi-Rotor Control Board V3.0 (Atmega328 PA) SJackson Multirotor Talk 27 Apr 30, 2012 08:51 PM