Getting Started: Difference between revisions

From STorM32-BGC Wiki V1
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Werner: I habe die letzte 1/2 h am English gearbeit, lass mich das kurz saven befor du weitermachst, OK?
== Foreword ==


== 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...
This page is intended to help you making the first steps with the gimbal controller. Every gimbal is unique because of different size, motors, and camera weight. Copying the configuration of one gimbal to another won't work. You have to learn what happens with your gimbal when changing settings. If you're not prepared to invest the time the STorM32BGC, like any other gimbal controllers, won't make you happy :-). Otherwise, let's get started...


== Parts Checklist ==
== Parts Checklist ==
* 1x STorM32BGC
* 1x STorM32BGC
* 1x MPU6050 breakout board (plus 4pol cable and plug to connect to the controller)
* 1x MPU6050 breakout board (plus 4pol cable and plug to connect to the controller)
* 1x 3 axis gimbal with motors
* 1x 3 axis gimbal with motors (plus 3x motor cable, each 3pol)
* 3x motor cable (each 3pol)
* 1x Lipo 2s - 4s (plus 2pol cable and plug to connect to the controller)
* 1x Lipo 2s - 4s (plus 2pol cable and plug to connect to the controller)
* 1x USB 2.0 cable
* 1x USB 2.0 cable
Line 20: Line 19:


== 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 unbalance or distraction to free rotation will make setting up the gimbal much more difficult or even not possible. The goal is that no matter where your camera, mounted in the gimbal, points to, it should remain in that position. You do not have to do a perfect job but the better it gets, the less energy the motors will have to apply to keep the camera in position.


== Connectors ==
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 unbalance 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 to, it should stay in that position. The better you do the job the better the stabilization performance will be.  
In order to operate the gimbal the first time, the only cables required are
 
* Connecting the IMU with the controller - without that the controller will show errors and not power up the motors
== Connections ==
* Connecting the motors with the controllers - Mot0 and Mot1 are meant for Roll and Pitch (which is what is defined in the GUI) and Mot2 for the Yaw motor. The order of the three cables is f no importance as we have not set the motor direction in the GUI yet.
* USB port connected to the computer for setup and debugging purposes
* Power connector obviously - power provided by USB allows not for enough current to power up even the smallest motors


The RC connection may remain disconnected for now, then the gimbal will compensate all movements only.
In order to operate the gimbal the first time, only 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 cables of each motor is irrelevant, as motor directions were not yet set in the GUI.
* USB port - connect it to a computer for setup and debugging purposes.
* Battery - if the board is powered by only the USB then the motors are shut off and won't work.
 
All the other ports, such as the Rc input ports, should remain disconnected for now.


[[File:0connections.JPG|480px]]
[[File:0connections.JPG|480px]]


== First Configuration ==
== First Configuration ==
Assuming the controller is ready and firmware was uploaded already, when you power up the gimbal and connect it via USB to the computer the first time, nothing much will happen. The two LEDs will blink with various frequencies and the gimbal can be moved freely as no power is applied to the motors yet.
Now you start the configuration GUI matching the controller's firmware version and at the bottom left you select the COM port used by the USB controller. If you are not certain which one it is, unplug the USB cable, open the Windows device manager (enter devmgmt.msc in the search box of Windows) and expand the Port node. When you plugin the USB cable again, one additional entry will show up.
Once the proper COM port is selected, the first thing to do is hitting the Read button. If everything was in order, the GUI will read from the controller the currently stored settings and in the text box at the bottom you can see some messages and a final Read...DONE! text.


Now it is time to set the most important parameters, that is the IMU orientation and the motor values.
Assuming that 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 of 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.
 
Now you start the GUI 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.
 
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 from the controller the currently stored settings, and in the message box at the bottom you can see some 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.
 
For the following the motors should NOT work. This can be achieved in various ways. For instance one could disconnect all motors, or could use the [Disable all Motors] buttons provided 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.  


[[File:1main.png|480px]]
[[File:1main.png|480px]]


== IMU Orientation ==
== IMU Orientation ==
The tab called Configure IMU is meant to support you setting the IMU orientation correctly. There are so many different way you can attach the IMU to your camera, above the camera, below, at the backside and for each mounting location it could be with the axis up, down, left, right. The controller does not know that, you have to tell.


