SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Oct 15, 2011, 05:35 AM
Registered User
mgros's Avatar
España, Aragón, Zaragoza
Joined Dec 2006
184 Posts
Quote:
Originally Posted by kinderkram View Post
Enjoyed it!
Nice mini you have there, Mariano.

You know- I never was a friend of those flying disco balls.
But if they could be taken for something useful (other than orientation and night flights), i.e. to display flight and failsafe status - I'm in.

So ... where's the code and the connection diagram?
Quote:
Originally Posted by helicoblast View Post
Nice vid, Mariano!
I'm interested by the same functions as Norbert, so I'm also waiting on your code and documentation! Thanks for sharing!

Bastien
Here is the code. Tested in MultiWii 1.8Patch2
I know that is possible to optimize and integrate the code into MultiWii but I have prepared a version with minimums modifications to MultiWii code.
It’s only necessary add the LED.pde file to the directory where you have the multiwii code and do 4 small changes in MultiWii_1_8_patch2.pde file

Change 1 before:
Code:
static float    EstVelocity = 0.0f;
static float    EstAlt = 0.0f;

//for log
static uint16_t cycleTimeMax = 0;       // highest ever cycle timen
static uint16_t cycleTimeMin = 65535;   // lowest ever cycle timen
Change 1 after:
Code:
static float    EstVelocity = 0.0f;
static float    EstAlt = 0.0f;
static uint8_t buzzerFreq; // LED

//for log
static uint16_t cycleTimeMax = 0;       // highest ever cycle timen
static uint16_t cycleTimeMin = 65535;   // lowest ever cycle timen
Change 2 before:
Code:
  static uint8_t  buzzerState = 0;
  static uint32_t vbatRaw = 0;       //used for smoothing voltage reading
  static uint8_t buzzerFreq;         //delay between buzzer ring  //LED
  uint8_t axis;
  uint8_t prop1,prop2;
Change 2 after:
Code:
  static uint8_t  buzzerState = 0;
  static uint32_t vbatRaw = 0;       //used for smoothing voltage reading
//  static uint8_t buzzerFreq;         //delay between buzzer ring  //LED
  uint8_t axis;
  uint8_t prop1,prop2;
Change 3 before:
Code:
  #if defined(POWERMETER)
    for(uint8_t i=0;i<=PMOTOR_SUM;i++)
      pMeter[i]=0;
  #endif
}

// ******** Main Loop *********
void loop () {
Change 3 after:
Code:
  #if defined(POWERMETER)
    for(uint8_t i=0;i<=PMOTOR_SUM;i++)
      pMeter[i]=0;
  #endif
  sq_led_init(); //LED  
}

