STorM32 BGC: 3-Axis STM32 Brushless Gimbal Controller

STorM32-NT, getting rid of I2C errors, and other cool advantages … see here :)

I present here the STorM32-BGC 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-BGC controller board, the firmware o323BGC for this board, and the Windows GUI o323BGCTool:

  • Controller Board STorM32-BGC
  • Firmware o323BGC
  • 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)

Strictly spoken, ‚STorM32-BGC‘ refers only to the hardware, but I will use this label also for the whole project.

(by digaus, see here)

(by GekoCH,


  • 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-BGC 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:
  • 19. Feb. 2014: The new board STorM32-BGC v1.2 has arrived today, and it is working absolutely perfect! :)
  • 6. Feb. 2014: Development goes on, new board STorM32-BGC v1.2 ordered
  • 11. Jan. 2014: Board STorM32-BGC v1.1 works!
  • 2. Dez. 2013: GitHub Repository created:
  • 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 STorM32-BGC v0.17 has arrived

Useful links

STorM32-BGC Presentation

storm32 bgc v017 test microgimbal olliw
(Test setup using a micro gimbal and STorM32-BGC 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-BGC 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 in principle designed to serve „larger duties“. The current firmware doesn’t yet make full use of its potential, but that’s why the project is not yet at its end :) (please check the current feature list). 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.

Magnetometer or 10DOF IMU
Instead of the common MPU6050 module mounted on the camera, also the GY-86 10DOF IMU module can be installed, which provides an additional magnetometer for compensating the drift in the yaw axis. However, in praxis, this doesn’t (yet) work really well because of some fundamental issues with the working principle. And in fact a magnetometer is not really needed..

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 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.

Data sheets
STM32F103RB, STM32F103RC, STM32F405RG, TC4452, MPU6050, HC06, HM10

II. STorM32-BGC: Board v1.3


processor: STM32F103RC at 72 MHz
motor drivers: TC4452VMF
on-board Bluetooth (optional)
on-board 6DOF IMU (MPU6050)
IR led port
Futaba S-Bus
Spektrum satellite port
up to 7 PWM/Sum-PPM inputs/outputs
joystick for each axis
additional I2C port (I2C#2)
3 auxiliary ports
BUT port
voltage: 6 – 18 V or 2 – 4S
current: max. 1.5 A per motor (see also here)
dimensions: 5 cm x 5 cm, holes Ø3 mm, distance 45 mm
weigth: ca 13 g

Electric scheme and board layout

storm32 bgc v130 scheme sheet1 olliw storm32 bgc v130 scheme sheet2 olliw
storm32 bgc v130 top bottom olliw

Parts list

See the wiki article How to order the electronic parts – BOM for v1.3.

The placement of the parts is shown in the next picture, which gives the values of the resistors and capacitors. The other parts are not labelled since there shouldn’t be any confusion about their locations.

storm32 bgc v130 top-bottom wvalues olliw
storm32 bgc v130 board dfn mpu olliw
(The v1.3 board, incl. the optional MPU6050)


  • 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)

v1.2 rev2:

  • cream pad added to DFN packages
  • silk for DFN packages a bit imporved

v1.2 rev1:

  • 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

Older boards

STorM32-BGC v1.2

STorM32-BGC v1.1

STorM32-BGC v0.17

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.

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:

0323bgctool setupmain olliw 0323bgctool datadisplay olliw
0323bgctool setupgimbal olliw 0323bgctool setuprcinputs olliw 0323bgctool setupexpert 0323bgctool configureimu olliw
0323bgctool configuremotors 0323bgctool flashfirmware olliw 0323bgctool btconfigtool olliw

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.

V. Downloads

The files are also available at the GitHub repository
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-BGC Eagle and Gerber files
storm32-bgc-v130-eagle-gerber-files-20140322 [zip] (2.5 MB)
storm32-bgc-v1202-eagle-gerber-files-20140311 [zip] (2.5 MB)
storm32-bgc-v110-eagle-gerber-files-20131227 [zip] (1.8 MB)
storm32-bgc-v017-eagle-gerber-files-20131120 [zip] (1.5 MB)

storm32-bgc-mpu-module-v009-eagle-gerber-files-20140506 [zip] (1.3 MB)

o323BGC firmware and o323BGCTool files
o323bgc-release-v090-v20160110 [.zip] (10.1MB)
o323bgc-release-v090-v20160110-withNTLoggerTool [.zip] (165MB)
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)

