Quick Start Guide

From STorM32-BGC Wiki V1
Revision as of 11:45, 2 December 2014 by OlliW (talk | contribs)
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.

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 the Motor Poles correctly, and to set the Motor Directions to "auto".
  • Use the "Get Current Motor Directions" option to set the Motor Directions.
  • 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 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 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).
  • 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.

The 3-axis with single IMU and the 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.

Preparation

Before one starts, one should know this:

  • Comprehend the Dos and Dont's.
  • Understand the importance of a proper gimbal mechanics, read The Gimbal.
  • 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 rcgroups thread, and check this post for known bugs.
  • Check that your setup matches one of the supported setups mentioned before.
  • Understand the Read, Write, and Write+Store mechanism in the GUI.

Finally, an advice: Take any recommendation given in these links seriously!

Calibration

The accelerometers of the imu modules need to be calibrated for optimal performance (the gyros too, but that's beyond reach). Several calibration techniques are known, and two of them are implemented in the STorM32 project, called 1-point and 6-point calibration.

Unfortunately, it is not finally clear what method is the best. This is because not much useful info is in the web and I don't have the resources for an extensive research project on this, but this is what would be needed. Hence, the situation is currently a bit experimental and might appear fuzzy to many users, but - to also have a good message - the knowledge and experience increases and calibration procedures might improve with time.

The reasons for a calibration are different for the camera and the 2nd IMU.

Camera IMU: The calibration mainly affects the "horizont drift", i.e. the accuracy with which the horizont is hold in quick yaw turns and other high-g maneuvers. It also determines the accuracy of how well the camera is level, but this could in principle be tuned out easily by other means (e.g. offset parameters). The main concern is the performance in high-g maneuvers.

Second IMU: The measurement accuracy of the 2nd IMU is by itself not very important, it is however very important that the 2nd IMU data is consistent with the camera IMU, and it is the more important the higher the number of motor poles is.

Some insights have been made so far.

Imu Orientation: As a general trend, the z axis is much more wrong than the x and y axes.

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 a poorer performance than a supposedly "lesser" 1-point calibration. The quality factor can give an indication.

From that these rule of thumbs follow:

Rules of thumb:

  • The calibration only needs to be as good as you need it to be. If you are happy with how your gimbal works, you don't have to spend time on a (better) calibration.
  • Imu orientations with the z-axis up or down seem preferable, as it lessens the need of a calibration. But don't get fooled here, equally good results can be obtained for any orientation. Some of the best videos out there were in fact recorded with the imu's z axis horizontal. It just means that with the z axis up or down it's more likely to 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 is the more important the higher the motor pole count is.

Even though, for the reasons mentioned before, a clear cut calibration recipe cannot be offered currently, some recommendations seems at place:

Current Recommendations:

  • A 1-point calibration is fairly simple, and is hence recommended for both the camera and 2nd IMU.
  • If possible choose imu orientations with the z-axis up or down, but that's no must as explained before.
  • Don't do a 6-point calibration if you don't plan to do it really 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 likley sufficient. High-pole motors require in contrast a carefull 2nd IMU calibration.

Finally, this important advice:

Safe your calibration data to a file! 

Ideally safe it from within the Calibration dialog, as this stores the most detailed information. Consider also to post 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 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, e.g. when a new function is activated, and you might not associate it to the earlier faulty setup. So, accept this:

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

The parameters we are talking about are those centralized in the GUI's "Gimbal Configuration" tab:

  • Imu1 Orientation
  • Imu2 Orientation
  • Motor Poles
  • Motor Directions
  • Motor Startup Positions

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

Before motors are enabled first time

The Imu1 and Imu2 orientations and motor poles should be adjusted before the motors are activated, and the motor direction settings prepared properly.

This is most easily done by using the "Configure Gimbal Tool", which is started by hitting on the respective button in the tab. Just follow it step by step:

  • It will guide you through a simple procedure which determines the Imu1 and Imu2 Orientations.
  • It then will ask you to enter the number of poles of your motors. The motor pole number you should find in the data sheet of the motors. For instance, a 12N14P motor has 14 poles. The number of poles corresponds to the number of magnets, which you can see in the inner side of the motor bell. So, in case of doubt you can easily determine the number by just counting the magnets.
  • Finally, the Motor Direction parameters are set to "auto".

After motors were enabled first time

With the Imu1 and Imu2 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 reach the "Normal" state (green led goes continuous). Note: You may watch what's going on by running the Data Display. Once the "Normal" state is reached the Motor Directions and the Startup Motor Pos parameters can be set:

  • Go to the "Tools" menu and execute the "Get Current Motor Directions" option. This will copy the auto determined motor directions into the Motor Direction fields.
  • Go to the "Tools" menu 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.
  • Go to the "Tools" menu and execute the "Adjust Yaw Startup Motor Pos Parameter Tool". It opens a dialog which allows you to align the yaw axis such that the camera points to the forward. Don't worry about the fact that the alignment is undone with closing the dialog, that's how it is.

The just made adjustments become effective only at the next startup of the gimbal.

Next Steps

The next step is 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. :)