// ******** Main Loop *********
void loop () {
Change 4 before:
Code:
  if (currentTime > (rcTime + 20000) ) { // 50Hz
    rcTime = currentTime; 
    computeRC();
    // Failsafe routine - added by MIS
    #if defined(FAILSAFE)
Change 4 after:
Code:
  if (currentTime > (rcTime + 20000) ) { // 50Hz
    rcTime = currentTime; 
    sq_led_heartbeat(); //LED
    computeRC();
    // Failsafe routine - added by MIS
    #if defined(FAILSAFE)
I will add both files (LED.pde and MultiWii_1_8_patch2.pde)



There are 5 different LED sequences:
• ACRO
• STABLE
• BATTERY ALARM 1
• BATTERY ALARM 2
• BATTERY ALARM 3
Once a battery alarm start can’t be used Acro and stable patterns. You can see some small erratic modes given that the transitions between battery levels have some hysteresis (rapid changes between levels in the limit)

The patterns can be defined in LED.pde file (see comments inside the file)

Connection diagram
You can use any available PIN that it’s not used by MultiWii
In Flyduino you can use A1, A2, A3 (A4, A5 it’s not possible to use see ATMega 1280, 2560 documentation, page 89 (Idont know how disable JTAG) 4, 9, 10, 11.
In Mega or Seeduino Mega you can use lots of PINs.

You can connect directly a LED (limit the current to 15mA) or use a ULN2803A to draw more Amp.
Pin usage definition in LED.pde.

Let me know if you need any help please
mgros is offline Find More Posts by mgros
Last edited by mgros; Oct 15, 2011 at 07:04 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 15, 2011, 06:53 AM
Registered User
Winterswijk, Netherlands
Joined Jun 2007
136 Posts
Hi Mariano,

Could you make a small sketch, on how to use that ULN2803A ?

I googles the datasheet http://www.ti.com/lit/ds/symlink/uln2803a.pdf, but it shows no Vcc in (only 8x in 1B-8B, 8x out 1C-8C, a common out COM, and a GND)... So where does that get the power from, to drive the outputs ?
At the moment, I can only use a ordinary led, but that is very difficult to see, and I really like your solution.
I'll try to combine yours with Hamburgers code for the powermeter (already in the main code).

A small (handdrawn) sketch, so us electronic noobs can understand, would be really helpfull
Or perhaps, do you have a link for a complete LED driver board ?

Thanks a lot !
Wilco



Quote:
Originally Posted by mgros View Post
Here is the code. Tested in MultiWii 1.8Patch2
I know that is possible to optimize and integrate the code into MultiWii but I have prepared a version with minimums modifications to MultiWii code.
It’s only necessary add the LED.pde file to the directory where you have the multiwii code and do 4 small changes in MultiWii_1_8_patch2.pde file

.....

Let me know if you need any help please
wilco1967 is online now Find More Posts by wilco1967
Reply With Quote
Old Oct 15, 2011, 07:09 AM
Registered User
mgros's Avatar
España, Aragón, Zaragoza
Joined Dec 2006
184 Posts
Quote:
Originally Posted by wilco1967 View Post
Hi Mariano,

Could you make a small sketch, on how to use that ULN2803A ?

I googles the datasheet http://www.ti.com/lit/ds/symlink/uln2803a.pdf, but it shows no Vcc in (only 8x in 1B-8B, 8x out 1C-8C, a common out COM, and a GND)... So where does that get the power from, to drive the outputs ?
At the moment, I can only use a ordinary led, but that is very difficult to see, and I really like your solution.
I'll try to combine yours with Hamburgers code for the powermeter (already in the main code).

A small (handdrawn) sketch, so us electronic noobs can understand, would be really helpfull
Or perhaps, do you have a link for a complete LED driver board ?

Thanks a lot !
Wilco
Try to use this guide it's easy to understand
http://oomlout.com/8TRA/8TRA-Guide.pdf
mgros is offline Find More Posts by mgros
Reply With Quote
Old Oct 15, 2011, 07:12 AM
Registered User
Winterswijk, Netherlands
Joined Jun 2007
136 Posts
Quote:
Originally Posted by mgros View Post
Try to use this guide it's easy to understand
http://oomlout.com/8TRA/8TRA-Guide.pdf
Aha !.... so the comm is the power input... I thought it was a combined output to raise the current.....

Thanks a lot.... Now it is clear
wilco1967 is online now Find More Posts by wilco1967
Reply With Quote
Old Oct 15, 2011, 10:05 AM
OS Sponsor
kinderkram's Avatar
Germany, NRW, Dusseldorf
Joined Jun 2010
5,388 Posts
Airborne!!!

My Spider made its maiden flight today.
Will enter a bigger space than our garden to give it a go and see how it performs.
Loaded MW1.8p2 code and flew with stock settings.
What I can say so far is that it performs extremly well in fast forward flights.

Of course it uses Paul's Flyduino Mega v2 and Fabio/Jussi's FreeIMU with BMP085.



One thing that got me troubled is the fact that it always nicks a bit forward when attending throttle fast from a hovering position.
Is that normal or is it due to my setup?
kinderkram is offline Find More Posts by kinderkram
RCG Plus Member
Reply With Quote
Old Oct 15, 2011, 12:16 PM
Registered User
mgros's Avatar
España, Aragón, Zaragoza
Joined Dec 2006
184 Posts
Quote:
Originally Posted by kinderkram View Post
My Spider made its maiden flight today.
Will enter a bigger space than our garden to give it a go and see how it performs.
Loaded MW1.8p2 code and flew with stock settings.
What I can say so far is that it performs extremly well in fast forward flights.

Of course it uses Paul's Flyduino Mega v2 and Fabio/Jussi's FreeIMU with BMP085.



One thing that got me troubled is the fact that it always nicks a bit forward when attending throttle fast from a hovering position.
Is that normal or is it due to my setup?
Nice Bird!!!
mgros is offline Find More Posts by mgros
Reply With Quote
Old Oct 15, 2011, 03:10 PM
Registered User
jevermeister's Avatar
Deutschland, SH, Kiel
Joined Jul 2011
509 Posts
Quote:
Originally Posted by kinderkram View Post
My Spider made its maiden flight today.
Will enter a bigger space than our garden to give it a go and see how it performs.
Loaded MW1.8p2 code and flew with stock settings.
What I can say so far is that it performs extremly well in fast forward flights.

Of course it uses Paul's Flyduino Mega v2 and Fabio/Jussi's FreeIMU with BMP085.



One thing that got me troubled is the fact that it always nicks a bit forward when attending throttle fast from a hovering position.
Is that normal or is it due to my setup?
Very cool!!!

Do want!

Nils
jevermeister is offline Find More Posts by jevermeister
Reply With Quote
Old Oct 15, 2011, 05:38 PM
Registered User
Geneva, Switzerland
Joined Jan 2009
807 Posts
Quote:
Originally Posted by mgros View Post
Here is the code. Tested in MultiWii 1.8Patch2

Let me know if you need any help please
Thanks Mariano, I'll test it as soon as I've some time to.

Quote:
Originally Posted by kinderkram View Post
My Spider made its maiden flight today.

One thing that got me troubled is the fact that it always nicks a bit forward when attending throttle fast from a hovering position.
Is that normal or is it due to my setup?
Nice build, Norbert, as ever!

Mine is acting similar, but I'm not sure we can say that's normal, as this is only two experiences, maybe others Spider owners will say something different...
helicoblast is offline Find More Posts by helicoblast
Reply With Quote
Old Oct 15, 2011, 07:32 PM
OS Sponsor
kinderkram's Avatar
Germany, NRW, Dusseldorf
Joined Jun 2010
5,388 Posts
Thx, guys. It was fun to fly.

@ Mariano: it's rather an angry insect than a bird.

@ Bastien: I think it's just a matter of getting used to the dynamics of this frame. I tried to eliminate the forward nick by playing with the lipo as a weight and used heavy trimming.
But it either started off the ground backwards and went rather straight up when attending throttle or it starts off straight and tends to lean forward when pumping it up.

My conclusion so far: it's more a frame for sportive & speedy forward flying than hovering and slowly flying around. I can imaging that you can race with it in FPV flights.
kinderkram is offline Find More Posts by kinderkram
RCG Plus Member
Reply With Quote
Old Oct 15, 2011, 08:34 PM
Registered User
jonnyc67's Avatar
Joined Jan 2008
235 Posts
It will tend to pitch forward under heavy acceleration - more air resistance at the front of the frame compared to the rear, especially as it's basically a flat plate I'm betting a nice sliippery canopy over the frame would cut this tendency a fair bit.
jonnyc67 is offline Find More Posts by jonnyc67
Reply With Quote
Old Oct 16, 2011, 04:10 AM
OS Sponsor
kinderkram's Avatar
Germany, NRW, Dusseldorf
Joined Jun 2010
5,388 Posts
Quote:
Originally Posted by jonnyc67 View Post
It will tend to pitch forward under heavy acceleration - more air resistance at the front of the frame compared to the rear, especially as it's basically a flat plate I'm betting a nice sliippery canopy over the frame would cut this tendency a fair bit.
Yah, that might be the reason. Makes perfect sense - thank you.
kinderkram is offline Find More Posts by kinderkram
RCG Plus Member
Reply With Quote
Old Oct 16, 2011, 07:20 AM
Registered User
Deutschland, Schleswig-Holstein, Kiel
Joined Jan 2011
431 Posts
Quote:
Originally Posted by jonnyc67 View Post
It will tend to pitch forward under heavy acceleration - more air resistance at the front of the frame compared to the rear, especially as it's basically a flat plate I'm betting a nice sliippery canopy over the frame would cut this tendency a fair bit.
shouldnt the gyro/electronics balance that out?
otherwise my Y4 with almost double-thrust rear should do the same...but it doesnt.


my new spider with 1.8patch2 has the same issue.

will have to test with 1.6 or 1.7, as i didnt notice that with my old flyduspider.
only difference were selfmade arms (rear ~1cm shorter due wrong measuring/cutting ) + older software version.
alteskind is offline Find More Posts by alteskind
Last edited by alteskind; Oct 16, 2011 at 07:27 AM.
Reply With Quote
Old Oct 16, 2011, 09:10 AM
Registered User
jonnyc67's Avatar
Joined Jan 2008
235 Posts
I'm sure the gyro's/stabilisation do help to counter it, but it's a fairly well known phenomenon. UH-1 Hueys used to dive into the ground if they were rotated too far forward on cyclic in forward flight just after takeoff due to the same basic problem - big flat cabin top in front of the main rotor/centre of effort. Even a pilot pulling back on the cyclic couldn't recover without having room to dive for more airspeed (or so I've been told)... If you didn't experience it on your old 'spider maybe you weren't climbing fast enough
jonnyc67 is offline Find More Posts by jonnyc67
Reply With Quote
Old Oct 16, 2011, 05:11 PM
Registered User
Joined Apr 2009
25 Posts
I would greatly appreciate anyone helping me out as I am very frustrated, but I know I have to be so close to eveything just working great. I have read the wiki and about 100 other build logs and troubleshooting pages to no avail but I am confident that someone here can offer me the bit of info I must be overlooking so here goes:

I have a flyduspider frame (irrelevant, but cool nonetheless) and a Flyduino v2.1 FC with Flydusense 1.1 (the square plate) but I am stuck dead in the water as I can't tell what is going on with it; is it bad or did I mess up the firmware on it by uploading he incorrect data to it? When I connect the FTDI cable to the board (with or without the flydusense connected, the power LED comes on solid and stays that way, while th LED next to the FTDI connection pins briefly flashes a couple of times and hen stays off. This is about all I can get it to do. I then edited he config.h file from the bunch of files that get loaded by the 1.8rev2 sketch that arduino 022 loads with the main multiwii1.8rev2.pde file that I opened to reflect the configuration that is present (I comment out th promini and uncomment the mega portion, and change the hexaX frame) and verify the sketch for board type Mega 2560. The code compiles without error then on the arduino IDE it reports that it is "uploading to board" but it never seems to finish. Then whenever (and I have tried this process about 50 times!) I load up the MultiWii1.8conf.exe and slect my com port to match, give it a couple of seconds, the click on start, nothing happens. If I try to click on read in the top panel here it shows the pid tuning settings, the curve changes from the initial linear diagonal default graph to a blank graph and that's basically where I 'm at. This is particularly frustrating as I haf recently graduated college with a degree in computer engineering (CE). Another mystery I have yet to figure out is how I can tell if the sensor board I have soldered with, for the time being a genuine WMP with a BMA020 on the flydusense 1.1 is even operating at all as I do not see any status LEDs when connect it to the Flyduino as it is done on page 1 of this thread.

Please help me!

Thanks in advance -- Jonathan
jrlederer is offline Find More Posts by jrlederer
Reply With Quote
Old Oct 16, 2011, 05:53 PM
Registered User
Deutschland, Schleswig-Holstein, Kiel
Joined Jan 2011
431 Posts
Quote:
Originally Posted by jrlederer View Post
I would greatly appreciate anyone helping me out as I am very frustrated, but I know I have to be so close to eveything just working great. I have read the wiki and about 100 other build logs and troubleshooting pages to no avail but I am confident that someone here can offer me the bit of info I must be overlooking so here goes:

I have a flyduspider frame (irrelevant, but cool nonetheless) and a Flyduino v2.1 FC with Flydusense 1.1 (the square plate) but I am stuck dead in the water as I can't tell what is going on with it; is it bad or did I mess up the firmware on it by uploading he incorrect data to it? When I connect the FTDI cable to the board (with or without the flydusense connected, the power LED comes on solid and stays that way, while th LED next to the FTDI connection pins briefly flashes a couple of times and hen stays off. This is about all I can get it to do. I then edited he config.h file from the bunch of files that get loaded by the 1.8rev2 sketch that arduino 022 loads with the main multiwii1.8rev2.pde file that I opened to reflect the configuration that is present (I comment out th promini and uncomment the mega portion, and change the hexaX frame) and verify the sketch for board type Mega 2560. The code compiles without error then on the arduino IDE it reports that it is "uploading to board" but it never seems to finish. Then whenever (and I have tried this process about 50 times!) I load up the MultiWii1.8conf.exe and slect my com port to match, give it a couple of seconds, the click on start, nothing happens. If I try to click on read in the top panel here it shows the pid tuning settings, the curve changes from the initial linear diagonal default graph to a blank graph and that's basically where I 'm at. This is particularly frustrating as I haf recently graduated college with a degree in computer engineering (CE). Another mystery I have yet to figure out is how I can tell if the sensor board I have soldered with, for the time being a genuine WMP with a BMA020 on the flydusense 1.1 is even operating at all as I do not see any status LEDs when connect it to the Flyduino as it is done on page 1 of this thread.

Please help me!

Thanks in advance -- Jonathan
are just sensors connected to the flyduino, or are there already other parts connected, as Rx, battery or ESC?
alteskind is offline Find More Posts by alteskind
Last edited by alteskind; Oct 16, 2011 at 05:59 PM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Please let me introduce myself jimaquo Dock Talk 7 Oct 27, 2010 03:27 AM
Let me introduce the DEMON!!!! (Transparent covering and eliptical wing!!!) modest-master Sport Planes 7 Aug 26, 2002 12:46 AM
Let me introduce Angelis 280/400, Benjamin, Zombi (ARFs) modest-master Parkflyers 17 Mar 14, 2002 02:20 PM
Let me introduce the "NIKE" modest-master Electric Sailplanes 3 Mar 07, 2002 06:20 AM