200 Kommentare

  1. Eddy sagt:

    Ciao a tutti. Sono italiano ed ho acquistato il 3 axis strom32 ma non riesco a farlo funzionare. io non me ne intendo di elettronica per cui non riesco ad andare avanti. Quando lo accendo i braccetti mi rimangono duri e bloccati. non so come fare. pensavo di acquistarlo e che mi andasse subito come vedo da tutti i filmati su youtube ma credo che dovrò rinunciare. Mi dispiace. vi prego fatemi sapere come si fa a calibrare questo gimbal. Ciao a tutti

    • Eddy sagt:

      Hallo an alle . Ich bin Italiener und ich schreibe und mit dem Übersetzer . Ich kaufte das 3-Achsen strom32 aber ich kann es nicht funktionieren. Ich meine nicht, auch elektronische , warum ich nicht weitergehen kann . Wenn sie die Macht die Arme schwer und ich bleiben gesperrt. Ich weiß nicht, wie zu tun ist . Ich dachte, dass es zu kaufen würde, und ich litt , als ich von allen Filmen auf Youtube sehen, aber ich denke, ich werde aufgeben müssen . Es tut mir leid . Bitte lassen Sie mich wissen, wie Sie diesen Gimbal kalibrieren. Hallo an alle

  2. Darren sagt:

    Hi Olli,
    do you know whether the firmware would run on an M0 at 48 MHz?
    Or does it need a more powerful MCU?
    Thank you.

  3. Ibai sagt:

    Hi OlliW,

    Congratulations for this project, you nailed it!
    I’m pretty excited now that I got my board and I’m ready for setting it up.
    I flashed the latest firmware on my v1.31 board, using the v090 tool. The verification shows that it has been properly flashed.
    Then I try to connect, or read and it always says „Read…Aborted!“… I’ve tried also with previous (v080, v070…) tools with no success. I’m able to flash the firmware but not able to connect or read afterwards. I’m not sure where the problem could be. I’d be really grateful if you could give some hints to solve the problem ( It could have happened to someone else this same issue..). Many thanks in advance!!!


    • Ibai sagt:

      Hi again,

      I’m still trying to find the solution…
      FTDI drivers installed correctly, also checked with HTerm if there is data transmission–> OK
      Running your o323BGCTool I perform the „Flash Firmware“, selecting v1.31 board, latest firmware version (I’ve also tried the previous ones…), checking the full chip erase. Before pressing Flash button, I enter boot loader mode pressing and releasing reset while boot is pressed, leds turn off except for the yellow one (BT).
      The DOS window shows correctly how the chip is erased, how the new firmware is flashed, and the verification also shows that everything is OK. Then, the device is reseted and the leds start blinking again. Everything seems to be running as it should.
      Then, I try to READ or CONNECT, but it says:

      Connecting…please wait!
      Please do a first read to get controller settings!

      I have the correct COM port selected, I’ve tried supplying the board from battery and from USB, different cables… I don’t know where I’m missing something or what I’m doing wrong…

      Any hints for solving the problem? I’ve red many pages on the forums and the wiki but can’t find the solution…

      Thanks in advance!!!


  4. motianlun 1111 sagt:

    hi OlliW:
    thanks for share your effort, i want to contect with you and share my own effort. I do a lot work on foc motor control , i hope i can help you to improve you project, and i also have some question to consult. could i know you?
    best wishes.

  5. Adrian Hausammann sagt:

    Hallo OlliW,

    ein echt cooles Projekt dass du da auf die Beine gestellt hast.
    Ich bin gerade dabei meinen eigenen Gimbal für eine DSLR Kamera zu bauen, nun wollte ich gestern das Ganze in Betrieb nehmen. Es ist so, dass ich bevor ich alle Teile fräsen lasse gerne kurz alle zusammengesteckt hätte und getestet hätte, Aufbau:

    – YAW und Roll Motor liegen auf dem Tisch
    – Pitch Motor ist am Prototypteil angebracht (mit eingearbeitetem Camera IMU)
    – Controller liegt auf dem Tisch

    Wenn ich nun das Configuration Tool laufen lasse, bei der Neigung einfach das Prototypteil mit Sensor und den Controller um 45 Grad nach vorne neige, was dann auch klappt, bricht der Vorgang immer beim Motorleveln ab. Das heisst, der Pitchmotor dreht langsam, einer der beiden anderen auch (glaube der Rollmotor), allerdings bricht es dann einfach ab.

    Ist das nötig, dass ich eine Konstruktion baue welche alle Motoren etc. bereits „richtig“ angebracht sind inkl. Controller etc. oder an was könnte der Fehler liegen?

    Im Dashboard steht dann bei Motors immer OFF OFF OFF, Spannung ist 17.3V.
    Ich freue mich über eine Antwort.

    • OlliW sagt:

      ja, das ist nötig
      Leveln heisst dass der Controller versucht die Motoren so anzusteuern dass die Imu waagrecht wird, wenn das nicht passiert stellt der Controller richtiger weise fest „Mist, ich kann die Imu nicht leveln“, und bricht ab
      BTW: über die Kommentare hier lässt sich nur schlecht diskutieren, der rcgropups Thread ist besser geeignet

  6. Jakob sagt:

    Danke! endlich alle Infos die man braucht 😉

    Ich habe noch 1 frage:
    Kann der Controller diese Motoren betreiben? ich finde nicht nirgendwo ob der Controller stark genug ist um Kameras mit bis zu 1,8kg zu stabilisieren.


    • Tammo sagt:

      3 von den Motoren liegen bei mir Zuhause und das Storm32 kommt am Freitag. Dann kann ich dir mehr berichten, ich glaube ja aber ich sehe es ja am Wochenende…
      Mit freundlichen Grüßen

    • Tammo sagt:

      Ja kann er und das bis jetzt sehr gut, mal sehen was es wirklich macht wenn der endgültige Aufbau dran ist und ich alle Einstellung verstanden haben, bis jetzt super begeistert. Aber eins kann ich sagen die Bluetooth App ist bis jetzt nicht so toll..

  7. Rémi06390 sagt:

    Hi OlliW,

    Thanks for sharing your amazing research !!

    I have a problem on my board, Storm32 BG0 V1.32, in the soft when i want to configure gimbal tool, the soft say me that „imu 1 is not present or not healthy“…. is it an hardware probleme or a bad soft version(V0.89e)?
    And i don’t why my 3 motors dosn’t works…



    • OlliW sagt:

      Hey Remi
      imu: most likely you have connected the IMU incorrectly to the STorM32 board
      motors: you need to configure to board properly
      please consult and read through the wiki carefully
      for further questions please consider the rcgroups thread
      Cheers, Olli

Hinterlasse einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *