Quick Start Guide

From STorM32-BGC Wiki
Jump to navigation Jump to search

On this page, I (OlliW) will briefly describe the initial steps which are required to set up the STorM32-BGC to function correctly. Descriptions refer to firmware v0.56.

Ultra-Quick Start Guide:

  • Use the "Calibrate Acc" tab to calibrate the imus.
  • Use the "Configure Gimbal Tool" to set the Imu1 Orientation, Imu2 Orientation, and Motor Pole parameters correctly, and to set the Motor Direction parameters to "auto".
  • Use the "Get Current Motor Directions" option to set the Motor Direction parameters.
  • Use the "Get Current Pitch and Roll Motor Positions" option to set the Startup Motor Pos parameters for pitch and roll.
  • Use the "Adjust Yaw Startup Motor Pos Parameter Tool" to align the yaw axis to point forward at startup.

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 one Camera IMU is attached to the I2C port. The 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 Dont's.
  • 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 "Read", "Write", and "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 (the gyros would also, but that's currently beyond reach). Several calibration techniques are available, and two are implemented in the STorM32 project, these are the "1-point" and "6-point" calibrations.

Unfortunately, it is not absolutely clear as to which method is the best. This is because I don't have the resources for an extensive research project, this is what would possibly be needed for a determination. Hence, the situation currently is a bit experimental and might appear fuzzy to many users, but - on the positive side - knowledge and experience is increasing and therefore calibration procedures may improve with time.

The reasons for a calibrating are different for the camera IMU versus the 2nd IMU.

Camera IMU: Calibration mainly affects "horizontal drift", i.e. the accuracy with which the horizon is held in quick yaw turns and other high-g manoeuvers. It also determines the accuracy of how well the camera is leveled, but this can in principle be tuned out easily by other means (e.g. offset parameters). The main concern is the performance in high-g manoeuvers.

Second IMU: The measurement accuracy of the 2nd IMU is in itself not very important, it is however very important that the 2nd IMU data is consistent with the camera IMU, and it is even more important with higher poled motors e.g. poles greater than the basic 14 poles.

It has been found that the calibration issue depends strongly on the orientation of the IMU module.

Imu Orientation: In general, the z axis is more often wrong than the x and y axes.

Of course, the care with which a calibration is performed very much affects the final quality results of the calibration.

Calibration Accuracy: A 6-point calibration is meaningful only if it is done very accurately. A poorly undertaken 6-point calibration can easily result in poorer performance than a supposedly "lesser" 1-point calibration. The resulting quality factor under the 6-point calibration option can give a good indication as to the results (a value of 80 very good, 150 average, 250 not so good).

From the above information these are rules of thumb to follow:

Rules of thumb:

  • The calibration only needs to be as good as you need it to be. If you are happy with the way your gimbal performs, you don't need to spend time on a (better) calibration.
  • IMU orientations with the Z-axis pointing up or down seems preferable, as it lessens the need for calibration. But don't be fooled here, equally good results can be obtained for other orientation. Some of the best videos out there were in fact recorded with the imu's Z-axis in a horizontal orientation. It just means that with the Z-axis pointing up or down it's more likely that one can get away with a "lesser" calibration for a desired level of performance.
  • The calibration of the camera IMU is more important than for the 2nd IMU, i.e. for the 2nd IMU a "lesser" calibration might be fully sufficient.
  • The calibration of the 2nd IMU becomes more important as the motor pole count increases (e.g. 14 pole versus 22 pole).

⦁ Even though, for the reasons mentioned previously, a clear cut calibration recipe cannot currently be offered, although there are some recommendations in place:

Current Recommendations:

  • A 1-point calibration is fairly simple, and is hence recommended for both the camera and the 2nd IMU.
  • If possible choose imu orientations with the Z-axis pointing up or down, but that's not a must as explained before.
  • Don't do a 6-point calibration unless you plan to do it very accurately (check out the rcgroups thread).
  • If motors with 12 or 14 poles are used, a 1-point calibration of the 2nd IMU is most likely sufficient. In contrast Higher-pole motors require a careful 2nd IMU calibration.

Video Calibration Tutorial: Rcgroups user mackar made a great video on the 6-point calibration. Go to 6-Point Calibration.

Finally, some important advice:

Save your calibration data to a file!

Ideally save it from within the Calibration dialog window, as this stores the most detailed information. Consider also, posting your calibration files in the rcgroups thread, so that the firmware author and others can enhance their knowledge and hopefully develop better calibration schemes.

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 misbehaviour 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 "Gimbal Configuration" tab in the GUI:

  • Imu-1 Orientation
  • Imu-2 Orientation
  • Motor Poles
  • Motor Directions
  • Motor Startup Positions

Some of these should be adjusted "before" the motors are activated, some can only be adjusted with the motors enabled.

Before the motors are enabled for the first time

The Imu-1 and Imu-2 orientations and number of motor poles should be adjusted before the motors are activated, and the motor direction settings, initially set to Auto in order to find correct rotation directions.

This is most easily done by using the "Configuration Gimbal Tool" option (accessible under the "Gimbal Configuration" Tab in the GUI), which is started by clicking on the respective button. Just follow the instructions step by step:

  • It will guide you through a simple procedure which determines the Imu-1 and Imu-2 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, as mentioned above, the Motor Direction parameters must be set to "Auto".

After motors have been enabled for the first time

With the Imu-1 and Imu-2 orientations, and motor poles set correctly, and the motor direction set to "auto", one can enable the motors (all motors!) and start the gimbal. The controller should go through the initialization steps and level the camera (green led blinks), and then reach the "Normal" state (green led continuously On). Note: You can see what is happening by initiating and starting the "Data Display". Once the "Normal" state is reached the Motor Directions and the Startup Motor Pos parameters can be set using the Tools tab:

  • Click on the "Tools" menu tab and execute the "Get Current Motor Directions" option. This will copy the auto determined motor directions into the Motor Direction fields.
  • Click on the "Tools" menu tab and execute the "Get Current Pitch and Roll Motor Positions" option. This will copy the current pitch and roll motor positions into the Pitch and Roll Startup Motor Pos parameter fields.
  • Click on the "Tools" menu tab and execute the "Adjust Yaw Startup Motor Pos Parameter Tool". This opens a dialog box which allows you to align the yaw axis such that the camera points to the forward position. Don't worry that the alignment being undone when closing the dialog box, this is normal as the just made adjustments become effective only after the next startup of the gimbal.

Note! adjustments made in these steps only become Active after a restart of the StorM32 gimbal controller.

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. :)