SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Aug 22, 2011, 09:48 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Discussion
A Free firmware project for the GA250 Gyro

Hi,

I'm working (just for fun!) in an alternative firmware for this gyro because I'm not happy with the original one.
If you are interested in to try it, to play with the PID parameters and help to do improvements you can find here http://freecode4ga250.blogspot.com/ a good starting point!

We can discuss details in this thread.

Have fun!
cruzado is offline Find More Posts by cruzado
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 22, 2011, 10:06 AM
No Longer Active
pitchp's Avatar
Australia, VIC, Melbourne
Joined Aug 2010
6,627 Posts
Subscribed!
pitchp is offline Find More Posts by pitchp
Reply With Quote
Old Aug 22, 2011, 10:17 AM
Full Scale Piper Cub Driver
Piper J3's Avatar
Hinckley, Ohio
Joined Nov 2008
2,553 Posts
Quote:
Originally Posted by pitchp View Post
Subscribed!
Count me "in" too. I've got six GA250's including three from the first release. Can I update the software in the early ones to fix power-up problem?
Piper J3 is online now Find More Posts by Piper J3
Reply With Quote
Old Aug 22, 2011, 11:10 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by Piper J3 View Post
Count me "in" too. I've got six GA250's including three from the first release. Can I update the software in the early ones to fix power-up problem?
This sw is not perfect yet, so maybe you wont like it, but yes I think there is no power-up problem. The application only starts 4 seconds after gyro is powered.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 22, 2011, 11:23 AM
|Taranis|>|All other Tx's|
scott page's Avatar
United States, WA, Richland
Joined May 2009
6,779 Posts
I'm all in. I think it would be useful to see specifically targeted programs -- such as a rate mode only for fixed wing Aerial photography -- or whatever others can think if. I'm definitely very interested in this project. I have 9 GA-250 and anticipate acquiring more. I expect that this gyro could be to the gyro world what the 9x radio is to transmitters.
scott page is offline Find More Posts by scott page
Reply With Quote
Old Aug 22, 2011, 05:46 PM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
Quote:
Originally Posted by cruzado View Post
Ok, thank you! The GA250 has an atmega8 running at 8MHz. The ATTiny43U has a 8MHz internal oscillator. Both have 10bits ADC. These gyros are very equivalent. The big difference is the firmware.

I'm developing my own firmware for the GA250. It's quite difficult to adust the PID parameters so I'm thinking to make public the code so someone else can help me to have a decent firmware for all of us.
Quote:
Originally Posted by beenflying View Post
cruzado, thanks for all of your work on this. Can i suggest you start a new thread about this, so everything is kept in one place. Feel free to post back here with a link to the new thread.

I've looked at you blog and firmware. I think I can help with this, especially creating a single board USB to gyro gain interface, which also supplies the power to the gyro. Possibly with the firmware as well. We need to give more parameters to the user so they can play with tuning the PID themselves. Don't worry about speed and delay at this time. Delay should not be needed if the PID is tuned correctly.

I currently see loading the bootloader as the biggest stumbling block for anyone to start using this new firmware. And since the board only has pads, an adapter/connector is difficult to make.
Quote:
Originally Posted by cruzado View Post
Thanks. I believe there is no need to change PID parameters once it's tuned correctly, just the gain on the Tx. I was planning also to make an external device to program all configuration parameters on the field and to update the application. I bought an arduino nano and a small lcd to start playing on that...

The new thread: http://www.rcgroups.com/forums/showthread.php?t=1493174
Thanks again, cruzado. I think it is a mistake to over look user tuning of the PID. The modern FBL units allow this by having a gain for each of the P, I & D. The problem is that the smaller helis react very differently to the bigger ones. Just using gain is not enough. For instance a 250 will always have stop bounce, with the same settings as a 450, and lowering the gain will only make it loose on pitch pumps.

Have a look at the manual for the Tarot GY650:
http://www.rcgroups.com/forums/showt...ighlight=gy650

