Getting Started: Difference between revisions
No edit summary |
No edit summary |
||
Line 38: | Line 38: | ||
In order to operate the gimbal the first time, only a 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: | ||
* MPU module - without a MPU module connected to the I2C port the controller will show errors and won't power up the motors. | * MPU module - without a MPU module connected to the I2C port the controller will show errors and won't power up the motors. | ||
* Motors - Mot0 and Mot1 are for the Pitch and Roll motors (or vice versa), and Mot2 for the Yaw motor. The order of the three pins of each motor is irrelevant | * Motors - Mot0 and Mot1 are for the Pitch and Roll motors (or vice versa, this can be configured in the GUI), and Mot2 for the Yaw motor. The order of the three pins of each motor is irrelevant (the motor directions can be configured in the GUI). | ||
* 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 - please do '''not connect''' a battery yet, see next chapter. | * Battery - please do '''not connect''' a battery yet, see next chapter. | ||
Line 48: | Line 48: | ||
== First Configuration == | == First Configuration == | ||
It is assumed that a firmware was uploaded to the controller before (for uploading firmware see [[How to flash firmware]]). At the | It is assumed that a firmware was uploaded to the controller before (for uploading firmware see [[How to flash firmware]]). At the first-time connection of the controller to the computer via USB, Windows will search for the USB driver and install it. This can take several minutes; it is important to wait until Windows reports that the device is ready for use. With the controller connected to 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!). | ||
Now | Now start the GUI executable matching the controller's firmware version and select the COM port assigned to the USB device in the {{GUI|Port}} dropdown box at the bottom left. If you are unsure about the correct COM port, then unplug the USB cable, click on 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 {{GUI|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 status messages and a final "Read...DONE!" text. | Once the proper COM port is selected, the first thing is to hit the {{GUI|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 status messages and a final "Read...DONE!" text. |
Revision as of 08:13, 15 July 2014
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...
Dos and Don'ts
The STorM32-BGC is an electronic device.
This should have said it all, yet some specific don'ts:
- Don't get any parts of the board into contact with the (plus pole of the) battery, this will immediately destroy the board.
- The voltage on the POT and BUT pins must not exceed 3.3 V, else the board will be immediately destroyed.
- The voltage on any of the other pins must not exceed 5 V, else the board will be immediately destroyed.
- The 3.3 V pins on the board should only be used as supply. Do not apply voltage to a 3.3 V pin. Do not connect a 3.3 V pin to a GND pin.
- Do not use metal screws to mount the board. This can lead to short circuits. At the very least use plastic washers.
- The motor drivers are not short-circuit protected. It is recommended for new/unknown motors to measure the resistances of the motor phases and to the motor housing before the they are connected to the board.
Parts Checklist
- 1x STorM32-BGC
- 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
- latest firmware and GUI, Downloads
- 1x USB to serial adapter + 4 dupont 2.54 mm cables (necessary for firmware update or first flashing)
- 1x joystick + 5 dupont 2.54 mm cables (OPTIONAL)
- 1x IR led + 2 dupont 2.54 mm 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. In addition, the MPU module should be mounted rigidly, preferably to the camera support. Please note: 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:
- MPU module - without a MPU module connected to the I2C port the controller will show errors and won't power up the motors.
- Motors - Mot0 and Mot1 are for the Pitch and Roll motors (or vice versa, this can be configured in the GUI), and Mot2 for the Yaw motor. The order of the three pins of each motor is irrelevant (the motor directions can be configured in the GUI).
- USB port - connect it to a computer for setup and debugging purposes.
- Battery - 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.
First Configuration
It is assumed that a firmware was uploaded to the controller before (for uploading firmware see How to flash firmware). At the first-time connection of the controller to the computer via USB, Windows will search for the USB driver and install it. This can take several minutes; it is important to wait until Windows reports that the device is ready for use. With the controller connected to 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!).
Now start the GUI executable matching the controller's firmware version and select the COM port assigned to the USB device in the [GUI:Port] dropdown box at the bottom left. If you are unsure about the correct COM port, then unplug the USB cable, click on 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 [GUI: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 status messages and a final "Read...DONE!" text.
Now it's time to set the most important parameters, namely the IMU orientation and motor parameter values. Without that the controller can't perform even the basic operations.
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 [GUI: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 (when the board is powered by USB only the motors are shut off and won't work).
IMU Orientation
The tab called [GUI: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 usually an arrow printed on it for the x axis. If not, you may use the little dot marker on the IMU chip as reference (see the Appendix below). Now hold the gimbal and camera in front of you, as if you would be taking a picture. "Up" refers to the top of the camera, "forward" to its front with the lense, and "right" to the right-hand side of the camera. The questions to answer in the IMU orientation dialog are where the z axis and x arrow point to.
The IMU's z axis points outwards of the surface of the IMU chip, i.e., comes straight out of the IMU board. In the example below, as the IMU board is mounted upside down, it points downwards the camera, so you specify the [GUI: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 [GUI:x axis points] "forward". The little graphic on the right displays your setting, i.e., the IMU's x-y-z axes with respect to the camera's up-right-forward orientations.
To send these setting to the board click on the [GUI:Write] button. In order to make the changes permanent, the menu option [GUI:Store to EEPROM] can be used. Alternatively, click on the check box next to the [GUI:Write] button, which causes the button label to change to [GUI:Write+Store], and hit the button. Both methods are fine.
Please note that the [GUI: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 [GUI:Imu Orientation] parameter field located on the [GUI: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 has not changed.
Checking the IMU Orientation
In order to ensure a correct IMU Orientation you should test it. Write the setting to the controller (temporarily or into the EEPROM) and then click on the [GUI: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 [GUI:Start] in the window.
As the motors are (hopefully) disabled still, you can move the camera by hand. The following behavior must be observed:
- When you tilt the camera downwards (lens points to the ground), the Pitch value has to get more positive (the red line in the middle panel of the Data Display has to move upwards).
- When you roll the camera like in flying a right turn (clockwise when standing behind the camera), the Roll value has to get more positive (the green line in the middle panel of the Data Display has to move upwards).
- When you rotate the camera around the yaw axis anti-clock wise, the Yaw value hast to get more positive (the blue line in the middle panel of the Data Display has to move upwards).
If you do not observe that, then go back and repeat the IMU orientation setting.
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 orientation 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.
Motor Settings
For the motor settings there is a separate tab as well, the [GUI: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 [GUI:Gimbal Setup] tab are properly set, and you are ready to go!
Next step - PID Tuning
Once you have completed the above steps, the motors can be turned on. Check in the [GUI:Expert] tab that the [GUI:Pitch Usage], [GUI:Roll Usage] and [GUI:Yaw Usage] parameter fields are all set to "normal" (the default is "disabled"). If not, set them to "normal" (or click on [GUI:Enable all Motors]) and write and store the changed setting.
Comment: If you are using the STorM32-BGC for a 2 axis gimbal, set [GUI:Yaw Usage] to "disabled" (and set all Yaw related PID values to zero).
Now connect a battery to the controller (it is assumed that you did follow the 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 indicates that the PID values in the [GUI:Main] tab are not proper.
See the PID parameter Tuning Guide for adjusting those.