Quick Start Guide: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
 
(70 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Below I (OlliW) will briefly list the steps which are required to correctly set up the STorM32-BGC, as a kind of prestart check list.
<span style="font-size:88%">''by OlliW, descriptions refer to firmware v0.57e and later</span>''
<!--
A personal note first: That I'm sitting here and writing this guide is slightly disappointing. The STorM32 project is my hobby, and I share it for free because I do it in my spare time, which is limited. Documentation I consider thus the user's job, but essentially noone except one brave soul (yang/wdaehn) has contributed significantly to it. The firmware and GUI however progresses, and several pieces of the wiki ran out of date. So I'm sitting here and am writing this guide. :)
-->


The setup is completed in three major steps:
On this page, I will briefly describe the initial steps which are required to set up the STorM32-BGC to function correctly. Since firmware v0.57e this has become extremely simple.  
* '''Preparation:''' Learn the basics.
* '''Calibration:''' Learn how and why to do a calibration of your IMU(s).
* '''Basic Controller Configuration:''' Adjust those controller parameters, which are absolutely crucial for a correct working.


The Basic Controller Configuration can be further distinguished into two major steps:
'''Ultra-Quick Start Guide:'''
* Some parameters need to be set BEFORE the motors are enabled for the first time.
* Use the {{GUI|Calibrate Acc}} tab to calibrate the imus.
* The remaining parameters need to be set AFTER the gimbal was started the first time with the motors enabled.
* Use the {{GUI|Configure Gimbal Tool}} to set the {{PARAMNAME|Imu Orientation}}, {{PARAMNAME|Imu2 Orientation}}, {{PARAMNAME|Motor Poles}}, {{PARAMNAME|Motor Direction}}, and {{PARAMNAME|Startup Motor Pos}} parameters correctly, as well as to enable the motors and store the settings permanently.  


The chapters below guide you (very) briefly through what you need to know and what you need to do.
Below a somewhat less quick "Quick Start Guide" follows. It tells you what you need to know and what to do.


= Supported Gimbals =
== Supported Gimbals ==
The STorM32 controller can currently be used for the following setups:
The STorM32 controller can currently be used for the following setups:
* '''3-Axis with single IMU:''' Only one IMU, connected to the I2C port and mounted to the camera, is used.
* '''3-Axis with single Camera IMU:''' Only one IMU, connected to the I2C port and mounted to the camera, is used.
* '''3-Axis with on-board IMU:''' In addition to the camera IMU the on-board IMU is used as 2nd IMU. The board must be mounted on the gimbal support (above the yaw motor).
* '''3-Axis with Camera & on-board IMU:''' In addition to the camera IMU the STorM32 on-board IMU is used as a 2nd IMU. The STorM32 board must be mounted on the gimbal ''above'' the yaw motor.  
* '''3-Axis with separate 2nd IMU:''' In addition to the camera IMU a further IMU connected to the I2C#2 port is used as 2nd IMU. The board can be mounted anywhere, but the 2nd IMU must be mounted on the gimbal support (above the yaw motor).
* '''3-Axis with Camera & separate 2nd IMU:''' In addition to the camera IMU a further IMU connected to the I2C#2 port is used as 2nd IMU. The board can be mounted anywhere, but the 2nd IMU must be mounted on the gimbal ''above'' the yaw motor.  
* '''2-Axis:''' This is not "officially" supported but users figured out that the controller can be set up to work also fine for a 2-axis gimbal. Only one IMU attached to the I2C port and mounted to the camera can be used. The usage of a 2nd IMU is not supported.
* '''2-Axis:''' This is not officially supported but users figured out that the controller can be set up to work fine with a 2-axis gimbal (check the [http://www.rcgroups.com/forums/showthread.php?t=2055844 rcgroups thread]). Only a camera IMU is attached to the I2C port. A 2nd IMU is not supported in this configuration.  
The 3-Axis with single IMU and 2-Axis applications are obviously easier to set up, since one doesn't need to care about the 2nd IMU and what's required to get it working correctly. The following focuses on the dual-IMU setups.
Both the 3-axis and 2-axis gimbals with single IMU are obviously easier to set up since one doesn't need to be concerned about the 2nd IMU and what's required to get it working correctly. The following focuses on the 3-axis dual-IMU setups.


= Preparation =
== Preparation ==
Before one starts, one should know this:
Things to know before starting:  
* Comprehend the [[Getting Started#Dos and Dont's|Dos and Dont's]].
* Comprehend the [[Dos and Don'ts]].
* Understand the importance of a proper gimbal mechanics, read [[Getting Started#The Gimbal|The Gimbal]].
* Understand the importance of a proper gimbal mechanics, read [[Getting Started#The Gimbal|The Gimbal]] and especially [[Tuning_Recipe#Balancing the Gimbal|Balancing the Gimbal]].
* Get familiar with the board, inspect [[Pins and Connectors]].
* Get familiar with the board, inspect the [[Pins and Connectors]].
* Use the latest firmware and GUI. For downloading the latest firmware package see [[Downloads]]. For flashing the firmware to the board see [[How to flash firmware]]. Read the update and install instructions in the respective post in the [http://www.rcgroups.com/forums/showthread.php?t=2055844 rcgroups thread], and check that post for known bugs.
* Use the latest firmware and GUI. To download the latest firmware package see [[Downloads]]. To flash the firmware to the board see [[How to flash firmware]]. Read the updates and installation instructions in the respective posts at the [http://www.rcgroups.com/forums/showthread.php?t=2055844 rcgroups thread], also check these posts for known bugs.
* Check that your setup matches one of the supported setups mentioned in the above.
* Check that your setup matches one of the supported setups mentioned previously.
* Understand the {{GUI|Read}}, {{GUI|Write}}, and {{GUI|Write+Store}} mechanism in the GUI.


Finally, an advice: Take any recommendation given in these links seriously!
Finally, good advice: Please take any recommendations from these links seriously!


= Calibration =
== Calibration ==
The accelerometers within the IMU modules need to be calibrated for optimal performance. See [[Calibration]].


== Basic Controller Configuration ==
The algorithms used in the STorM32 controller need to know some aspects of your gimbal in order to work correctly. If any of this information is incorrect, the controller will misbehave. Unfortunately, an incorrect setup will not always immediately reveal itself, but will lead to misbehavior at a later stage, e.g. when a new function is activated, and therefore you might not associate it with the earlier faulty setup. So, please accept the following statement:


= Basic Controller Configuration =
Just because a setting seems to work correctly doesn't mean that it is correct!
The algorithms used in the STorM32 controller need to know some aspects of your gimbal in order to work correctly. If any of these info is wrong, the controller will misbehave. Unfortunately, an incorrect setup will not always reveal itself immediately, but will lead to misbehavior at a later stage, when a new function is activated, and you might not associate it to the earlier incorrect setup. So:
 
One implication is that adjusting the fundamental parameters by trial-and-error is the best approach in producing all sorts of non-obvious problems. Fortunately, a straight-forward setup procedure is available and if followed, guarantees correct settings. So, the above could be rephrased as "Don't try to be smart, just shut up and follow the recipe". That's in fact the best advice possible here.  
 
The parameters we are talking about are those mainly contained under the {{GUI|Gimbal Configuration}} tab in the GUI:
 
* Imu Orientation (= camera IMU)
* Imu2 Orientation (= 2nd IMU)
* Motor Poles
* Motor Directions
* Startup Motor Positions


Just because a setting seems to work correctly doesn't mean that it is correct!
Some of these parameters should be adjusted "before" the motors are activated, some can only be adjusted with the motors enabled. Hence, the individual steps are grouped into {{GUI|Steps I}} and {{GUI|Steps II}} in the {{GUI|Configure Gimbal Tool}}. In between a battery needs to be connected to power the motors and the gimbal is restarted. Finally, in the {{GUI|Finish}} steps, the motors are enabled and the determined values stored permanently to the STorM32 board.
 
All this can be most easily done by using the {{GUI|Configure Gimbal Tool}} option, which is started by clicking on the respective button under the {{GUI|Gimbal Configuration}} tab in the GUI. Just follow the instructions step by step.
 
=== Steps I ===
The camera and 2nd IMU orientations and number of motor poles are adjusted, and the motor direction parameters set to {{PARAMVALUE|auto}} in order to find correct rotation directions later on.
 
Just follow the instructions in the {{GUI|Configure Gimbal Tool}} step by step:
 
* It will guide you through a simple procedure which determines the Imu and Imu2 orientations.
* It will then ask you to enter the number of poles of your motors. The number of poles for your motors should be available in the motor data sheets. For example, a 12N14P motor has 14 poles. The number of poles corresponds to the number of magnets, which you can be seen on the inner side of the motor bell. So, if in doubt you can quite easily determine the number of poles by simply counting the number of magnets.
* Finally, it will set the motor direction parameters to {{PARAMVALUE|auto}}.
 
=== Steps II ===
With the camera and 2nd IMU orientations, and motor poles set correctly, and the motor directions set to {{PARAMVALUE|auto}} in the previous steps, the motor directions and startup motor positions can be determined in the next steps.
 
For that, all motors will be enabled and the gimbal restarted. For this to work the controller needs to be connected to a battery; don't worry, the {{GUI|Configure Gimbal Tool}} will check and tell you when to connect a battery. The controller should go through the initialization steps and level the camera (green led blinks), and then reach the "Normal" state (a beep occurs, and the green led goes continuously on). You can follow this also by the status messages in the {{GUI|Configure Gimbal Tool}}. Once the "Normal" state is reached, the motor directions and startup motor positions can be determined. 


One implication is that adjusting the fundamental parameters by trial-and-error is the best approach to produce all sorts of non-obvious problems. Fortunately, a straight-forward setup procedure is available, which guarantees correct settings, if followed. So, the above could be rephrased also as "Don't try to be smart, just shut up and follow the recipe". That's in fact the best advice possible here.
Just follow the instructions in the {{GUI|Configure Gimbal Tool}} step by step:
* It will copy the automatically determined motor directions into the Motor Direction fields.
* It will then copy the current pitch and roll motor positions into the Pitch and Roll Startup Motor Pos parameter fields.
* Finally it will ask you to align the yaw axis such that the camera points to the forward position using the various buttons. Don't worry that the alignment is undone, when going to the next step, this is normal as the adjustment becomes effective after the next re-start of the STorM32 controller.  


{{COMMENT|In rare cases it may happen that these steps fail, since the gimbal starts to freak out when the "Normal" state is reached. This happens when the (default) PID parameters are grossly wrong for your gimbal. In that case skip the {{GUI|Steps II}} steps and proceed to the {{GUI|Finish}} steps, do a coarse PID tuning, and when repeat.}}


=== Finish ===
With all relevant parameters determined, the motors can be permanently enabled and the parameter values permanently stored in the STorM32 board.


== Before motors are enabled first time ==
In the {{GUI|Configure Gimbal Tool}} just hit the {{GUI|Ok}} button to finish the configuration.


== After motors were enabled first time ==
== The Next Steps ==
The next steps are to tune the PID parameters. It is not part of this Quick Guide, since the PID values are not fundamental for the controller to work correctly; they are (very) important for the performance. Once tuned, one can start to enjoy all the great and partly unique possibilities of the STorM32 controller. :)

Latest revision as of 23:11, 17 September 2015

by OlliW, descriptions refer to firmware v0.57e and later

On this page, I will briefly describe the initial steps which are required to set up the STorM32-BGC to function correctly. Since firmware v0.57e this has become extremely simple.

Ultra-Quick Start Guide:

  • Use the [GUI:Calibrate Acc] tab to calibrate the imus.
  • Use the [GUI:Configure Gimbal Tool] to set the Imu Orientation, Imu2 Orientation, Motor Poles, Motor Direction, and Startup Motor Pos parameters correctly, as well as to enable the motors and store the settings permanently.

Below a somewhat less quick "Quick Start Guide" follows. It tells you what you need to know and what to do.

Supported Gimbals

The STorM32 controller can currently be used for the following setups:

  • 3-Axis with single Camera IMU: Only one IMU, connected to the I2C port and mounted to the camera, is used.
  • 3-Axis with Camera & on-board IMU: In addition to the camera IMU the STorM32 on-board IMU is used as a 2nd IMU. The STorM32 board must be mounted on the gimbal above the yaw motor.
  • 3-Axis with Camera & separate 2nd IMU: In addition to the camera IMU a further IMU connected to the I2C#2 port is used as 2nd IMU. The board can be mounted anywhere, but the 2nd IMU must be mounted on the gimbal above the yaw motor.
  • 2-Axis: This is not officially supported but users figured out that the controller can be set up to work fine with a 2-axis gimbal (check the rcgroups thread). Only a camera IMU is attached to the I2C port. A 2nd IMU is not supported in this configuration.

Both the 3-axis and 2-axis gimbals with single IMU are obviously easier to set up since one doesn't need to be concerned about the 2nd IMU and what's required to get it working correctly. The following focuses on the 3-axis dual-IMU setups.

Preparation

Things to know before starting:

  • Comprehend the Dos and Don'ts.
  • Understand the importance of a proper gimbal mechanics, read The Gimbal and especially Balancing the Gimbal.
  • Get familiar with the board, inspect the Pins and Connectors.
  • Use the latest firmware and GUI. To download the latest firmware package see Downloads. To flash the firmware to the board see How to flash firmware. Read the updates and installation instructions in the respective posts at the rcgroups thread, also check these posts for known bugs.
  • Check that your setup matches one of the supported setups mentioned previously.
  • Understand the [GUI:Read], [GUI:Write], and [GUI:Write+Store] mechanism in the GUI.

Finally, good advice: Please take any recommendations from these links seriously!

Calibration

The accelerometers within the IMU modules need to be calibrated for optimal performance. See Calibration.

Basic Controller Configuration

The algorithms used in the STorM32 controller need to know some aspects of your gimbal in order to work correctly. If any of this information is incorrect, the controller will misbehave. Unfortunately, an incorrect setup will not always immediately reveal itself, but will lead to misbehavior at a later stage, e.g. when a new function is activated, and therefore you might not associate it with the earlier faulty setup. So, please accept the following statement:

Just because a setting seems to work correctly doesn't mean that it is correct!

One implication is that adjusting the fundamental parameters by trial-and-error is the best approach in producing all sorts of non-obvious problems. Fortunately, a straight-forward setup procedure is available and if followed, guarantees correct settings. So, the above could be rephrased as "Don't try to be smart, just shut up and follow the recipe". That's in fact the best advice possible here.

The parameters we are talking about are those mainly contained under the [GUI:Gimbal Configuration] tab in the GUI:

  • Imu Orientation (= camera IMU)
  • Imu2 Orientation (= 2nd IMU)
  • Motor Poles
  • Motor Directions
  • Startup Motor Positions

Some of these parameters should be adjusted "before" the motors are activated, some can only be adjusted with the motors enabled. Hence, the individual steps are grouped into [GUI:Steps I] and [GUI:Steps II] in the [GUI:Configure Gimbal Tool]. In between a battery needs to be connected to power the motors and the gimbal is restarted. Finally, in the [GUI:Finish] steps, the motors are enabled and the determined values stored permanently to the STorM32 board.

All this can be most easily done by using the [GUI:Configure Gimbal Tool] option, which is started by clicking on the respective button under the [GUI:Gimbal Configuration] tab in the GUI. Just follow the instructions step by step.

Steps I

The camera and 2nd IMU orientations and number of motor poles are adjusted, and the motor direction parameters set to “auto” in order to find correct rotation directions later on.

Just follow the instructions in the [GUI:Configure Gimbal Tool] step by step:

  • It will guide you through a simple procedure which determines the Imu and Imu2 orientations.
  • It will then ask you to enter the number of poles of your motors. The number of poles for your motors should be available in the motor data sheets. For example, a 12N14P motor has 14 poles. The number of poles corresponds to the number of magnets, which you can be seen on the inner side of the motor bell. So, if in doubt you can quite easily determine the number of poles by simply counting the number of magnets.
  • Finally, it will set the motor direction parameters to “auto”.

Steps II

With the camera and 2nd IMU orientations, and motor poles set correctly, and the motor directions set to “auto” in the previous steps, the motor directions and startup motor positions can be determined in the next steps.

For that, all motors will be enabled and the gimbal restarted. For this to work the controller needs to be connected to a battery; don't worry, the [GUI:Configure Gimbal Tool] will check and tell you when to connect a battery. The controller should go through the initialization steps and level the camera (green led blinks), and then reach the "Normal" state (a beep occurs, and the green led goes continuously on). You can follow this also by the status messages in the [GUI:Configure Gimbal Tool]. Once the "Normal" state is reached, the motor directions and startup motor positions can be determined.

Just follow the instructions in the [GUI:Configure Gimbal Tool] step by step:

  • It will copy the automatically determined motor directions into the Motor Direction fields.
  • It will then copy the current pitch and roll motor positions into the Pitch and Roll Startup Motor Pos parameter fields.
  • Finally it will ask you to align the yaw axis such that the camera points to the forward position using the various buttons. Don't worry that the alignment is undone, when going to the next step, this is normal as the adjustment becomes effective after the next re-start of the STorM32 controller.

Comment: In rare cases it may happen that these steps fail, since the gimbal starts to freak out when the "Normal" state is reached. This happens when the (default) PID parameters are grossly wrong for your gimbal. In that case skip the [GUI:Steps II] steps and proceed to the [GUI:Finish] steps, do a coarse PID tuning, and when repeat.

Finish

With all relevant parameters determined, the motors can be permanently enabled and the parameter values permanently stored in the STorM32 board.

In the [GUI:Configure Gimbal Tool] just hit the [GUI:Ok] button to finish the configuration.

The Next Steps

The next steps are to tune the PID parameters. It is not part of this Quick Guide, since the PID values are not fundamental for the controller to work correctly; they are (very) important for the performance. Once tuned, one can start to enjoy all the great and partly unique possibilities of the STorM32 controller. :)