They have lock gain and stop/brake gain. These are usually adjusting the combining of the I and D levels. Without this kind of adjustment, the gyro will never work with all sizes of models. Spartan quark allows the adjustment of these settings in the PC software. Many use this to lower the stop gain of the quark for a 250, for best results.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 22, 2011, 06:48 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Yes, maybe you're right! The final user should have access to all parameters that can make it work better.
When I was testing it I noticed several things. When I adjust the "I" value for tail hold then the tail stops have a lot of bounce back and the tail movement is not constant. When I adjust the "I" value and integrator limits for a good stops the tail hold gets bad!
So there are 3 main phases that we have to have diferent PID values:
- tail in hold.
- tail in movement
- tail in stop

In this first version I disabled the integrator when the tail is moving and when it is stopping.

the spartan has this configuration:
[Gyro]
Product=ds760
Application version=100
Firmware version=104
Memory Map version=1
User comments=Use this area to make notes related to this configuration or your_CRLF_model._CRLF_
[Servo]
High endpoint=137
Low endpoint=111
Midpoint trim=0
Servo=10
Speed=8
Type=0
[Common]
Direction=1
Rudder stick deadband=5
[Mode 1 (Rate Mode)]
Rudder exponential=-50
[Mode 2 (AVCS Mode)]
Acceleration profile=15
Deceleration profile=15
Clockwise stop gain=80
Counter clockwise stop gain=80
Rudder exponential=-50
Rudder sensitivity=100

I also agree with you that loading the bootloader is not easy for the most common people but I don't have other solution.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 22, 2011, 07:39 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
A script for the programming part? The avr programmer could be called via commandline.
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 22, 2011, 07:43 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by daybyter View Post
A script for the programming part? The avr programmer could be called via commandline.
Sorry, I've used PonyProg.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 22, 2011, 07:51 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
For those who are trying the application:

Enter prog mode: rudder stick for one side and pulse 3 or 4 times the gyro switch on the tx.
Change item with the gyro switch.

servo direction: 1 blue -> 1 or 2 red (normal and reverse) change with rudder stick
endpoint1: 2 blue -> 1 red adjust with rudder stick
endpoint2: 3 blue -> 1 red adjust with rudder stick

End prog mod: pulse 3 or 4 times the gyro switch on the tx. You must do it to save the changes!
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 22, 2011, 07:52 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
But a commandline tool could be used?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 22, 2011, 07:55 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
I think so. Are you trying to program the bootloader?
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 22, 2011, 08:14 PM
Registered User
USA, NY, Syracuse
Joined May 2005
874 Posts
Sounds great, I like playing with avr's, do you thinh it's posible to upgade the old one to do analog servo rates?
beer-man is online now Find More Posts by beer-man
Reply With Quote
Old Aug 23, 2011, 05:20 AM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Quote:
Originally Posted by cruzado View Post
I think so. Are you trying to program the bootloader?
I would like too. Problem is, that I have a GA 250 here, that might have a hardware problem. After a turn, it always turned the heli back into it's original direction. So if it's a hardware problem, and I program your new firmware, testing might be useless, since I cannot say for sure, if an issue is related to the hardware or the firmware.

So I could order another gyro. Problem is, that our customs office tests any electronic component with cables very carefully. In fact I'm waiting for a servo now since July 6th. So it might take a few monts, before I get a working GA 250.

Not sure what to do yet, but I'd like to help wth the programming. I just don't know, how to proceed yet.
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 06:58 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by beer-man View Post
Sounds great, I like playing with avr's, do you thinh it's posible to upgade the old one to do analog servo rates?
Yes, it's possible. In the future the servo rate will be in the configuration parameters. By now you can change a macro and compile the program again.

#define SERVO_FREQ 250 // Hz

You have also to adjust the Integrator gain in the same proportion, for example:

250Hz -> kI = kP>>4; (division by 16)
60Hz -> kI = kP>>2; (division by 4)
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 23, 2011, 07:02 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by daybyter View Post
I would like too. Problem is, that I have a GA 250 here, that might have a hardware problem. After a turn, it always turned the heli back into it's original direction. So if it's a hardware problem, and I program your new firmware, testing might be useless, since I cannot say for sure, if an issue is related to the hardware or the firmware.

So I could order another gyro. Problem is, that our customs office tests any electronic component with cables very carefully. In fact I'm waiting for a servo now since July 6th. So it might take a few monts, before I get a working GA 250.

Not sure what to do yet, but I'd like to help wth the programming. I just don't know, how to proceed yet.
Meanwhile you can play with your gyro, printing things on the PC terminal like
rudder values, gyro sensor values (from the ADC), maybe you can find the problem!
I can send you a version with debug things.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 23, 2011, 07:37 AM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Ok, I'll try to flash your firmware. Maybe I can contribute at least to the docs.

We could start with links to shops, where you can get the required hardware, like this RS232- or (better) USB-adapter?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 07:51 AM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
Quote:
Originally Posted by daybyter View Post
I would like too. Problem is, that I have a GA 250 here, that might have a hardware problem. After a turn, it always turned the heli back into it's original direction. So if it's a hardware problem, and I program your new firmware, testing might be useless, since I cannot say for sure, if an issue is related to the hardware or the firmware.

So I could order another gyro. Problem is, that our customs office tests any electronic component with cables very carefully. In fact I'm waiting for a servo now since July 6th. So it might take a few monts, before I get a working GA 250.

Not sure what to do yet, but I'd like to help wth the programming. I just don't know, how to proceed yet.
If this is a hardware problem, then I have two gyros here with the same hardware problem and they are from 2 different batches. I think you will find this is one of the firmware issues with the GA250.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 23, 2011, 08:20 AM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
This comment was interesting from an Align team member who has worked closely with the developer of the 3GX:
Quote:
The tail is alot better and during development that was a major priority. The tail gain is increased automatically as you deflect the rudderstick, this give the tail more consistency, future upgrade may include a slider to affect how much gain is added as you deflect the rudder. On occasion, the limiting factor to how high you can turn up the overall gain for me is when I give full right rudder, the tail may stutter as it goes around. Instead of turning down the overall tail gain, I reduced the tail lock gain to 60 and it fixes it.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 23, 2011, 11:55 AM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Quote:
Originally Posted by beenflying View Post
If this is a hardware problem, then I have two gyros here with the same hardware problem and they are from 2 different batches. I think you will find this is one of the firmware issues with the GA250.
Weird thing is, that I had 2 gyros of the same batch (I guess, since it was the same order). The other one works perfectly...
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 12:24 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
This device should work, right?

http://cgi.ebay.de/USB-2-0-to-UART-T...item564571ffb4

And it has a 5V output, so no further 5V supply is required, right?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 12:24 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Is there a description of the required modifications inside the gyro?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 12:41 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by daybyter View Post
This device should work, right?

http://cgi.ebay.de/USB-2-0-to-UART-T...item564571ffb4

And it has a 5V output, so no further 5V supply is required, right?
Yes, I think that device is good to load the application (not the bootloader) and no further 5V supply is required. you have to connect the extra circuit, described on the blog, between that USB device and the gain connector in order to be possible to use the AVRprog. The gyro can be powered (gain connector) with these 5V and also the extra circuit.

You don't need to do any modification inside the gyro, only solder 6 wires when programing the bootloader. After that you can remove these wires and close the gyro.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 23, 2011, 12:53 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Ok, thanks! Ordered...

I have a programmer from the er9x project, so how connect it to the gyro?

Maybe take a picture from Olli and add small arrows where to connect which programmer signal?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 12:59 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by daybyter View Post
Ok, thanks! Ordered...

I have a programmer from the er9x project, so how connect it to the gyro?

