HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Aug 22, 2011, 08:48 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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, 09: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, 09:17 AM
Full Scale Piper Cub Driver
Piper J3's Avatar
Hinckley, Ohio
Joined Nov 2008
2,272 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 offline Find More Posts by Piper J3
Reply With Quote
Old Aug 22, 2011, 10:10 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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, 10:23 AM
You can't take the sky from me
scott page's Avatar
United States, WA, Richland
Joined May 2009
4,557 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 online now Find More Posts by scott page
Reply With Quote
Old Aug 22, 2011, 04:46 PM
as much as I can
beenflying's Avatar
NZ
Joined Jan 2010
4,678 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, 05:48 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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, 06: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, 06:43 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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, 06:51 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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, 06: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, 06:55 PM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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, 07:14 PM
Registered User
USA, NY, Syracuse
Joined May 2005
868 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 offline Find More Posts by beer-man
Reply With Quote
Old Aug 23, 2011, 04: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, 05:58 AM
Registered User
Portugal, Lisboa, Lisboa
Joined Mar 2009
121 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
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 08:03 AM
Help! Assan ga250 gyro setup TubeBarHeli Electric Heli Talk 1 Jul 01, 2011 01:08 PM
Sold Turnigy DS480 servo + GA250 MEMS gyro flying4food Aircraft - Electric - Helis (FS/W) 3 May 15, 2011 05:37 PM
Discussion Another newbie video from CRUZROY on the ASSAN GA250 GYRO'S cruzroy Mini Helis 2 Apr 27, 2011 09:42 PM
Question HK GA250 Gyro: Servo settings. bamm 3D Electric Heli Flying 5 Apr 08, 2011 07:58 PM