STorM32-NT, getting rid of I2C errors, and other cool advantages … see here 🙂
T-STorM32, encoders for the STorM32 … see here 🙂
I present here the STorM32 project. It is a controller for brushless gimbals with 3 axes, and is based on a STM32 32-bit microcontroller.
The project actually consists of three parts, the STorM32 controller board, the firmware o323BGC for this board, and the Windows GUI o323BGCTool:
(open source, see here)
(free, see here) (free as in free beer, and not only as in freedom)
(open source, see here)
(by sepper, see here, VonOben.tv)
(by GekoCH, QuadCam.ch)
- 17. Mai 2020: Firmware v2.53 released
- 20. April 2020: Firmware v2.52 released
- 8. August 2018: Firmware v2.40 released
- 11. Nov. 2017: STorM32 v3.3 main board and NT Motor Module v2.5E released, for T-STorM32
- 30. July 2017: Firmware v2.30 released
- 9. Mar. 2017: T-STorM32 Motor Module v2.4E released, for encoders
- 12. Jan. 2017: New board STorM32 v2.4 released, specifically designed for NT
- 30. Dez. 2016: Firmware v2.20 released
- 12. Apr. 2016: Firmware v2.03 released
- 30. Mar. 2016: Firmware v2.01 released
19. Mar. 2016: Firmware v0.96 released
Note: This will be the last version which includes both the I2C and NT firmware branches (see also here).
- 10. Jan. 2016: Firmware v0.90 released
- 13. June. 2015: Firmware v0.80 released
- 5. Apr. 2015: Firmware v0.70 released
- 28. Mar. 2015: Firmware v0.68 released
- 28. Nov. 2014: Firmware v0.56 released
- 10. Okt. 2014: Firmware v0.51 released
- 1. Okt. 2014: Firmware v0.46 released
- 19. June. 2014: Firmware v0.33 released
- 28. Mai. 2014: Firmware v0.31 released
- 21. Mar. 2014: New board STorM32 v1.3 released (this will now really be the „final one“ for quite a while)
- 20. Mar. 2014: Firmware v0.25 released
- 20. Feb. 2014: Wiki created for documentation: http://www.olliw.eu/storm32bgc-wiki
- 19. Feb. 2014: The new board STorM32 v1.2 has arrived today, and it is working absolutely perfect! 🙂
- 6. Feb. 2014: Development goes on, new board STorM32 v1.2 ordered
- 11. Jan. 2014: Board STorM32C v1.1 works!
- 2. Dez. 2013: GitHub Repository created: https://github.com/olliw42/storm32bgc
- 26. Nov. 2013: Bluetooth module HC06 installed, works as expected, Windows GUI augmented by an auto-configuration utility
- 21. Nov. 2013: Take off, the first batch of print boards STorM32C v0.17 has arrived
- STorM32-BGC wiki
- Discussion thread at rcgroups
- Github repository
- Where to buy STorM32 boards
(Test setup using a micro gimbal and STorM32 v0.17 controller board, and first demo video using this setup)
(Demo video showing the advantages of a 2nd IMU.)
Selected User videos
I am pleased that Martinez agreed to do the layout of the (first, v0.17) STorM32 board. I was also ‚allowed‘ to move around some wires, but the hard part of the routing was done totally by him, and he indeed did a fantastic job!
A special thanks goes to hexakopter/Dario, for his endless hours of testing.
I also want to thank various individuals for support in different ways: erickwesz, KingDaKa, Marc, yang/wdaehn, careyer&TheBlindHawks, Greg Covey, fpvberlin, GekoCH.
I. STorM32 BGC: Concept
The board was designed to serve „larger duties“. Hardware-wise the STorM32 controller provides these, partially innovative, features (for the current version v1.3):
Processor: 32-bit microcontroller STM32F103RC or STM32F103RB or STM32F405RG
The board has been designed to accomodate the 32 bit microcontrollers STM32F103RC or STM32F103RB, which run at 72 Mhz, as well as STM32F405RG, which runs at 168 MHz and in addition provides a floating point unit. Currently the STM32F103RC is recommended.
Motor drivers: TC4452
The TC4452 drivers are actually designed as Mosfet drivers, but it turned out that they are also well suited for our purposes. They allow for a maximum voltage of 18 V, and hence operation at up to 4 S. The data sheet specifies a maximum current of 13 A peak and 2.6 A continuous per motor phase, but that’s unrealistic (heat!). A realistic maximal value is 1.5 A per motor (for DFN8 packages); fortunately more is rarely needed. The disadvantage of the drivers is its limitation to 18 V or 4 S. The great advantage however is its – in comparison to discrete drivers – high fault tolerance (or, as it is expressed so nicely in the data sheet: „These devices are essentially immune to any form of upset.“).
Interfaces: USB, UART, and Bluetooth
The board provides a USB port, which shows up as virtual com port on the PC. It also provides the usual serial UART port (a USB-TTL adapter is needed to connect to a PC). In addition, the board can be equipped with a HC06 bluetooth module hence providing wireless connection (which is cool!).
Ports: PWM, Sum-PPM, Spektrum, Futaba S-Bus, IR Led, Joystick, Button, AUX
The board provides 7 ports (3 ports with STM32F103RB), which can be used as inputs or outputs for RC signals (PWM/Sum-PPM). These ports are 5 V tolerant. A Spektrum satellite as well as the Futaba S-bus is supported. In addition 3 further ports (7 ports with STM32F103RB) are available as general inputs/outputs (they too are 5 V tolerant). The board also provides 3 analog-digital converter inputs (3.3 V maximal), to connect e.g. a joystick. A further port is offered for connecting a button. Finally, one port is available for connecting a IR led.
The motor drivers, the usage of the microcontroller ports, and the voltage supply are designed for a safe operation, inclusive a reverse voltage protection. Furthermore, a voltage devider is integrated for measuring the battery voltage; in case of e.g. too low voltage the motor drivers are shut down.
On-board 6DOF IMU
The STorM32 controller has a separate 6DOF IMU chip MPU6050 integrated on the board. Alternatively a second IMU can be connected to an additional I2C port. This should allow for exciting novel features in the future.
TERMS OF USAGE
The STorM32-BGC board is open source hardware, under the terms of the TAPR Open Hardware License as published by the Free Hardware Foundation, see http://www.tapr.org/ohl.html. The Eagle and Gerber files can be downloaded below. The TAPR licence explicitely permits a commercial use, with some (easily accomplished) conditions, such as e.g. that copyright logos are not removed. The firmwares/softwares are subject to the licences/terms of usages given below.
STM32F103RB, STM32F103RC, STM32F405RG, TC4452, MPU6050, HC06, HM10
II. STorM32 BGC: Board v3.3
This board was specifically designed for NT and T-STorM32!
● processor: STM32F103RC at 72 MHz
● no motor drivers on-board, for use with NT motor modules
● on-board 6DOF IMU (MPU9250 or ICM20602), SPI
● low-noise 5 V, 0.6 A switching regulator, providing plenty of „juice“ for powering the NT bus
● 2 NT ports and 1 NT-X port
● CAN port for CAN bus communcation
● ESP port for connecting a ESP8266 Wifi module
● Futaba S-Bus
● Spektrum satellite support (no extra port)
● up to 4 PWM/Sum-PPM inputs/outputs
● joystick for two axes
● 2 auxiliary ports
● BUT port
● voltage: 6 – 27 V or 2 – 6 S
● motor current: depends on used NT motor modules
● dimensions: 40 x 25 mm2, holes Ø3 mm, distance 35 mm
● weigth: ca 6 g
Electric scheme and board layout
- board specifically designed for NT and T-STorM32
- motor drivers removed
- low-noise 5 V, 0.6 A switching regulator
- Arrangement of UART and RC ports optimized
- CAN port, for communication via CAN bus
- ESP port for connecting a ESP8266 Wifi module
- board size 40 mm x 25 mm
- board specifically designed for NT (This board has been deprecated!)
- only yaw motor drivers on board
- 3 NT plugs to make it easy to connect several NT modules
- NT-X plug carrying also the battery voltage
- 5 V power rail on the NT bus, with sufficient „juice“
- Rx&Tx on NT bus swapped, to avoid cable crossing to connect with NT modules
- support of stacking with a „high-power“ extension board
- MPU9250 on board, spi (no i2c anymore!)
- uart1 for UART port, to simplify firmware update procedure
- additional UART#2 port for future purposes
- no BOOT0 button, smaller RESET button
- not all ports routed, but kept those which are most important
- 0402 size parts
- board size as small as I could get it with a 2 layer design: 40 mm x 25 mm
- mounting holes, 3 mm diameter, 35 mm apart
- voltage regulator in DPak/TO-252 package
- AUX2 instead of 3.3V pin at AUX port
- solder jumper to disconnect bluetooth led
- values of resistors R12, R13, R22 changed (not critical)
- cream pad added to DFN packages
- silk for DFN packages a bit imporved
- value of R11 changed to 1.5k
- minor errors in v1.1 corrected (order of pins of I2C#2 connector reversed, SWD port labelling corrected, stop mask added to big battery solder holes)
- USB disconnect pin network changed (as suggested by ala42, THANKS)
- XOR gate added to RC-0 pin to support Futaba S bus
- Spektrum satellite port added
- „cooling pad“ for LDO added
- reinserted Vbat reverse voltage protection diode as in v0.17, using smaller diodes though
- all parts named/valued properly to produce a good BOM
- further smaller changes in the scheme and layout
- reverse voltage protection using p channel fet (SOIC8)
- large solder pads and holes for battery connection
- layout allows using TC4452 motor drivers in DFN package
- I2C#2 connector
- high-side open collector (pnp) port for driving a IR led
- sequence of pins changed for the RC and SWD ports
- further smaller changes in the scheme and layout
III. Firmware o323BGC
For how to use the firmware see the STorM32-BGC wiki. Here only some technical infos are given.
To the best of my knowledge the o323BGC firmware/STorM32-BGC board is the only functional free/open source 3-axis gimbal controller providing these features:
Firmware features (v0.46):
- unique* 2nd IMU support, either on-board or external, for extended angle range, enhanced precision, and ultimative stability even in the pan modes
- unique* adaptive acceleration correction to minimize horizon drift in high-g maneuvers
- this is one of the best features: the motor direction is determined automatically… this removes quite a lot of issues in setting up the gimbal, in particular of the yaw axis
- the IMU/MPU6050 module can be mounted in any of the 24 possible orientations, the GUI makes setting this up very simple
- bluetooth: the firmware together with the GUI provides an auto configuration tool for a one-click setup of the optional on-board bluetooth module
- battery voltage measurement: it is used for a lipo saver function (I wouldn’t want to be without that anymore!) and an automatic voltage drop compensation feature of the PID controller
- pan/follow mode for each axis; the mode can be choosen individually, and it can be changed any time („during a shoot“)
- camera orientation can be controlled by external rc signals (PWM, sum-PPM) and/or a joystick in all three axes
- external control of camera orientation can be adjusted precisely, speed limits as well as acceleration limits can be set
- IR led remote control of camera: shutter, shutter delayed, video on/off, time sequences
- Mavlink-type commands for a remote control of the camera by e.g. an app
- the startup procedure includes a dedicated no-oscillation detection scheme, is crucial for a good gyro calibration in particular of the yaw axis (minimizes drift in the yaw axis)
- quaternion based IMU algorithm (Mahony type), with unique* mechanism for suppresing the drift in the yaw axis without magnetometer
* „unique“ means that the developped algorithm is not found in any other DIY/open source project, and provides advanced perfomance.
Motor PWM frequency: 23.4 kHz
The STM32 allows to choose the motor PWM frequency freely in a relatively large range. I have choosen 23.4 kHz. This corresponds to a resolution of the PWM signal of about 10.5 bits.
Control frequency: 0.67 kHz
The main loop is repeated every 1.5 ms.
Angular resolution: 10 bits
This number depends to some extend on how it is exactly calculated. In comparison to 8 bit BGC boards the angular resolution is however significantly larger.
TERMS OF USAGE
The o323BGC firmware is free (but not open source). Besides unlimited private use you are also granted the permission to use it for commercial purposes under the condition that (1) you don’t modify the firmware, e.g. remove or change copyright statements, (2) provide it for free, i.e. don’t charge any explicit or implicit fees to your customers, and (3) correctly and clearly cite the origin of the firmware and the project web page in any product documentation or web page.
IV. Windows GUI o323BGCTool
For the description of the Windows GUI o323BGCTool see the STorM32-BGC wiki. Here just some „teaser“ screenshots of a preliminary version are shown to indicate the rich set of features:
TERMS OF USAGE
The o323BGCTool software is open source (but see below). Besides unlimited private use you are also granted the permission to use it for commercial purposes under the condition that (1) you don’t modify the software, e.g. remove or change copyright statements, (2) provide it for free, i.e. don’t charge any explicit or implicit fees to your customers, and (3) correctly and clearly cite the origin of the firmwares and the project web page in any product documentation or web page. The GUI software is based on libraries, which I am using since nearly 10 years and which I have modified over time in several places I can’t remember anymore. Furthermore, it is written in Perl using Win32::Gui, which is not maintained anymore. It would take me an enormous effort to build a working distribution. I hence don’t publish the complete code but just the „master“ perl source file, which however contains all relevant code.
The files are also available at the GitHub repository https://github.com/olliw42/storm32bgc.
Visit post #1 in the rcgroups thread to check for potential beta releases.
Please read also the release notes for the respective firmware linked to in this thread, to learn about known bugs.
STorM32 Eagle and Gerber files
Please go to the GitHub Repository: https://github.com/olliw42/storm32bgc
PLEASE READ THIS FIRST
There are 2 types of IMU modules which the v1.x STorM32 controllers can use, NT IMUs and I2C IMUs, and there are 2 firmwares which correspond to each type. It is important to choose the correct firmware, otherwise your controller and gimbal will not work. Read this page to understand the difference .
Since firmware version v0.96, the I2C IMU and NT IMU firmware branches have been split, see . Firmwares with version numbers v2.xx refer to the NT branch, not usable for setups with I2C camera IMU.
o323BGC firmware and o323BGCTool files, v2.xx firmware for NT IMUs
o323bgc-release-v253-v20200517 [.zip] (12.2MB)
o323bgc-release-v240-v20180807 [.zip] (11.0MB)
o323bgc-release-v230-v20170803 [.zip] (10.3MB)
o323bgc-release-v220-v20161230 [.zip] (10.1MB)
o323bgc-release-v203-v20160412 [.zip] (8.6MB)
o323bgc-release-v201-v20160330 [.zip] (8.6MB)
For beta releases see the wiki download page or the github repository.
ntloggertool-release-v041-v20180609 [.zip] (230MB)
ntloggertool-release-v040-v20180225 [.zip] (130MB)
ntloggertool-release-v039-v20170318 [.zip] (156MB) NTLoggerTool v0.39 [.msi] (156MB)
ntloggertool-release-v037-v20161230 [.zip] (156MB) NTLoggerTool v0.37 [.msi] (156MB)
ntloggertool-release-v030-v20160416 [.zip] (155MB)
ntloggertool-release-v029-v20160412 [.zip] (155MB)
ntloggertool-release-v026-v20160401 [.zip] (154MB)
o323BGC firmware and o323BGCTool files, v0.xx firmware for I2C IMUs
o323bgc-release-v096-v20160319 [.zip] (9.4MB)
o323bgc-release-v090-v20160110 [.zip] (10.1MB)
o323bgc-release-v080-v20150613 [.zip] (8.5MB)
o323bgc-release-v070-v20150405 [.zip] (8.6MB)
o323bgc-release-v068-v20150328 [.zip] (8.4MB)
o323bgc-release-v056-v20141128 [.zip] (6.6MB)
o323bgc-release-v051-v20141010 [.zip] (4.8MB)
o323bgc-release-v046-v20141001 [.zip] (4.6MB)
o323bgc-release-v033-v20140619 [.zip] (4.9MB)
o323bgc-release-v031-v20140528 [.zip] (4.7MB)
o323bgc-release-v029-v20140518 [.zip] (4.5MB)
o323bgc-release-v028-v20140511 [.zip] (4.3MB)
o323bgc-release-v025-v20140320 [.zip] (4.2MB)
o323bgc-release-v024-v20140316 [.zip] (16.0MB)
o323bgc-v20140122 [.zip] (3.1MB)
o323bgc-v20140117 [.zip] (2.9MB)
Pingback: HAKRC Storm 32 Gimbal - www.drohnen-einsteiger.de