Maybe take a picture from Olli and add small arrows where to connect which programmer signal?
See blog: "Open the gyro and connect the programmer to the SPI interface (VCC, GND, MOSI, MISO, RESET and SCK)"

These labels are printed on the Olli pcb pitures....
Look at 6 pads aligned like this:
o o o
o o o
cruzado is offline Find More Posts by cruzado
Last edited by cruzado; Aug 23, 2011 at 01:23 PM.
Reply With Quote
Old Aug 23, 2011, 03:00 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Ah thanks!

Here:
http://www.olliw.eu/uploads/gyro-GA250-withanno-wp.jpg

the left picture in the lower left corner.

Hmmh..these pads are aligned nicely...maybe there could be a solderless solution like s_mack's solderless board for the turnigy 9x? Just a pcb with 6 pins on one side and a connector on the other? If the 2 were aligned in a box, or so?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 23, 2011, 04:55 PM
Registered User
alexaglob's Avatar
Joined Nov 2010
793 Posts
Very interesting project, subscribed.
alexaglob is offline Find More Posts by alexaglob
Reply With Quote
Old Aug 23, 2011, 06:21 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by daybyter View Post
Ah thanks!

Here:
http://www.olliw.eu/uploads/gyro-GA250-withanno-wp.jpg

the left picture in the lower left corner.

Hmmh..these pads are aligned nicely...maybe there could be a solderless solution like s_mack's solderless board for the turnigy 9x? Just a pcb with 6 pins on one side and a connector on the other? If the 2 were aligned in a box, or so?
We can do it more than one way, with a connector 6 pins with the same pitch as the pcb pads for example, making some pressure against the pcb.
In my opinion the best solution is soldering 6 thin wires. No bad contacts!

Don't forget to program configuration/lock bits.
cruzado is offline Find More Posts by cruzado
Last edited by cruzado; Aug 23, 2011 at 06:49 PM.
Reply With Quote
Old Aug 23, 2011, 06:31 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by beenflying View Post
This comment was interesting from an Align team member who has worked closely with the developer of the 3GX:
We can take some ideas from other people and from other devices...

In your opinion what does the delay parameter on the GY520?
Change the gain only on stops?
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 23, 2011, 07:02 PM
Professional heli wrecker
Luvmyhelis's Avatar
United States, WA, Spokane
Joined Oct 2010
4,303 Posts
I have five of them and am reprogramming all of them. OlliW has great info on how to solder the board and do the bootloader, I am using the Robbebox Vs2
Luvmyhelis is offline Find More Posts by Luvmyhelis
Reply With Quote
Old Aug 24, 2011, 05:57 PM
efx
Rookie in training, heads up
efx's Avatar
Los Angeles
Joined Mar 2010
3,203 Posts
That looks pretty neat, who sells that programmer and what's the other part you have on there with the wires on the left side of that picture?

Quote:
Originally Posted by Luvmyhelis View Post
I have five of them and am reprogramming all of them. OlliW has great info on how to solder the board and do the bootloader, I am using the Robbebox Vs2
efx is offline Find More Posts by efx
RCG Plus Member
Latest blog entry: Malware?
Reply With Quote
Old Aug 25, 2011, 02:05 AM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
Quote:
Originally Posted by cruzado View Post
We can take some ideas from other people and from other devices...

In your opinion what does the delay parameter on the GY520?
Change the gain only on stops?
The delay in the LH GY520 had no effect on stop bounce with my 250. It appears to adjust the I gain. On the 250, with zero delay, it would oscillate on a hard pitch pump. With maximum delay the tail drifts out to the right and then returns some time later.

I'm also wondering if it's a good idea to update the PID at the servo frame rate, as this will cause issues when different servos types can be selected. Would it make sense to do this at the highest rate the processor can handle all of the time, no matter what servo type was selected?
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 25, 2011, 06:30 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Quote:
Originally Posted by beenflying View Post
The delay in the LH GY520 had no effect on stop bounce with my 250. It appears to adjust the I gain. On the 250, with zero delay, it would oscillate on a hard pitch pump. With maximum delay the tail drifts out to the right and then returns some time later.

