View Single Post
Old Jun 03, 2011, 04:19 PM
OlliW is offline
Find More Posts by OlliW
Joined Sep 2009
2,924 Posts
Firmware for the GA250 gyromixer

Firmware for the GA250 gyromixer:
The firmware is currently in Version 0.22. The most important advancement as compared to the first version(s) posted here is that heading hold is now implemented and fully operational, and failsafe is considered. Also, some behavior which could confuse the user was improved.

A link to the latest firmware is provided below.

The main function, the gyro, is implemented as a simple PI controller. I fooled around with a PID controller with real D term and setpoint weighting, but didn't found this to be of any advantage, in the contrary. So, I sticked to a PI controller. The second function, the mixer, is a piece of cake to implement.

Besides these two native functions, which give rise to the parameters gain and prop as they are also usually available via potis in the standard coax electronics, I implemented quite a number of additional features which allow to fine-tune the behavior of the coax, such as expo for rudder, or various parameters to affect the throttle curve. So, the number of parameters may look scaring but most are actually not mandatory for a basic functioning, but can signficantly improve the "feel" of how the coax flies.

Parameters in the GA250 Gyromixer
Gyro Mode [off,rate,heading hold]
rate and heading hold shoudl be obvious
off means that the gyro is completely inoperative, which is an intersting experience, but is actually implemented to facilitate a test, which I would ask experienced pilots to do
Rate Gain [0.00 ... 2.50]
gain when gyro is operated in rate mode
PID Gain [0.00 ... 2.50]
gain when gyro is operated in heading hold mode
PID I [0.000 ... 0.100]
this is simply spoken the heading hold capability (and hence only effective in heading hold mode)
The larger this value, the more serious is the gyro about holding the heading, but by increasing it usually also gain has to be reduced to avoid tail wagging. Hence a compromise between large gain and large I has to be found. A good approach is to first determine the gain setting when operated in rate mode, and when to slowly increase I from zero in heading hold mode.
Prop [-100 ... 100]
should be obvious, corresponds to the prop dial on the usualy 3in1 or 4in1 koax units
Revo [-100 ... 100]
allows for a pitch dependent compensation of the torque excerted by the two rotor. This can significantly help the gyro to do its job upon strong "pitch pumps". Technically, revo changes the slopes of the throttle curves of motor A and B in comparison to each other.
Rudd Rate [0.0 ... 3.0]
sets the maximally possible pirouette rate, 1.0 corresponds to about 1 turn per second
Due to the limitations of the ISZ650 gyro sensor used in the GA250 device, a pirouette rate larger than ca. 1.3 leads to uncontrolled pirouettes at large rudder signals, this can be impressive and fun though. Increase this value ONLY slowly step by step by 0.1 ticks.
Rudd Expo [0.00 ... 1.00]
expo setting for rudder
This allows to have more sensitivity for rudder control near zero rudder. A value of 0.00 means no sensitivity enhancement (expo off), a value of 1.00 corresponds to a completly flat response near zero rudder.
Thro Expo [0.00 ... 1.00]
expo setting for thror
This allows to have more sensitivity for thro control near the thro level determined by Thro Hover. A value of 0.00 means no sensitivity enhancement (expo off), a value of 1.00 corresponds to a completly flat response near the Thro Hover point.
Thro Hover [25% ... 75%]
refence for the Revo and Thro Expo functions
Thro Min [0% ... 35%]
lower limit to the PPM signals send to the BESCs of the motors
This allows to fine tune the reponse of the koax upon thro.
Thro Max [65% ... 100%]
upper limit to the PPM signals send to the BESCs of the motors
This allows to fine tune the reponse of the koax upon thro.
Frame Length [4 ms ... 22 ms in steps of 2 ms]
frame length of the PPM signals for the BESCs for the motors
In principle the shorter the frame rate the better, however not all BESCs may work with to short frame lengths.

Besides these, additional parameters are available, which are however only for "experts". These are:
Low Pass Time [0 ... 10]
Low Pass Average [1 ... 8]
Cntrl Limit [0 ... 500]
Dead Band [0 ... 30]
Rudd Sense [0.00 ... 1.00]
Mot Min Value [us]
Mot Max Value [us]
Thro Min Value [us]
Thro Max Value [us]

