Getting Started: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<div class="toclimit-2">__TOC__</div>
<div class="toclimit-2">__TOC__</div>


Line 22: Line 24:
== The Gimbal ==
== The Gimbal ==


Before you power up any electronics it is absolutely necessary to balance your gimbal and to ensure minimum resistance to rotations (friction in bearings, stiff cables, etc). Any imbalance or distraction to free rotation will make setting up the gimbal much more difficult or even impossible. The goal is that no matter where your camera, mounted in the gimbal, points at, it should stay in that position. The better you do the job the better the stabilization performance will be.  
Before you power up anything it is absolutely necessary to balance your gimbal and to ensure minimum resistance to rotations (friction in bearings, stiff cables, etc). Any imbalance or distraction to free rotation will make setting up the gimbal more difficult or even impossible. The goal shall be, no matter where your camera, mounted in the gimbal, points at, it should remain in that position. The better you do the job here, the better the stabilization performance will be.  


== Connections ==
== Connections ==


In order to operate the gimbal the first time, only few things need to be connected to the controller:
In order to operate the gimbal the first time, only a few things need to be connected to the controller:
* IMU - without that the controller will show errors and won't power up the motors.
* IMU - without that the controller will show errors and won't power up the motors.
* Motors - Mot0 and Mot1 are meant for the Pitch and Roll motors (which is the default setting), and Mot2 for the Yaw motor. The order of the three pins of each motor is irrelevant, as motor directions were not set yet in the GUI.  
* Motors - Mot0 and Mot1 are meant for the Pitch and Roll motors (which is the default setting), and Mot2 for the Yaw motor. The order of the three pins of each motor is irrelevant as motor directions were not defined in the GUI yet.
* USB port - connect it to a computer for setup and debugging purposes.
* USB port - connect it to a computer for setup and debugging purposes.
* Battery - if the board is powered by USB only, then the motors are shut off and won't work (please do '''not connect''' a battery yet, see next chapter).
* Battery - if the board is powered by USB only, then the motors are shut off and won't work (please do '''not connect''' a battery yet, see next chapter).
Line 38: Line 40:
== First Configuration ==
== First Configuration ==


Assuming a firmware was uploaded to the controller before, the first time you connect the controller via USB to the computer you won't see much happening except the two LEDs blinking with various frequencies; the gimbal can be moved freely as no power is applied to the motors (no battery connected yet). Windows will search for the USB driver, which can take a couple of minutes. Please wait until it reports having installed it.  
Assuming a firmware was uploaded to the controller before, the first time you connect the controller to the computer via USB, you won't see much happening except the two LEDs blinking with various frequencies; the gimbal can be moved freely as no power is applied to the motors (remember: no battery connected yet!). Windows will search for the USB driver, which can take a couple of minutes. Please wait until it reports having installed it.  


Now you start the GUI executable matching the controller's firmware version and select the COM port, which is used by the USB controller, in the [Port] dropdown box at the bottom left. If you are not sure which COM port is used, unplug the USB cable, click to the right of the field to open the full list of available COM ports and memorize the list. Plug in the USB cable again, and open the list again. The required COM port is the one which has been newly added to the list.
Now you start the GUI executable matching the controller's firmware version and select the COM port assigned to the USB controller in the [Port] dropdown box at the bottom left. If you are not sure which COM port is used, unplug the USB cable, click to the dropdown icon of the field to open the full list of available COM ports and memorize that list. Plug in the USB cable again, and open the list again. The required COM port is the additional one.


Once the proper COM port is selected, the first thing to do is to hit the [Read] button. If everything is in order, the GUI will read the currently stored settings from the controller. In the message box at the bottom you will see some messages and a final  "Read...DONE!" text.
Once the proper COM port is selected, the first thing is to hit the [Read] button. If everything is in order, the GUI will read the currently stored settings from the controller. In the message box at the bottom you will see some debug messages and a final  "Read...DONE!" text.


Now it's time to set the most important parameters, namely the IMU orientation and the motor parameter values, without which the controller can't work properly.
Now it's time to set the most important parameters, the IMU orientation and the motor parameter values. Without the controller can't perform the basic operations even.


'''For the following the motors should NOT be operational.''' This can be achieved in various ways, for example by physically disconnecting all motors, or using the [Disable all Motors] buttons in the configuration tabs. The easiest, and recommended, way is however to power the board by only the USB connection, i.e. to not connect a battery to it.  
'''For the following the motors should NOT be operational.''' This can be achieved in various ways, for example by physically disconnecting all motors, or using the [Disable all Motors] buttons in the configuration tabs. The easiest and recommended way is however to power the board via USB only, i.e. to not connect a battery to it.  


[[File:1main.png|480px]]
[[File:1main.png|480px]]
Line 52: Line 54:
== IMU Orientation ==
== IMU Orientation ==


The tab called [Configure IMU] is meant to support you in setting up the IMU orientation correctly. There are so many different ways in which you can attach the IMU to your camera (above the camera, below, at the backside, with the axis up, down, left, right, and so on) but the controller does not know. So you have to tell.
The tab called [Configure IMU] is meant to support you in setting up the IMU orientation. There are so many different ways in which you can attach the IMU to your camera (above the camera, below, at the backside, with the axis up, down, left, right, and so on) but the controller does not know. Hence you have to tell.


It is of outmost importance that you set the IMU orientation correctly, since otherwise the controller does not have any chance to work correctly. Thus, this is the most important step. '''Please double and triple check that you got the IMU stetting right!'''
It is of outmost importance to set the IMU orientation correctly, else the controller has no chance to work correctly. '''Please double and triple check that you got the IMU stetting right!'''


=== Determining the IMU Orientation ===
=== Determining the IMU Orientation ===
The first thing is to ensure that all motors are shut off to avoid any motor movements.
The first thing is to ensure that all motors are shut off to avoid any motor movements. Then investigate the IMU board, there is an arrow printed on it for the x-axis. Hold the gimbal and the camera in front of you, as if you would be taking a picture. The question to answer in the IMU orientation dialog is where the x arrow and z axis points to.
 
Now we investigate the camera and the orientation of the IMU module. The IMU's z axis points outwards of the surface of the IMU chip. In the example below it points downwards the camera, so you specify that the [z axis points] "down".


For the x axis the IMU board has an arrow printed on it. In the example below it is pointing in the camera's forward direction, hence in the GUI you set that the [x axis points] "forward".
The IMU's z axis points outwards of the surface of the IMU chip, it comes straight out of the IMU board hence. In the example below, as the MIU board is mounted upside down, it points downwards the camera, so you specify the [z axis points] "down".
For the x axis we use the printed arrow on the IMU board. In the example below it is pointing in the camera's forward (shooting) direction, hence in the GUI you set that the [x axis points] "forward".


This setting needs to be sent to the board, so you click on the [Write] button. In order to make the changes permanent however, the menu option [Store to EEPROM] can be used. Alternatively, click on the check box next to the [Write] button, which causes the button label to change to [Write+Store], and hit the button. Both methods are fine.
To send these setting to the board click on the [Write] button. In order to make the changes permanent however, the menu option [Store to EEPROM] can be used. Alternatively, click on the check box next to the [Write] button, which causes the button label to change to [Write+Store], and hit the button. Both methods are fine.


Please note that the [Configure IMU] page is for your support only. Its sole purpose is to help you determining the IMU orientation index, here no. 15, and writing it into the [Imu Orientation] parameter field located on the [Gimbal Setup] tab.
Please note that the [Configure IMU] page is for your support only. Its sole purpose is to help you determining the IMU orientation index, here no. 15, and writing it into the [Imu Orientation] parameter field located on the [Gimbal Setup] tab.


'''''Comment''': In older firmware versions (v0.27 and lower) the meaning of "right" and "left" is reversed.''
'''''Comment''': In older firmware versions (v0.27 and lower) the meaning of "right" and "left" is reversed. The orientation index number however remained the same.''


[[File:6configureimu.png|480px]]
[[File:6configureimu.png|480px]]
Line 74: Line 75:


=== Checking the IMU Orientation ===
=== Checking the IMU Orientation ===
If you are uncertain about the setting, you can write the setting to the controller (temporarily or into the EEPROM) and then click on the [Data Display] button. This will open a realtime monitor window. In the top you can see the current Pitch, Roll, and Yaw angles once you did click on [Start] in that window.
If you are uncertain about the setting, you can write the setting to the controller (temporarily or into the EEPROM) and then click on the [Data Display] button. This will open a realtime monitor window. In the top you can see the current Pitch, Roll, and Yaw angles once you did click on [Start] in the window.


As the motors are (hopefully) still disabled, you can move the camera by hand. If you tilt the camera downwards (lens points to the bottom), then the Pitch value must get more positive. Assume that you are flying a right turn, then the Roll value must get more positive.
As the motors are (hopefully) disabled still, you can move the camera by hand. When you tilt the camera downwards (lens points to the ground), then the Pitch value shall get more positive. Assume that you are flying a right turn like an airplane, the Roll value shall get more positive.


If you do not observe that then go back and repeat the IMU orientation setting.
If you do not observe that then go back and repeat the IMU orientation setting.
Line 83: Line 84:


=== Appendix ===
=== Appendix ===
In case your IMU board has no arrow printed on or you are uncertain then you can use the white dot in one of the corners on the IMU chip (MPU6050) as well for the orientation. In the diagram below it is shown how the axes are orientated in relationship to the dot.  
In case your IMU board has no arrow printed on it or you are uncertain then you can use the white dot in one of the corners on the IMU chip (MPU6050) as well for the orientation. In the diagram below the axes and their orientated in relationship to the dot are shown.  


As said before, the z axis comes out of the top surface of the chip and the x axis points away from the dot. Check the chip labels, the x axis runs in the reading direction of the labelling.
As said before, the z axis comes out of the top surface of the chip and the x axis points away from the dot. Check the chip labels, the x axis runs in the reading direction of the labeling.


The diagram below shows this as well as the IMU orientation for various examples.
The diagram below provides some examples of the IMU orientation.


[[File:5IMUorientation.JPG|600px]]
[[File:5IMUorientation.JPG|600px]]
Line 95: Line 96:
For the motor settings there is a separate tab as well, the [Configure Motors] tab. Again, ensure that the motors are disengaged.
For the motor settings there is a separate tab as well, the [Configure Motors] tab. Again, ensure that the motors are disengaged.


In the example below the Mot0 port on the controller is connected to the Pitch motor, which lets the camera look up or down. Mot1 is connected to the Roll motor, which keeps the horizon level. Remember, Mot2 has to be always used for Yaw.
In the example below the Mot0 port on the controller is connected to the Pitch motor, which lets the camera look up or down. Mot1 is connected to the Roll motor, which keeps the horizon level. Remember, Mot2 has to be used for Yaw always.


The motor poles are best read from the motor's datasheets found in the internet. A common value is 14 poles for smaller motors. Large motors may have 22 poles or even more. Self-wound motors often have 12 poles.
The motor poles are best read from the motor's datasheets found in the internet. A common value is 14 poles for smaller motors. Large motors may have 22 poles or even more. Self-wound motors often have 12 poles.


The last setting of importance is the motor direction. However, the STorM32 controller provides you an "auto" setting, which is recommended to be used. With "auto" the initialization phase of the gimbal takes few seconds longer - who cares (you can avoid that using more advanced settings later if you wish).  
The last setting of importance is the motor direction. However, the STorM32 controller provides you an "auto" setting, which is recommended to be used. With "auto" the initialization phase of the gimbal takes few seconds longer - who cares (you can avoid that later if you like).  


With these few steps the most important fields in the [Gimbal Setup] tab are properly set, and you are ready to go!
With these few steps the most important fields in the [Gimbal Setup] tab are properly set, and you are ready to go!
Line 107: Line 108:
== Next step - PID Tuning ==
== Next step - PID Tuning ==


Once you have completed the above steps, the motors can be turned on. Check in the [Expert] tab that the [Pitch Usage], [Roll Usage] and [Yaw Usage] parameters fields are all set to "normal" (the default is "disabled"). If not, set them to "normal" and write and store the changed setting.
Once you have completed the above steps, the motors can be turned on. Check in the [Expert] tab that the [Pitch Usage], [Roll Usage] and [Yaw Usage] parameters fields are all set to "normal" (the default is "disabled"). If not, set them to "normal" (or click on [Enable all Motors] and write and store the changed setting.


Now connect a battery to the controller (it is assumed that you did follow above advice of powering the board via USB). The Gimbal should initialize and start to work. It may also start to show weird shaking or make high frequency noises, which are indications that the PID values in the [Main] tab are sub optimal.
Now connect a battery to the controller (it is assumed that you did follow above advice of powering the board via USB). The Gimbal should initialize and start to work. It may also start to show weird shaking or make high frequency noises, which are indications that the PID values in the [Main] tab are sub optimal.


See the PID parameter [[Tuning Guide|Tuning Guide]] for adjusting those.
See the PID parameter [[Tuning Guide|Tuning Guide]] for adjusting those.

Revision as of 08:34, 12 May 2014


Foreword

This page is intended to help you making the first steps with the STorM32 brushless gimbal controller. Every gimbal is unique because of different size, motors, and camera weight. Copying the configuration of one gimbal to another usually won't work. Hence, you have to learn what happens with your gimbal when changing settings. If you're not prepared to invest the time then the STorM32-BGC, like any other gimbal controller, won't make you happy :-). Otherwise, let's get started...

Parts Checklist

  • 1x STorM32BGC
  • 1x MPU6050 breakout board (plus 4pol cable and plug to connect to the controller)
  • 1x 3 axis gimbal with motors (plus 3x motor cable, each 3pol)
  • 1x Lipo 2s - 4s (plus 2pol cable and plug to connect to the controller)
  • 1x USB 2.0 cable
  • firmware and gui, Downloads
  • 1x USB to serial adapter + 4 dupont 2.54mm cables (necessary for firmware update or first flashing)
  • 1x joystick + 5 dupont 2.54mm cables (OPTIONAL)
  • 1x IR led + 2 dupont 2.54mm cables (OPTIONAL)
  • plenty of time and patience ;-)

For possible sources for some parts you may check out Where to buy accessories and supplies.

The Gimbal

Before you power up anything it is absolutely necessary to balance your gimbal and to ensure minimum resistance to rotations (friction in bearings, stiff cables, etc). Any imbalance or distraction to free rotation will make setting up the gimbal more difficult or even impossible. The goal shall be, no matter where your camera, mounted in the gimbal, points at, it should remain in that position. The better you do the job here, the better the stabilization performance will be.

Connections

In order to operate the gimbal the first time, only a few things need to be connected to the controller:

  • IMU - without that the controller will show errors and won't power up the motors.
  • Motors - Mot0 and Mot1 are meant for the Pitch and Roll motors (which is the default setting), and Mot2 for the Yaw motor. The order of the three pins of each motor is irrelevant as motor directions were not defined in the GUI yet.
  • USB port - connect it to a computer for setup and debugging purposes.
  • Battery - if the board is powered by USB only, then the motors are shut off and won't work (please do not connect a battery yet, see next chapter).

All the other ports, such as the Rc input ports, shall remain disconnected for now.

0connections.JPG

First Configuration

Assuming a firmware was uploaded to the controller before, the first time you connect the controller to the computer via USB, you won't see much happening except the two LEDs blinking with various frequencies; the gimbal can be moved freely as no power is applied to the motors (remember: no battery connected yet!). Windows will search for the USB driver, which can take a couple of minutes. Please wait until it reports having installed it.

Now you start the GUI executable matching the controller's firmware version and select the COM port assigned to the USB controller in the [Port] dropdown box at the bottom left. If you are not sure which COM port is used, unplug the USB cable, click to the dropdown icon of the field to open the full list of available COM ports and memorize that list. Plug in the USB cable again, and open the list again. The required COM port is the additional one.

Once the proper COM port is selected, the first thing is to hit the [Read] button. If everything is in order, the GUI will read the currently stored settings from the controller. In the message box at the bottom you will see some debug messages and a final "Read...DONE!" text.

Now it's time to set the most important parameters, the IMU orientation and the motor parameter values. Without the controller can't perform the basic operations even.

For the following the motors should NOT be operational. This can be achieved in various ways, for example by physically disconnecting all motors, or using the [Disable all Motors] buttons in the configuration tabs. The easiest and recommended way is however to power the board via USB only, i.e. to not connect a battery to it.

1main.png

IMU Orientation

The tab called [Configure IMU] is meant to support you in setting up the IMU orientation. There are so many different ways in which you can attach the IMU to your camera (above the camera, below, at the backside, with the axis up, down, left, right, and so on) but the controller does not know. Hence you have to tell.

It is of outmost importance to set the IMU orientation correctly, else the controller has no chance to work correctly. Please double and triple check that you got the IMU stetting right!

Determining the IMU Orientation

The first thing is to ensure that all motors are shut off to avoid any motor movements. Then investigate the IMU board, there is an arrow printed on it for the x-axis. Hold the gimbal and the camera in front of you, as if you would be taking a picture. The question to answer in the IMU orientation dialog is where the x arrow and z axis points to.

The IMU's z axis points outwards of the surface of the IMU chip, it comes straight out of the IMU board hence. In the example below, as the MIU board is mounted upside down, it points downwards the camera, so you specify the [z axis points] "down". For the x axis we use the printed arrow on the IMU board. In the example below it is pointing in the camera's forward (shooting) direction, hence in the GUI you set that the [x axis points] "forward".

To send these setting to the board click on the [Write] button. In order to make the changes permanent however, the menu option [Store to EEPROM] can be used. Alternatively, click on the check box next to the [Write] button, which causes the button label to change to [Write+Store], and hit the button. Both methods are fine.

Please note that the [Configure IMU] page is for your support only. Its sole purpose is to help you determining the IMU orientation index, here no. 15, and writing it into the [Imu Orientation] parameter field located on the [Gimbal Setup] tab.

Comment: In older firmware versions (v0.27 and lower) the meaning of "right" and "left" is reversed. The orientation index number however remained the same.

File:6configureimu.png

3imuorientation.JPG

Checking the IMU Orientation

If you are uncertain about the setting, you can write the setting to the controller (temporarily or into the EEPROM) and then click on the [Data Display] button. This will open a realtime monitor window. In the top you can see the current Pitch, Roll, and Yaw angles once you did click on [Start] in the window.

As the motors are (hopefully) disabled still, you can move the camera by hand. When you tilt the camera downwards (lens points to the ground), then the Pitch value shall get more positive. Assume that you are flying a right turn like an airplane, the Roll value shall get more positive.

If you do not observe that then go back and repeat the IMU orientation setting.

9datadisplay.png

Appendix

In case your IMU board has no arrow printed on it or you are uncertain then you can use the white dot in one of the corners on the IMU chip (MPU6050) as well for the orientation. In the diagram below the axes and their orientated in relationship to the dot are shown.

As said before, the z axis comes out of the top surface of the chip and the x axis points away from the dot. Check the chip labels, the x axis runs in the reading direction of the labeling.

The diagram below provides some examples of the IMU orientation.

File:5IMUorientation.JPG

Motor Settings

For the motor settings there is a separate tab as well, the [Configure Motors] tab. Again, ensure that the motors are disengaged.

In the example below the Mot0 port on the controller is connected to the Pitch motor, which lets the camera look up or down. Mot1 is connected to the Roll motor, which keeps the horizon level. Remember, Mot2 has to be used for Yaw always.

The motor poles are best read from the motor's datasheets found in the internet. A common value is 14 poles for smaller motors. Large motors may have 22 poles or even more. Self-wound motors often have 12 poles.

The last setting of importance is the motor direction. However, the STorM32 controller provides you an "auto" setting, which is recommended to be used. With "auto" the initialization phase of the gimbal takes few seconds longer - who cares (you can avoid that later if you like).

With these few steps the most important fields in the [Gimbal Setup] tab are properly set, and you are ready to go!

File:7configuremotors.png

Next step - PID Tuning

Once you have completed the above steps, the motors can be turned on. Check in the [Expert] tab that the [Pitch Usage], [Roll Usage] and [Yaw Usage] parameters fields are all set to "normal" (the default is "disabled"). If not, set them to "normal" (or click on [Enable all Motors] and write and store the changed setting.

Now connect a battery to the controller (it is assumed that you did follow above advice of powering the board via USB). The Gimbal should initialize and start to work. It may also start to show weird shaking or make high frequency noises, which are indications that the PID values in the [Main] tab are sub optimal.

See the PID parameter Tuning Guide for adjusting those.