I'm also wondering if it's a good idea to update the PID at the servo frame rate, as this will cause issues when different servos types can be selected. Would it make sense to do this at the highest rate the processor can handle all of the time, no matter what servo type was selected?
I thought that also, but I don't see any advantage in to update the PID and through out the PID result because in that case
we cannot update the servo everytime we update the PID (only at servo frame rate or lower).
There are also other issue. At 250Hz we update the servo every 4ms but a normal servo takes 70ms/60. Maybe this is an important detail.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 25, 2011, 07:26 AM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
Quote:
Originally Posted by cruzado View Post
I thought that also, but I don't see any advantage in to update the PID and through out the PID result because in that case
we cannot update the servo everytime we update the PID (only at servo frame rate or lower).
The advantage is not having to change the kI value when the servo frequency changes. Any frequency can be used with the same value.

Quote:
There are also other issue. At 250Hz we update the servo every 4ms but a normal servo takes 70ms/60. Maybe this is an important detail.
That is the advantage of using a higher frame rate servo. You can tell it sooner to change the last position you sent it to, so faster reaction and less chance of overshooting. The worry is overheating the servo due to fast oscillation.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 26, 2011, 06:22 AM
OlliW
Joined Sep 2009
1,986 Posts
Hey Crusado,

congrats for getting started this nice project...

maybe I could share some of my "insights" I got while working on the GA250 coax gyro mixer project
http://www.olliw.eu/2011/ga250-fpkoax-gyro-mischer/ (unfortunately only in German yet)
http://www.rcgroups.com/forums/showthread.php?t=1450125

Although both the rate and heading hold gyros are based on a PID (and the heading hold is essentially just adding the I term), I think one should not discuss them along the same lines but carefully separate the discussion, since not only the parameter settings would differ, but - at least IMHO - also the implementation should differ. Since nowadays few folks would use the rate mode, I myself will talk here only about issues related to the HH mode.

To that end, I think there are several advantages of increasing the PID loop update rate (and to "decouple" it from the servo update rate), which are related to the fact that the gyro sensor value is more often read with the adc.
more adc readings per sec ->
i) aliasing is reduced
ii) the effective accuracy/resolution is increased (deciphering)
iii) a simple software lowpass filter can always be (and should be) introduced to "slow" things down
iv) the D term is VERY sensitive to noise, which can be reduced dramatically with "appropriate filter" techniques

In fact, because of the D term being very sensitive to noise I guess one would not use the naive implementation as in the sample code. I myself had problems with that, and its reported to lead to problems "everywhere" else.So, I would recommend to use one of the "appropriate filter" techniques.

Quote:
In your opinion what does the delay parameter...?
This is a very good question. I could not figure out anything definitive from the resources available on the net (since almost no info as regards heli gyros exist, in contrast to the abundance of info for multicopters, which do not need delay as it seems). I would be most glad if anyone would have a competent answer here (not just the typical functional descriptions or guesses). From what it is supposed to do I believe delay is implemented as Smith predictor or some simplified version of it to account for the dead times. But as said, I would be most glad if anyone into heli gyro programmring could confirm/disconfirm that.

Have fun,
Olli
OlliW is offline Find More Posts by OlliW
Reply With Quote
Old Aug 26, 2011, 09:06 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
Thank you very much for your opinion!

Quote:
Although both the rate and heading hold gyros are based on a PID (and the heading hold is essentially just adding the I term), I think one should not discuss them along the same lines but carefully separate the discussion, since not only the parameter settings would differ, but - at least IMHO - also the implementation should differ. Since nowadays few folks would use the rate mode, I myself will talk here only about issues related to the HH mode.
I agree with you. The HH mode is the most important (and difficult) part. The rate mode is just a "nice to have" feature. We should focus the HH mode part.

