STorM32 FAQ: Difference between revisions

From STorM32-BGC Wiki V1
Jump to navigation Jump to search
No edit summary
No edit summary
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''This is the "old" STorM32-BGC documentation, for I2C-IMU firmware versions (versions up to v0.96).''
== Electronics ==
== Electronics ==
==== What are the differences between the boards? ====
For a comparison of v1.3 and v1.31 boards see this post on rcgroups: [http://www.rcgroups.com/forums/showpost.php?p=30438164&postcount=2949 #2949]. The v1.1 is essentially identical to the v1.3 board, except of some minor details. For more info on the technical details of the boards see [[Boards]].


==== Which MPU modules do work with the board? ====
==== Which MPU modules do work with the board? ====
Line 13: Line 19:
The connectors for the MPU modules on the STorM32-BGC board are [http://www.molex.com/molex/products/family?key=picoblade&channel=products&chanName=family&pageTitle=Introduction Molex picoblade] types with 1.25 mm pitch (for a comparison of various connectors see [http://www.rcgroups.com/forums/showthread.php?t=1493712 here]). They are also known as micro JST 1.25 mm, and it is in fact best to search for this, e.g. on ebay: [http://www.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.H0.Xmicro+jst+1.25&_nkw=micro+jst+1.25&_sacat=0&_from=R40 micro jst 1.25].
The connectors for the MPU modules on the STorM32-BGC board are [http://www.molex.com/molex/products/family?key=picoblade&channel=products&chanName=family&pageTitle=Introduction Molex picoblade] types with 1.25 mm pitch (for a comparison of various connectors see [http://www.rcgroups.com/forums/showthread.php?t=1493712 here]). They are also known as micro JST 1.25 mm, and it is in fact best to search for this, e.g. on ebay: [http://www.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR0.TRC0.H0.Xmicro+jst+1.25&_nkw=micro+jst+1.25&_sacat=0&_from=R40 micro jst 1.25].


==== What about the magnetometer support? ====
==== Will my motors work with my STorM32 board? ====
 
Even after more of a year that this project is running, the question which motors will work with which boards is still not fully clear. Especially for larger motors essentially no reports or tests exist. The v1.1/v1.2/v1.3 type of boards, which use TC4452 motor drivers, need to be distinguished from the v1.31 board, which uses DRV8313 drivers:
 
'''''v1.1/v1.2/v1.3 boards:''''' Motors with resistances of 12 Ohm or larger have been tested to be well handled at 4S, motors with 10 Ohm may be handled with care; for the latest summary see [http://www.rcgroups.com/forums/showpost.php?p=30564101&postcount=3166 here] (for details see also [//www.rcgroups.com/forums/showthread.php?t=2055844&page=2&pp=50#post27515444 here], [//www.rcgroups.com/forums/showthread.php?t=2055844&page=15&pp=50#post28578479 here], [http://www.rcgroups.com/forums/showpost.php?p=28825482&postcount=947 here] and [http://www.rcgroups.com/forums/showpost.php?p=28852888&postcount=953 here])''.
 
'''''v1.31 board:''''' As it uses the same motor driver as the "original" 32-bit AlexMos/BaseCam gimbal controller board, it can be assumed that it works also for all motors/setups for which the BaseCam board works.
 
==== Which USB-TTL should I use? ====
 
The situation with the USB-TTL adapters is a bit delicate, because of the number of types around, and because improper wording has become widely used practice. For instance, "FTDI adapter", "serial adapter", "TTL adapter", "RS232 adapter", and so on, may or may not mean one and the same thing. So, first some explanations (or skip to the end for the conclusions). Two points need to be realized:
 
* Logical levels: Three types are around, namely RS232, RS232 at 5V level, and UART. The original RS232, as it was used by the "historical" serial bus on PCs, works with +-15V levels, with -15V representing logical 0. For many cases it was more convenient to narrow the voltage range to 0 .. 5V, so that 0V or LOW represents logic 0. UART is the serial unit found in micro-controllers, and it works with voltages of 0 ... 3.3/5V, but - importantly - logic 0 is represented by 3.3V/5V or HIGH. That is, the logic is inverted with respect to RS232, and obviously both are incompatible. This gives rise to many confusions. E.g., since both 5V-RS232 and UART formally work with TTL levels (or something like it), both were and are called "TTL adapters". Also, since all three are serial protocols all three were and are called "serial adapters". Nowadays it seems that a kind of consensus has been reach at least as much as that "TTL" in most cases means UART logical levels (but you got the sense, you cannot count on that). In this wiki we will use "USB-TTL adapter" to denote a UART/microcontroller compatible adapter.
 
* Chip set: Different chip sets by different companies are around to accomplish essentially the same task. For instance, FTDI is such a company, which produces e.g. the FT232RL chip set which uses UART logical levels. Unfortunately, it has become custom to just call any USB serial adapter a FTDI adapter, even if it uses a chip set from e.g. SILABS, and sometimes even if it doesn't use TTL levels but RS232-type levels.
 
After that introduction, the real beef. Currently, four chip sets are around: FT232RL or similar by FTDI, CP2102 by SILABS, CH340 by WCH, PL2303HX by PROLIFIC (more may exist but these are most relevant). My '''''personal''''' (!) account of them is this as follows:


In version 0.51.2e magnetometer is not jet supported: http://www.rcgroups.com/forums/showpost.php?p=29756073&postcount=2062
* '''''FT232RL - FTDI''''': My favorite. According to web reports there is a slight chance to get a fake, but the real chip just works flawlessly without any issues, and fakes can be avoided by buying from trusted sources. In addition, this set allows to baudrates of 2000000 bps, as needed for the STorM32 NT concept, out of the box without any further configuration.
If a mag-imu is connected as main imu on the camera, mag will not be detected:


v... v0.51
* '''''CP2102 - SILABS''''': There used to be issues with drivers, but this seems to have been overcome since a while, which makes this chip set a reliable and solid choice. However, it doesn't support a baudrate of 2000000 bps as needed for the STorM32 NT concept out of the box, but can be configured to do so via some dedicated configuration software.  


s... ok
* '''''CH340 - WCH''''': The driver is not auto-installed by Win. I myself stopped here, but once the correct driver is installed it is reported to be a viable choice. It is also reported to work with 2000000 bps as needed for the STorM32 NT concept out of the box.


IMU is PRESENT @ LOW ADR
* '''''PL2303HX - PROLIFIC''''': I had one PLxxxx adapter, and it didn't provide TTL but RS232-type signals. However, some web reports using some PLxxxx report using it for microcontroller applications. The data sheet for these chips, including the PL2303HX, I find unclear in this point. So, the bottom line, I find the situation for these chips quite confusing, and thus simply stay away from them, as there are alternatives.


IMU2 is PRESENT @ LOW ADR = external IMU
'''''Conclusion:''' For flashing the main STorM32 controller board USB adapters with either FTDI, CH340, or CP2102 chip sets can be used without issues, while for flashing NT modules only FTDI and CH340 adapters work out of the box. CP2102 adapters need some configuration to handle the high baudrate of the NT bus, see [[How to configure CP2102 USB adapters for high baud rates]]. USB adapters with PL2303 chips NEVER work since they don't provide TTL levels.''


MAG is not available
==== What about the magnetometer support? ====


STATE is NORMAL
A magnetometer is not yet supported: http://www.rcgroups.com/forums/showpost.php?p=29756073&postcount=2062
If a mag-imu is connected as main imu on the camera, mag will not be detected:
v... v0.51
s... ok
IMU is PRESENT @ LOW ADR
IMU2 is PRESENT @ LOW ADR = external IMU
MAG is not available
STATE is NORMAL


== Software and GUI ==
== Software and GUI ==
Line 38: Line 66:
{{GUI|Write}} writes the values of the GUI to the board and makes them effective immediately. The changes last until the board is reset or powered down.
{{GUI|Write}} writes the values of the GUI to the board and makes them effective immediately. The changes last until the board is reset or powered down.


{{GUI|Store}} makes that the board stores its current values into the EEProm so that they become permanent. The settings stored in the EEprom will be used at power up.
{{GUI|Store}} makes that the board stores its current values into the EEPROM so that they become permanent. The settings stored in the EEPROM will be used at power up.


{{GUI|Write+Store}} does first a Write and then a Store.
{{GUI|Write+Store}} does first a Write and then a Store.


==== Storing the parameter values to the EEPROM doesn't seem to work ====
Thus: With the {{GUI|Write}} button, all parameter values are copied to the board, and become effective immediately. They are however not stored permanently in the EEPROM, i.e., changes will be lost after a power down. To store changes permanently do a {{GUI|Write+Store}}, e.g., by clicking the check box next to the {{GUI|Write}} button which turns it into a {{GUI|Write+Store}} button.
 
==== How to enter precise parameter values? ====


Please double-check that the correct firmware for your board has been flashed. The problem typically happens then e.g. the firmware for a F103RB is flashed onto a board with a F103RC.
The o323BGCTool GUI doesn't allow to enter values in the text fields directly. The sliders can be moved using the mouse, or via the up/down keys when selected. The later allows precise adjustment of the values.


==== Which drivers are needed for the USB? ====
==== Which drivers are needed for the USB? ====


On Win7 the driver is usually installed automatically (this may take few minutes, be patient). The driver, usable also for WinXP, can also be obtained from [http://www.st.com/web/en/catalog/tools/FM146/CL1984/SC724/SS1677/PF251168 here].
On Win7 the driver is usually installed automatically. This may take some minutes, be patient! It is important to wait until Win7 has finished the install before doing anything else. The correct Virtual Com Port (VCP) driver, usable also for WinXP and Win8/8.1, can be obtained from the  [http://www.st.com/web/en/catalog/tools/PF257938 STM download page]. {{COMMENT| It is crucial to follow the instructions in the readme.txt file, otherwise it won't work!}}.


==== Flashing with the usb-ttl adapter produces Windows error messages ====
==== Storing the parameter values to the EEPROM doesn't seem to work ====
 
Please double-check that the correct firmware for your board has been flashed. The problem typically happens then e.g. the firmware for a F103RB is flashed onto a board with a F103RC.
 
==== Flashing with the USB-TTL adapter produces Windows error messages ====


If upon flashing you get Windows errors such as mfc110.dll is missing, msvcr110.dll is missing, or application was unable to start correctly (0xc000007b), then first check that you're not using an outdated GUI version. Otherwise, you need to install the VC++ runtime libraries. Download vcredist_x64.exe or vcredist_x86.exe depending on your Win system from [//www.microsoft.com/en-us/download/details.aspx?id=30679 here], and run the exe file.
If upon flashing you get Windows errors such as mfc110.dll is missing, msvcr110.dll is missing, or application was unable to start correctly (0xc000007b), then first check that you're not using an outdated GUI version. Otherwise, you need to install the VC++ runtime libraries. Download vcredist_x64.exe or vcredist_x86.exe depending on your Win system from [//www.microsoft.com/en-us/download/details.aspx?id=30679 here], and run the exe file.
Line 60: Line 94:
In principle no, one can mount it wherever it is most convenient (of course as long as it tracks the camera motion). Some folks have however reported that the performance can depend on where the IMU sensor is mounted, depending on the specific gimbal some places seem to be better, i.e. allow e.g high PID values, than others. So, it may need experimenting.
In principle no, one can mount it wherever it is most convenient (of course as long as it tracks the camera motion). Some folks have however reported that the performance can depend on where the IMU sensor is mounted, depending on the specific gimbal some places seem to be better, i.e. allow e.g high PID values, than others. So, it may need experimenting.


==== Where should the main board be mounted for correct use of the second IMU? ====
==== In which orientation should the IMU(s) be mounted? ====
 
The second imu must be mounted on the "gimbal support" above the yaw motor so it is not moved by any of the motors. It must not be mounted on one of the axis's. So you can either mount the gimbal mainboard above the yaw motor using the onboard imu, or put the mainboard somewhere else (on yaw axis for example) and mount an external imu2 above the yaw motor.


The onboard mpu6050 imu is connected to the imu2 connector internally and is set to a non default i2c adress. If you connect an external imu to imu2 connector it can be recognised by its default i2c adress. So you don't have to change anything in gui, external imu is used automatically when connected.
The IMU can be placed in any position provided it is parallel with the vertical and horizontal axis of the camera. In the GUI, under {{GUI|Gimbal Configuration Tab}}, click on the {{GUI|Configure Gimbal Tool}} button. This will produce a pop up window with instructions to follow for the controller to automatically determine IMU orientation. When it says to tilt 45 degrees, tilt the entire gimbal, including the camera; don't rotate the pitch mechanism to 45 degrees. If you are doing it wrong, the procedure will time out. Once an attitude of about 45 degrees is met, the software will recognize the position, then you can continue.


Activate imu2 in Gimbal Setup -> Imu2 configuration:
==== Where should the main board be mounted for correct use of the second IMU? ====
* "gimbal support": activate imu2 above the yaw motor.
* "gimbal support xy": activate imu2 above the yaw motor rotated by 45°.
* "yaw bracket", "yaw bracket xy": do not use it, it iy buggy. (not availible in 0.51.2e)
 
The calibration of imu2 works similar to the main imu. But for imu2 it's not critical to get the most accurate calibration, and a good 1-point calibration is enough.


http://static.rcgroups.net/forums/attachments/1/4/2/1/a7119019-20-stom32-bgc-2nd-imu-configurations-01.jpg
See [[Using a 2nd IMU]].

Latest revision as of 18:20, 21 June 2019

This is the "old" STorM32-BGC documentation, for I2C-IMU firmware versions (versions up to v0.96).

Electronics

What are the differences between the boards?

For a comparison of v1.3 and v1.31 boards see this post on rcgroups: #2949. The v1.1 is essentially identical to the v1.3 board, except of some minor details. For more info on the technical details of the boards see Boards.

Which MPU modules do work with the board?

According to current experience any MPU module works fine with the STorM32-BGC board.

Specifically this includes the GY-521 module. However, also the xoodee module and even the GY-86 10DOF module have been in use.

A comment on the supply voltage. The STorM32-BGC works internally with a voltage of 3.3 V. Accordingly, it also provides only 3.3 V at its I2C and I2C#2 ports, to which external MPU modules and breakout boards are connected. Most of the available MPU modules/breakout boards are however "Arduino compatible", which means that they have a 5 V pin and can be supplied with voltages of 5 V and higher, thanks to a voltage regulator on the module. The question arises if these MPU modules do also work with the 3.3 V provided by the STorM32-BGC. The answer is that so far no issues have been reported with using them.

What connectors are used for connecting the MPU modules to the board?

The connectors for the MPU modules on the STorM32-BGC board are Molex picoblade types with 1.25 mm pitch (for a comparison of various connectors see here). They are also known as micro JST 1.25 mm, and it is in fact best to search for this, e.g. on ebay: micro jst 1.25.

Will my motors work with my STorM32 board?

Even after more of a year that this project is running, the question which motors will work with which boards is still not fully clear. Especially for larger motors essentially no reports or tests exist. The v1.1/v1.2/v1.3 type of boards, which use TC4452 motor drivers, need to be distinguished from the v1.31 board, which uses DRV8313 drivers:

v1.1/v1.2/v1.3 boards: Motors with resistances of 12 Ohm or larger have been tested to be well handled at 4S, motors with 10 Ohm may be handled with care; for the latest summary see here (for details see also here, here, here and here).

v1.31 board: As it uses the same motor driver as the "original" 32-bit AlexMos/BaseCam gimbal controller board, it can be assumed that it works also for all motors/setups for which the BaseCam board works.

Which USB-TTL should I use?

The situation with the USB-TTL adapters is a bit delicate, because of the number of types around, and because improper wording has become widely used practice. For instance, "FTDI adapter", "serial adapter", "TTL adapter", "RS232 adapter", and so on, may or may not mean one and the same thing. So, first some explanations (or skip to the end for the conclusions). Two points need to be realized:

  • Logical levels: Three types are around, namely RS232, RS232 at 5V level, and UART. The original RS232, as it was used by the "historical" serial bus on PCs, works with +-15V levels, with -15V representing logical 0. For many cases it was more convenient to narrow the voltage range to 0 .. 5V, so that 0V or LOW represents logic 0. UART is the serial unit found in micro-controllers, and it works with voltages of 0 ... 3.3/5V, but - importantly - logic 0 is represented by 3.3V/5V or HIGH. That is, the logic is inverted with respect to RS232, and obviously both are incompatible. This gives rise to many confusions. E.g., since both 5V-RS232 and UART formally work with TTL levels (or something like it), both were and are called "TTL adapters". Also, since all three are serial protocols all three were and are called "serial adapters". Nowadays it seems that a kind of consensus has been reach at least as much as that "TTL" in most cases means UART logical levels (but you got the sense, you cannot count on that). In this wiki we will use "USB-TTL adapter" to denote a UART/microcontroller compatible adapter.
  • Chip set: Different chip sets by different companies are around to accomplish essentially the same task. For instance, FTDI is such a company, which produces e.g. the FT232RL chip set which uses UART logical levels. Unfortunately, it has become custom to just call any USB serial adapter a FTDI adapter, even if it uses a chip set from e.g. SILABS, and sometimes even if it doesn't use TTL levels but RS232-type levels.

After that introduction, the real beef. Currently, four chip sets are around: FT232RL or similar by FTDI, CP2102 by SILABS, CH340 by WCH, PL2303HX by PROLIFIC (more may exist but these are most relevant). My personal (!) account of them is this as follows:

  • FT232RL - FTDI: My favorite. According to web reports there is a slight chance to get a fake, but the real chip just works flawlessly without any issues, and fakes can be avoided by buying from trusted sources. In addition, this set allows to baudrates of 2000000 bps, as needed for the STorM32 NT concept, out of the box without any further configuration.
  • CP2102 - SILABS: There used to be issues with drivers, but this seems to have been overcome since a while, which makes this chip set a reliable and solid choice. However, it doesn't support a baudrate of 2000000 bps as needed for the STorM32 NT concept out of the box, but can be configured to do so via some dedicated configuration software.
  • CH340 - WCH: The driver is not auto-installed by Win. I myself stopped here, but once the correct driver is installed it is reported to be a viable choice. It is also reported to work with 2000000 bps as needed for the STorM32 NT concept out of the box.
  • PL2303HX - PROLIFIC: I had one PLxxxx adapter, and it didn't provide TTL but RS232-type signals. However, some web reports using some PLxxxx report using it for microcontroller applications. The data sheet for these chips, including the PL2303HX, I find unclear in this point. So, the bottom line, I find the situation for these chips quite confusing, and thus simply stay away from them, as there are alternatives.

Conclusion: For flashing the main STorM32 controller board USB adapters with either FTDI, CH340, or CP2102 chip sets can be used without issues, while for flashing NT modules only FTDI and CH340 adapters work out of the box. CP2102 adapters need some configuration to handle the high baudrate of the NT bus, see How to configure CP2102 USB adapters for high baud rates. USB adapters with PL2303 chips NEVER work since they don't provide TTL levels.

What about the magnetometer support?

A magnetometer is not yet supported: http://www.rcgroups.com/forums/showpost.php?p=29756073&postcount=2062 If a mag-imu is connected as main imu on the camera, mag will not be detected:

v... v0.51
s... ok
IMU is PRESENT @ LOW ADR
IMU2 is PRESENT @ LOW ADR = external IMU
MAG is not available
STATE is NORMAL

Software and GUI

How does Read, Write, and Store work?

[Read] reads the currently active settings from the board to the GUI.

[Write] writes the values of the GUI to the board and makes them effective immediately. The changes last until the board is reset or powered down.

[Store] makes that the board stores its current values into the EEPROM so that they become permanent. The settings stored in the EEPROM will be used at power up.

[Write+Store] does first a Write and then a Store.

Thus: With the [Write] button, all parameter values are copied to the board, and become effective immediately. They are however not stored permanently in the EEPROM, i.e., changes will be lost after a power down. To store changes permanently do a [Write+Store], e.g., by clicking the check box next to the [Write] button which turns it into a [Write+Store] button.

How to enter precise parameter values?

The o323BGCTool GUI doesn't allow to enter values in the text fields directly. The sliders can be moved using the mouse, or via the up/down keys when selected. The later allows precise adjustment of the values.

Which drivers are needed for the USB?

On Win7 the driver is usually installed automatically. This may take some minutes, be patient! It is important to wait until Win7 has finished the install before doing anything else. The correct Virtual Com Port (VCP) driver, usable also for WinXP and Win8/8.1, can be obtained from the STM download page. Comment: It is crucial to follow the instructions in the readme.txt file, otherwise it won't work!.

Storing the parameter values to the EEPROM doesn't seem to work

Please double-check that the correct firmware for your board has been flashed. The problem typically happens then e.g. the firmware for a F103RB is flashed onto a board with a F103RC.

Flashing with the USB-TTL adapter produces Windows error messages

If upon flashing you get Windows errors such as mfc110.dll is missing, msvcr110.dll is missing, or application was unable to start correctly (0xc000007b), then first check that you're not using an outdated GUI version. Otherwise, you need to install the VC++ runtime libraries. Download vcredist_x64.exe or vcredist_x86.exe depending on your Win system from here, and run the exe file.

Gimbal Construction

Does it matter where to install the camera IMU sensor?

In principle no, one can mount it wherever it is most convenient (of course as long as it tracks the camera motion). Some folks have however reported that the performance can depend on where the IMU sensor is mounted, depending on the specific gimbal some places seem to be better, i.e. allow e.g high PID values, than others. So, it may need experimenting.

In which orientation should the IMU(s) be mounted?

The IMU can be placed in any position provided it is parallel with the vertical and horizontal axis of the camera. In the GUI, under [Gimbal Configuration Tab], click on the [Configure Gimbal Tool] button. This will produce a pop up window with instructions to follow for the controller to automatically determine IMU orientation. When it says to tilt 45 degrees, tilt the entire gimbal, including the camera; don't rotate the pitch mechanism to 45 degrees. If you are doing it wrong, the procedure will time out. Once an attitude of about 45 degrees is met, the software will recognize the position, then you can continue.

Where should the main board be mounted for correct use of the second IMU?

See Using a 2nd IMU.