The first thing to do is clicking on the Disable all Motors botton to avoid any motor movements.
The tab called [Configure IMU] is meant to support you in setting 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.
Now we investigate the camera. The z-axis points outwards of the surface of the IMU chip, in this example here it points downwards the camera. So you specify the z-axis to point down.
 
The x axis is a bit more hairy. First we don't know which edge of the chip means x, which one is y. And second we don't know the direction. For the edge the IMU board has an arrow printed on it and labelled as x. In the example below the x-axis points along the same line as the camera axis, so the x-axis points either front of the camera or to the back. In order to find the direction, the IMU has a little white dot in one corner. This dot represents the end position of the arrow. Therefore we now know the x-axis is the left side of the chip and it points to the camera's back side - this is what we select: x axis points to back.
The first thing to do is to ensure that all Motors are shut off to avoid any motor movements.
 
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 the z-axis to point "down".
 
The x axis is a bit more hairy because it may be unclear which edge of the chip means x, and which one is y. Secondly we don't know the direction. For determining the edge the IMU board has an arrow printed on it and labelled x. In the example below the x axis points along the same line as the camera axis, so the x axis points either to the front of the camera or to the back. In order to find the direction, the IMU chip has a little white dot in one corner. This dot represents the end position of the arrow. Therefore we now know that the x axis is the left side of the chip and it points to the camera's back side - this is what we select: x axis points to "back".


This setting should be sent to the board, so you click on the Write button. To also make the changes permanently - the button Store to EEPROM is used. Alternatively you can click on write only to update the controlled without making the change permanent. Or tick the checkbox next the Write button, then the label of the button turns into Write+Store, well, to store the values to the EEPROM. All methods are fine.
COMMENT: The arrow printed on the IMU board gives both the "edge" as well as the "direction"!


Please note that this Configure IMU page is for your help only. It shows the orientation index, here no. 13, and this value is then written into the Gimbal Setup tab.
This setting needs to be sent to the board, so you click on the [Write] button. This updates the controlled without making the change permanent. In order to also make change permanent, the menu option [Store to EEPROM] can be used. Alternatively, you can click on the check box next to the [Write] button, which makes it to change into a [Write+Store] button, and hit the button. All methods are fine.
 
Please note that the [Configure IMU] page is for your help only. It's sole purpose is to help you determing the IMU orientation index, here no. 13, and writing it into the [Imu Orientation] parameter field located on the [Gimbal Setup] tab.


[[File:6configureimu.png|480px]]
[[File:6configureimu.png|480px]]
Line 57: Line 68:
[[File:0imuorientation.JPG|480px]]
[[File:0imuorientation.JPG|480px]]


If you are uncertain about the settings, you can write the data (temporary or into EEPROM) and then click on the Data Display button. This will show you a realtime monitor window and at the top you can see the current values of the Pitch, Roll (and Yaw) 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 that window.
As the motors are disabled still, you can tilt the camera pointing upwards and the Pitch value should get more positive. Assume you are flying a left turn, the Roll value should get more positive.
 
As the motors are (hopefully) still disabled, you can e.g. tilt the camera downwards. The Pitch value should then get more positive. Assume that you are flying a left turn, then the Roll value should get more positive.
 
[[File:9datadisplay.png|480px]]
[[File:9datadisplay.png|480px]]


== Motor Settings ==
== Motor Settings ==
For the motor settings there is a separate tab as well, the Configure Motors. Again, you disable the motors first by using the appropriate button and then you select the motor configuration. In my example the Mot0 port of the controller is connected to the motor which lets the camera look up or down, it is the pitch motor. And Mot1 is connected to the Roll motor, the one keeping the horizon level. Remember, Mot2 is used for Yaw always.
 
The motor poles are best read from the motor's datasheets found in the internet.
For the motor settings there is a separate tab as well, the [Configure Motors] tab. Again, ensure that the motors are disengaged.
The last setting is the motor direction but for that there is a auto setting available. Then the init phase of the gimbal takes one second longer - who cares.
 