Quote:
iii) a simple software lowpass filter can always be (and should be) introduced to "slow" things down
Is your advice to increase ADC sample rate just to feed a low pass filter and only feed the PID when we gonna to update the servo?

Quote:
iv) the D term is VERY sensitive to noise, which can be reduced dramatically with "appropriate filter" techniques

In fact, because of the D term being very sensitive to noise I guess one would not use the naive implementation as in the sample code. I myself had problems with that, and its reported to lead to problems "everywhere" else.So, I would recommend to use one of the "appropriate filter" techniques.
I've read somewhere about this issue but as I said this first version is just a good starting point and I couldn't get yet debug data in real time to analise (I'm waiting for a bluetooth device).
Do you have some references about that "appropriate filter" or some code example?
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 28, 2011, 10:18 PM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
Quote:
Originally Posted by cruzado View Post
In your opinion what does the delay parameter on the GY520?
Change the gain only on stops?
Delay is a time delay filter of the feedback (MEMS level) to the PID. For example, the raw value would be no delay, and the value averaged, would be the delayed value. Effectively an RC on the MEMS output.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 29, 2011, 06:36 AM
OlliW
Joined Sep 2009
1,986 Posts
OK. You claim to know the correct answer, so - for a moment - let's talk serious.

What reasons do you have to believe that this is the correct answer? What is your evidence? What is/are your source/s of this information? ...

Why and how does it do what the "delay" function is - according to the manuals - supposed to achieve?

"delay" is to you a filter delay?

Olli

PS: I think you are just guessing here, and I think it's nonsense, hence my "serious" talk... but I may of course be wrong...
OlliW is offline Find More Posts by OlliW
Reply With Quote
Old Aug 29, 2011, 10:09 AM
Registered User
Joined Jan 2011
1,069 Posts
Hello, i'm interested in your project cruzado. I dont know almost nothing about programming risc or even c. But i'm learning since i have the time and i know a little about pid, since i use them for furnace temp (that have to be ~1 degree of error in 1000c)

Maybe and i m just guessing that delay is a simple way to soften the noise from the raw data from gyro sensor. That way you can make changes every let s say 4ms.
Imagine the sensor send data at a rate of 1/.1ms.
Delay 0 would mean all data from sensor is analized ( a lot of work for the processor). Putting a 1 ms delay would mean you do an average value of ten data from sensor. You smooth the data that way and perhaps less error end less creeping of servo.

Just an idea anyway.

Have a nice day.
nicodh is offline Find More Posts by nicodh
RCG Plus Member
Old Aug 29, 2011, 01:42 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
I've been reading about Smith Predictor and Predictive PID and I found it very interesting but also not easy to understand all the theory.

Now I can change PID parameters and get debug information in real time. I have the bluetooth device connected to the gain connector and it's working. Next days I will try to adjust better the PID parameters. I will test also some simple filters for the Derivative part and for the Delay.
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Aug 29, 2011, 05:08 PM
OlliW
Joined Sep 2009
1,986 Posts
you also might wish to test setpoint weighting (for both the P and derivative part). This can also be considered a 2DOF controller, which allows you to set independently the repsonses to a disturbance (wind etc) or a setpoint change (rudder stick), and is also related to feed forward. I am convinced that for a heli this will allow you to significantly improve the overall performance (although I have no "proof" as to yet).

Olli
OlliW is offline Find More Posts by OlliW
Reply With Quote
Old Aug 29, 2011, 05:31 PM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
delay is a rather unspecific approach to deal with a not-ideal servo. I wonder, if there is a better approach. Maybe by creating a profile for each servo-type and upload it to the gyro?
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Aug 29, 2011, 07:37 PM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
OlliW, this was the information one of my engineers gave me. He has been doing motor speed controllers for over 20 years (not gyros).

Good luck, cruzado, but my time is better spent elsewhere for now.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Old Aug 30, 2011, 01:49 AM
OlliW
Joined Sep 2009
1,986 Posts
Quote:
OlliW, this was the information one of my engineers gave me. He has been doing motor speed controllers for over 20 years (not gyros).
many thanks for this information, but I wonder, since I found that in the context of motor speed controllers, are you talking about what's (also) called a "lag compensator"? (maybe you can double-check with your engineer)
OlliW is offline Find More Posts by OlliW
Last edited by OlliW; Aug 30, 2011 at 01:56 AM.
Reply With Quote
Old Aug 30, 2011, 02:09 AM
Professional heli wrecker
Luvmyhelis's Avatar
United States, WA, Spokane
Joined Oct 2010
4,303 Posts
Quote:
Originally Posted by daybyter View Post
delay is a rather unspecific approach to deal with a not-ideal servo. I wonder, if there is a better approach. Maybe by creating a profile for each servo-type and upload it to the gyro?
That would take some fairly extensive research to document each servo. Are you suggesting to upload all of them into the very small memory of the Ga250 or just individually during setup? The latter would make sense. And cruz, your bluetooth combo is very cool! Keep up the great thread guys. With OlliW here I have no need to comment further. I respectfully bow at the feet of the true master here.
Luvmyhelis is offline Find More Posts by Luvmyhelis
Reply With Quote
Old Aug 30, 2011, 03:12 AM
OlliW
Joined Sep 2009
1,986 Posts
Hey Guys interested in Delay etc.

I have just opened a specific thread for this (and this sort) of questions, What is Delay of a Heli-Gyro from the Controller Perspective?. It appeared to me that the (possibly extended) labtalk on such specific issues would only splatter cruzado's nice thread. Hopefully this may help to follow more clearly the development of the specific implemetation and, importantly, experience reports...

Cheers,
Olli
OlliW is offline Find More Posts by OlliW
Reply With Quote
Old Aug 30, 2011, 06:43 AM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Quote:
Originally Posted by Luvmyhelis View Post
That would take some fairly extensive research to document each servo. Are you suggesting to upload all of them into the very small memory of the Ga250 or just individually during setup? The latter would make sense.
My idea was to document each servo, as they are used, of course. This could be uploaded to a website. Let the user measure the length of his servoarm, enter the length on a website, and the server returns a computed profile, that the user loads on the gyro. Maybe add the heli type, so the data of the tail rotor are took into consideration, too. The gyro would have much more precise data to work with, I thought...
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Sep 10, 2011, 08:03 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
124 Posts
There are a new version available. The tail behaviour is now much better!
cruzado is offline Find More Posts by cruzado
Reply With Quote
Old Sep 11, 2011, 05:31 AM
Registered User
Bundesrepublik Deutschland, Rheinland-Pfalz, Kaiserslautern
Joined Apr 2007
1,009 Posts
Thanks! I've already soldered my programmer to a GA250, but it could be, that the PCB is broken now, sinc I got it from a friend, who glue it with CA to the case. So I had ti use a screwdriver and some force to get the board out of the case. Will see later, if it's still working...
daybyter is offline Find More Posts by daybyter
Reply With Quote
Old Sep 12, 2011, 05:03 PM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,969 Posts
Nice job, cruzado! Keep up the good work.
beenflying is offline Find More Posts by beenflying
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Firmware for the KK Micro by JussiH or other KK's using the IDG500 gyro kapteinkuk Multirotor Talk 22 Oct 31, 2011 09:03 AM
Help! Assan ga250 gyro setup TubeBarHeli Electric Heli Talk 1 Jul 01, 2011 02:08 PM
Sold Turnigy DS480 servo + GA250 MEMS gyro flying4food Aircraft - Electric - Helis (FS/W) 3 May 15, 2011 06:37 PM
Discussion Another newbie video from CRUZROY on the ASSAN GA250 GYRO'S cruzroy Mini Helis 2 Apr 27, 2011 10:42 PM
Question HK GA250 Gyro: Servo settings. bamm 3D Electric Heli Flying 5 Apr 08, 2011 08:58 PM