Functions of the GA250 Gyromixer
The behavior of the gyromixer and its interaction with the programming box is described. The gyromixer has a red LED and a blue LED, which are of course used to signal in which state the gyromixer currently is, on which its behavior of course depends. Unfortunately the red LED is not well seen if the blue is on, look carefully, it's easy to get confused here. The meaning of the LEDS is that:

The blue LED is ON whenever a connection to the programming box is established, and OFF if not (whith one lttle exception, see below).

The red LED tells you about the current STATE of the device. The gyromixer can be in any of FIVE different states:

(A0) Initialization and startup
This is the state after having switched on the gyromixer. The gyromixer first waits for a valid signal to come in from the reciever. The red LED is blinking very fast.

(A1) Rx signal recieved
Once a valid rx signal has been detected the gyromixer checks for the position of the Thro stick. The red LED is blinking fast. The gyromixer will wait as long as one the following positions have be detected:
Thro fully down (Thro low):
If the gyromixer detects thro down at startup it moves on and enters the Thro low state (C). Once it has entered this state the gyromixer can only be in either state (C) or (D).
Thro fully up (Thro high):
If the gyromixer detects thro up at startup it enters the Thro range programming state (B).

(B) Thro range programming mode
That's essentially exactly what is known for the BESCs. That is, as next step one is expected to pull the Thro stick fully down, which makes the gyromixer to store the Thro up and down values of the transmitter/reciever into memory, i.e., the gyromixer is learned as for BESCs. In that mode the red LED blinks slowly. Once Thro fully down is detected the red and blue LEDs start blinking alternatively, and the only way to get out of that mode is to switch off the gyromixer.

IMPORTANTLY, during states (A1) and (B) the Thro signal as it is recieved from rx is passed through unchanged to the two motor outputs of the gyromixer. That is, by having Thro up at startup and pulling it then down, it is possible to simultaneously learn also BOTH BESCs! In these states the gyromixer behaves as if it were a "piece of wire" as regards the PPM signals to the motor BESCs.

(C) Thro low mode:
This mode is entered whenever the gyromixer detects that the Thro stick is low for longer than ca. 4 seconds. The red LED will be on. In this mode a signal is output to the motor outputs, but the rudd, gyro, and mixer functions are off for saftey reasons.

(D) Flight mode:
If the Thro is moved up a tiny bit (4% of the full range if the gyromixer was learned), the gyromixer enters the Flight mode and the red LED goes off. In this mode the motor BESCs get their PPM signals and the gyromixer does what you expect it to do. During the transition from state (C) to state (D) the gyromixer will be recalibrated, i.e., the gyrosensor signal will be reset to zero. Hence, one actually doesn't have to keep the coax standing still after switched on, since the crucial calibration steps will be done ONLY very shortly (10 ms) before the Flight mode is entered.

If a loss of a valid signal from the reciever is detected, the gyromixer enters the failsafe condition. This is not actually a separate state but may occur during any of the above states. During Failsafe, the red LED blinks very fast. In states (A) and (B), a failsafe will "reset" the gyromixer and it will start from the very beginning, i.e., state (A0). In state (C) a failsafe doesn't harm much and hence not much is happening. However, as a saftey feature the gyromixer will require that Thro is low for few seconds before it accepts any further thro commands. In state (D) the motor signals are slowly reduced to minimum for saftey. However, if within this period a signal is comming in again, the motor signals will go back to what they are supposed to be.

Interaction with the programming box
IMPORTANTLY, a connection to the Robbe Box is ONLY possible if the gyromixer is in STATE (A) or (B) or (C), but not in state (D). (I figured it doesn't make much sense to change parameters during flight... ).

However, a failsafe doesn't interfer with the connection. Hence, if one is in state (C) one may switch off the transmitter if one wants for saftey reasons before one connects the programming box to the gyromixer. After having finsihed the programming bussines one may switch on the transmitter again, but the gyromixer will wait for thro is low before it allows to continue.

As stated before, the blue LED will go on if a connection is established, which is also indicated on the display of the programming box.
OlliW is offline Find More Posts by OlliW
Last edited by OlliW; Apr 10, 2012 at 09:22 AM.