With these few steps you updated the proper fields in the Gimbal Setup tab and should be ready to go.
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 always be used for Yaw.
 
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 typically have 12 poles.
 
The last setting of importance is the motor direction. However, the STorM32 controller provides you an "auto" setting, which you should use. With "auto" the initialization phase of the gimbal takes few seconds longer - who cares (you can avoid that using more advanced settings later on if you wish).  
 
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|480px]]
[[File:7configuremotors.png|480px]]
Line 71: Line 90:
== Next step - PID Tuning ==
== Next step - PID Tuning ==


Once you completed above, the motors likely need to be turned on again. In the Expert tab the Pitch Usage/Roll Usage/Yaw Usage are all to be altered from disabled to normal and saved to EEPROM by ticking the checkbox next to the Write button and then Write+Store the values.
Once you have completed the above, the motors can be turned on. Check that in the [Expert] tab 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.
Now the Gimbal might work, or start shaking weird or make high frequency noises. These would be the effects of sub optimal PID values in the Main tab for Pitch/Roll/Yaw.
 
Now connect a battery to the controller (assuming that you followed the above advice). The Gimbal should initialize and start to work. It may also start to show weird shaking or make high frequency noises, which would indicate that the PID values in the [Main] tab are sub optiomal.
 
See the [[Tuning Guide|PID parameters]] chapter for adjusting those.
See the [[Tuning Guide|PID parameters]] chapter for adjusting those.

Revision as of 17:58, 7 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 any electronics it is absolutely necessary to balance your gimbal and to ensure minimum resistance to rotations (friction in bearings, stiff cables, etc). Any unbalance 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 to, it should stay in that position. The better you do the job the better the stabilization performance will be.

Connections

In order to operate the gimbal the first time, only 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 cables of each motor is irrelevant, as motor directions were not yet set in the GUI.
  • USB port - connect it to a computer for setup and debugging purposes.
  • Battery - if the board is powered by only the USB then the motors are shut off and won't work.

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

0connections.JPG

First Configuration

Assuming that 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 of 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.

Now you start the GUI 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.

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 from the controller the currently stored settings, and in the message box at the bottom you can see some 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.

For the following the motors should NOT work. This can be achieved in various ways. For instance one could disconnect all motors, or could use the [Disable all Motors] buttons provided 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.

1main.png

IMU Orientation

The tab called [Configure IMU] is meant to support you in setting 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 first thing to do is to ensure that all Motors are shut off to avoid any motor movements.

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 the z-axis to point "down".

The x axis is a bit more hairy because it may be unclear which edge of the chip means x, and which one is y. Secondly we don't know the direction. For determining the edge the IMU board has an arrow printed on it and labelled x. In the example below the x axis points along the same line as the camera axis, so the x axis points either to the front of the camera or to the back. In order to find the direction, the IMU chip has a little white dot in one corner. This dot represents the end position of the arrow. Therefore we now know that the x axis is the left side of the chip and it points to the camera's back side - this is what we select: x axis points to "back".

COMMENT: The arrow printed on the IMU board gives both the "edge" as well as the "direction"!

This setting needs to be sent to the board, so you click on the [Write] button. This updates the controlled without making the change permanent. In order to also make change permanent, the menu option [Store to EEPROM] can be used. Alternatively, you can click on the check box next to the [Write] button, which makes it to change into a [Write+Store] button, and hit the button. All methods are fine.

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

6configureimu.png

0imuorientation.JPG

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.

As the motors are (hopefully) still disabled, you can e.g. tilt the camera downwards. The Pitch value should then get more positive. Assume that you are flying a left turn, then the Roll value should get more positive.

9datadisplay.png

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 always be used for Yaw.

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 typically have 12 poles.

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

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

7configuremotors.png

Next step - PID Tuning

Once you have completed the above, the motors can be turned on. Check that in the [Expert] tab 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.

Now connect a battery to the controller (assuming that you followed the above advice). The Gimbal should initialize and start to work. It may also start to show weird shaking or make high frequency noises, which would indicate that the PID values in the [Main] tab are sub optiomal.

See the PID parameters chapter for adjusting those.