Introduction: The Making of a DIY Brushless Gimbal With Arduino

This is a story of my third project with cheap gyro and Arduino.

After the earlier two projects, Easy Inverted Pendulum and 3D Calligraphy, I have thought of making Camera Gimbal with Arduino. Then I had three policies for the project.

  • Equipped with standard camera bigger than GoPro
  • Simple as possible with no special device nor kit
  • Bootstrap: Refer to fewer websites as possible and finish with no imitation

At the start of the project, I had intention of making 2-axis gimbal with Servo Motors. But it has been made clear that it is difficult to see adequate performance using Servo Motor. Consequently a 3-axis gimbal with Brushless Motors and Arduino has been made. INTRODUCTION VIDEO below shows the effectiveness of the DIY gimbal. In the video, pretty noise would be heard suddenly. It is left without any reduction to show strengths and weaknesses of the gimbal. Arbitrary film editing is avoided.



It seems that the DIY 3-axis gimbal in this video provides enough compensation for practical use. But it was not easy to make it of this level. For example, I have met with difficulties below.

  • Controlling Brushless Motor adequately with Arduino alone
  • Getting a precision frame of gimbal by using rather poor tool
  • Resolving the disturbance of SPI interface between gyros and Arduino
  • Settling frame chattering
  • Adding intended and smoothPAN or TILT to good compensation

The first problem above is a matter of programming. In contrast the second one is a pure hardware matter. And the remaining ones are found in intersection of both matters.

Also four problems except for the first one have been encountered when the second axis was added to the single axis gimbal. It means that the core of the program of multi-axis gimbal here is not different from the single axis one. But the good frame for multi-axis one requires much more efforts to be gotten than single axis one.


Here "How to make the DIY single axis Brushless Gimbal with Arduino" is told in detail in a later step. But it is rather a special topic to tell the whole story about the process of development a DIY camera gimbal with Arduino of level high enough for practical use. The story is as follows.

  • An important point to make a gimbal with gyro
  • DIY single axis gimbal with cheap Brush DC Motor
  • DIY single axis gimbal with Servo Motor
  • DIY single axis gimbal with Brushless DC Motor
  • Multi-axis controlled
  • Effectiveness of the DIY gimbal
  • Unresolved problems for improvement

"How to ..." is told in Step 6 to 10 mostly. And the minimum work in it might be able to be done just referring to content in Step 10 after watching DCUMENTARY (12) in Step 9. On the other hand the performance of the DIY 3-axis gimbal would be seen approximately after watching INTRODUCTION VIDEO above, DCUMENTARY (15) in Step 12 and DCUMENTARY (17) in Step 13.


By the way, another project entitled "Brushless Gimbal with Arduino" has been posted to Instructables in last year. It provided me the "good resource for a starting point". But its approach contrasts with mine. The difference between them would be told in Step 5.


I hope the attached videos and pictures would compensate for my poor English. The Japanese version of this instructable has three more steps additionally.

Step 1: An Important Matter—Which Side Is Gyro Attached To?

Motion of a rigid body in space can be described with two independent elements; rotation and parallel translation. The former can be cancelled out or compensated by an instrument called gimbal. A camera mounted on the innermost gimbal could be free from rotary motion when the support of the gimbal moved, even though it might not be free from parallel shift. Hence for the gimbal driven by motor, angle (or posture) of camera becomes the important information to keep it still.

We have several alternatives to estimate the angle of object in motion. Here cheap gyro module(s) is/are used. The angular velocity of the object can be measured by gyro. And Arduino translates it into estimated degree of angle shift of the object. Now we have the next alternatives for the new matter which side of gimbal the gyro is attached to.

(1) Attaching gyro to the "camera side" (attaching it to the camera mount)

(2) Attaching gyro to the "support side" (attaching it to the handle base)


The most different point between them is whether the feedback of the intentional rotation of the motor controlling the gimbal is gotten or not. When attaching gyro to (1) camera side, intentional motion is not distinguished from un-intentional one and just the sum of them is measured. On the other hand when attaching gyro to (2) support side, only the un-intentional rotation is measured but intentional one is not. Hence they have good and bad points respectively as below.

(1) Attaching gyro to the camera side (attaching it to thetop (or rotor) of the motor)

  • Strategy: When the camera rotates a little bit, drive the motor to cancel out it immediately.
  • Merits: It is not needed to estimate the angle correctly. (So it is not needed to know how much the motor rotates its spindle.)
  • Demerits: The camera vibrates easily unless the motor is controlled adequately.

(2) Attaching gyro to the support side (attaching it to thebase (or stator) of the motor)

  • Strategy: When the support rotates, estimate the degree and rotate motor as much as that to the reverse direction correctly.
  • Merits: Vibration caused by the feedback of motor rotation never occurs.
  • Demerits: The correct estimates are needed for both rotation of the support and camera.


These differences are important for motor choice. When the gyro is attached to the (2) support side, both degrees of angles of the top and the base of the motor have to be estimated correctly. Therefore Servo or Stepper Motor is likely to be used, which could control the angle directly.

On the other hand, when the gyro is attached to the (1) camera side, just the rotation of the top of the motor should be restricted from the fixed viewpoint at somewhere outside. Then the degree of this rotation does not have to be estimated necessarily. So the cheap Brush DC Motor might work.

Now it appears that the (1) camera side is better to attach gyro to, from point of view of either freedom of motor choice or less efforts needed to estimate the correct degrees of angles.

Step 2: Can Be Cheap Brush DC Motor Applied to Gimbal?

Some cheap Brush DC Motor might work for the gimbal when the gyro is attached to the (1) camera side. But the spindle of this kind of motor would turn at higher speed for gimbal. Therefore gear or pulley is needed to reduce speed properly.

Here a simple inverted pendulum robot ever made is used like a single axis gimbal to see whether Brush DC Motor could be applied to camera gimbal. With a modified program for gimbal this robot can give rough compensation against the rotation of its support. Though it is not so bad, large vibration occurs, which cannot be resolved by the standard countermeasure. You can see detail in DOCUMENTARY (1) below.


[DOCUMENTARY (1)] Single Axis Gimbal with Brush DC Motor


Backlash of the reduce gears causes this persistent vibration. It is needed to know at every moment whether gears mesh or not to resolve it. But it is not easy to know it in real time.

As lowering sensor sensitivity this vibration is able to be weakened. (See DOCUMENTARY (2) below.) But the gimbal is left uncontrolled while gears do not mesh. Hence a precision reduce gears such as no backlash is felt is needed to apply cheap Brush DC Motor to camera gimbal. But it seems too hard to get such gears in this project.


[DOCUMENTARY (2)] Modified Single Axis Gimbal with Brush DC Motor

Step 3: Making Single Axis Servo Gimbal (Part 1)

In this step and the next, Servo Motor is tried out for a single axis camera gimbal.

In Step 1 it is described that Servo Motor could work in either case where gyro is attached to (1) camera side or (2) support side of gimbal. In this step gyro is attached to the (1) camera side. Though it is not required to know the correct degrees of angles in this case necessarily, two alternative strategies were adopted respectively. The results observed are as follows.

  • The strategy, "turning motor as much as estimated degree of rotation of the support of gimbal to the reverse direction," cannot cancel out the rotation enough.
  • The other strategy, "turning motor until cancelling out camera rotation," results in delayed compensation or vibration of camera mount.
  • Therefore it is not easy to decide how much Servo turns.


The former strategy above is prepared for the gyro attached to the (2) support side. Though it is thought to work as well for the gyro attached to the (1) camera side intuitively, it compensates only the half of rotation on reflection.

On the other hand the latter strategy is prepared for the case where gyro is attached to (1) camera side. Here Servo Motor receives directly the degree of angle to turn. So it is not easy to control angular velocity or acceleration.

By changing the degree to turn gradually, we can control angular velocity to some extent. But we would meet with vibration in higher speed or delayed compensation in lower speed easily.

The advantage of Servo Motor is correct turning with the degree received. Therefore when using Servo Motor it should be better that the gyro is attached to the (2) support side from the viewpoint of efficiency of control, where the vibration caused by feedback could not be observed.

Step 4: Making Single Axis Servo Gimbal (Part 2)

In the previous step we have learned that it is not better attaching gyro to (1) camera side when using Servo Motor. So Servo Motor is tried out again with attaching gyro to (2) support side. The results observed are as follows.

  • Servo Motor is not good where quick acceleration or deceleration is needed
  • Especially it needs more time upon deceleration to stop
  • It is difficult to change acceleration or deceleration of each Servo Motor


The figure above shows the change in the angular velocity of a Servo Motor from start to finish. There four different angles with 8, 15, 30 and 60 degrees are given and four lines in this figure represent these angles respectively. The slope of each line shows angular acceleration. We can know acceleration from start and deceleration to stop. So the figure tells us as follows.

  • The acceleration from start to maximum speed is almost constant and common to all angles given.
  • On the other hand the deceleration to stop is dropping stepwise but the pattern is similar to each other angle given.
  • Therefore the time required to stop from maximum speed is about two or three times longer than the time needed to reach maximum speed from start.
  • When the given angle is less than 15 degrees, the maximum speed of this motor is never reached from start to finish.


The first three points above mean that Servo Motor executes stopping motion more carefully than to starting. And the last point above means that Servo Motor cannot respond quickly enough to irregular change of angle. So it tells us that rotating speed (as maximum speed in steady turning), one of the most popular performance measure of Servo Motor, is not so critical in this project.

The careful deceleration of Servo Motor to stop is thought to intend to avoid risk of vibration. But this careful deceleration spoils quick response needed for camera gimbal. We can see both delayed starting and dropping deceleration to stopping of Servo Motor in the DOCUMENTARY (3).


[DOCUMENTARY (3)] Testing Tracking Speed of Servo Motor


Camera gimbal must compensate against irregular rotation of its support. Hence the motor driving it is required not only higher maximum speed but also enough acceleration and deceleration for quick tracking.

From this point of view Servo Motor is thought to be too much careful for avoiding the risk of vibration at the expense of acceleration and deceleration. Though the extent of this trade-off depends on each model of Servo Motor, none provides enough compensation which I have tested. In the DOCUMENTARY (4) below the best Servo Motor among them is used, which has smaller body, higher speed and quicker response. But we cannot recognize that it works adequately in the video.


[DOCUMENTARY (4)] The Final Test of Single Axis Servo Gimbal

Step 5: The Articles of DIY Brushless Gimbal in Web

In the previous step it has been made clear that Servo Motor would hardly provide enough compensation for gimbal. So Brushless Motor is considered to be applied to gimbal instead of Servo Motor.

But I had never seen Brushless motor and no special knowledge about it at that time. So I bought a relatively inexpensive one ($22.75) for a research. But I found no paper like manual but a motor in the package. Then I got little information added to use it.


Now that things had come to this pass, I referred to websites to search useful information to use Brushless Motor. I found a considerable number of articles and videos about DIY with Brushless Motor. And I knew that special device named ESC or Gimbal Controller is used to drive each Brushless Motor in general.

On the other hand no special device would be used in this project as described in Introduction. Only Arduino should be used to control gimbal. Hence I focused on a rare article featured in Instructables in which neither ESC nor Gimbal Controller is used. Its title "Brushless Gimbal with Arduino" hits the mark of my project. But it is a pity that the gimbal shown in it does not seem to work adequately so the authors say, "we never got the gimbal we were looking for”.

However, their article introduces some other articles consulted. And one of them shows how to rotate Brushless Motor using Arduino (by eLABZ). It gave my project the starting point at that time. The detail of the consulted article will described in the next step. Here the first article referring to it is mentioned.


This article in Instructables describes an earlier project executed by two students belong to a university in US. There seems to be three points in common between their project and mine.

  • Both of us want to make a camera gimbal with Brushless Motor work well without special Gimbal Controller.
  • In short we would use only Arduino to control gimbal.
  • But we cannot find no similar project which meets either of these two requirements except ours.

On the other hand their project is different from mine as follows.

  • They use GoPro as mounted camera.
  • They use ready-made set on the market as frame and motors
  • They use the program provided in other website to rotate Brushless Motor
  • They use a special device as gyro module (a MPU6050 carrier)
  • They use the program provided by others to exploit this module


Both of us share a goal (Driving Brushless Motor Adequately by Using Arduino Alone without Special Controller) and a situation recognition (Finding No Article Achieving This Goal for Camera Gimbal). And they use rather positively both existing programs provided by others and ready-made set sold on the market.

This approach seems like a strategy such as "Achieving a Unique Objective with Help of Others" or "Getting a General Function with Special Materials or Methodologies". At that time I brought the term in my mind impressively, Horizontal Divisions of Labor (*).

(*) I had heard that Horizontal Divisions of Labor harass Japanese Industry which has advantage in Vertical Integration. The third policy described in Introduction, "Bootstrap: Refer to less websites and finish with no imitation", is felt nearer Vertical Integration than Horizontal Divisions of Labor.


Back to topic, in the article in Instructables introduced here a special gyro module is used, which has MPU6050 sensor. This sensor has a special and very powerful function named DMP (Digital Motion Processor). This function provides not only greater noise reduction than standard gyro sensor but also estimate of 3D rotary coordinate system (*1) in real time (*2).

(*1) It is not a rotation around a fixed axis on gyro but a rotation of 3D coordinate system in the fixed system.

(*2) This is not an easy calculation. Hence a famous freeware working in PC, Processing, is used not in real time in my earlier project.

Though the sensor with DMP is amazing, it would be "special device" at the present moment. Therefore I decided not using the module with this sensor in this project. By the way a popular motor driver, L298, is used in this project, which is employed in the article above. I am grateful to the authors of this article.

Step 6: Rotating Brushless Motor Using Existing Programs

Going back to my project, "How to ..." is described here for the first time in this instructable.

In the article mentioned in the previous step authors rotate Brushless Motor by using Arduino. There they refer to an earlier article written by eLABZ. And they use the program provided in it. In the consulted article the author eLABZ explains how to make a Stroboscope with Brushless Motor took out of an old DVD drive.

As far as I know (*), this is the only article that contains the full array of information to rotate Brushless Motor by using Arduino alone. This article is constructed of 3 sections. (*I found another video right now. It has just the minimum information.)

  1. Learning fundamental knowledge of (3-phase) Brushless Motor
  2. Rotating Brushless Motor by using Arduino
  3. Putting materials together to get Stroboscope


In the second section above two alternative programs for Arduino are provided to rotate Brushless Motor. I read them and its commentary with an illustration in the article. And I understood that I should just supply three AC voltages which phases are shifted by 120 degrees to the three wires with Brushless Motor in no particular order. Indeed the Brushless Motor I have bought rotates easily with Arduino and an imitation program, which contains the only lines to supply these three voltages to the motor. The DOCUMENTARY (5) shows the Brushless Motor rotates with Arduino only.


[DOCUMENTARY (5)] Rotating 3-Phase Brushless Motor with Arduino and AC Square Wave


Here I explain how to rotate Brushless Motor by using Arduino UNO. You need to get a 3-Phase Brushless Motor. I think it has three wires.

  1. Connect these wires to pin 9, 10 and 11 on Arduino UNO in no particular order
  2. Download the two pdf files attached at the end of this step to your PC
  3. Open them in proper reader application
  4. Copy the whole of text in either of them
  5. Paste the copy to IDE for Arduino and correct misprints
  6. Upload corrected program to Arduino using IDE

Each of these programs is based on the original one provided by eLABZ. A high-torque-type motor for gimbal would rotate immediately at upload finished. On the other hand some high-speed-type for RC model might not rotate with the power from Arduino. Then some outer battery and motor driver IC should be used. In the DOCUMENTARY (6) below outer batteries and driver IC are used. In the former half of this video a high-torque-type is rotated and in the latter a high-speed-type is rotated respectively.


[DOCUMENTARY (6)] Rotating Two Types of Brushless Motor with Arduino, Outer Batteries and Sine Wave AC

Step 7: Testing a Single Axis Brushless Gimbal Using Existing Program

In the previous step we saw that simple programs uploaded to Arduino can rotate Brushless Motor easily. These programs imitate the core of existing programs written by eLABZ. The uploaded programs can be seen once downloading the pdf files attached to the end of the previous step. We can control rotational speed of motor to some extent by changing the value of the variable motorDelayActual in line 1 in these programs.

Here a test bench as a single axis Brushless Gimbal with Arduino is made. And the program for this test bench is prepared also based on one used in the previous step. Please note that the rotational angle of motor is not measured as well as the case with a cheap Brush DC Motor in Step 2. Hence gyro should be attached to the (1) camera side and some proper countermeasure is required to prevent vibration. The DOCUMENTARY (7) below shows the performance of this test bench controlled by the program with standard countermeasure to vibration.


[DOCUMENTARY (7)] Single Axis Brushless Gimbal Using 3-Phase Sine Wave AC


The test bench can compensate the rotation of its support (or base) roughly in the video above. But some problems are shown as follows.

  • Delayed starting for compensation
  • Unsteady rotation under compensating (pulsatory motion)
  • Some vibration remaining at stopping

So the program uploaded undergoes repeated improvements and tests to resolve these problems. The DOCUMENTARY (8) below shows the performance of the test bench controlled by the finally improved program.


[DOCUMENTARY (8)] Improved Brushless Gimbal Using 3-Phase Sine Wave AC


The improved program can weaken the problems above at some extent. But it could not seem to work well for the camera gimbal. Also the gimbal with it could hardly work better than Servo Gimbal in Step 4.

Step 8: Copernican Revolution and Brushless As Servo

In Step 5 an article in Instructables is introduced, which describes a challenge to get a 2-axis Brushless Gimbal controlled by Arduino. This challenge is supported by an existing program provided by eLABZ. But as authors recognizing, it is a pity that the gimbal gotten there does not seem to work adequately.

In the previous step I imitated the same original program provided by eLABZ and applied it to the single axis Brushless Gimbal. But it has never worked well in spite of executing any improvements I could think of.

Indeed it is written in the article about the original program that "this circuit was designed for a rather simple application (...) – the load is so light (...). If (...) your motor does not have Hall-effect sensors (many BLDC motors do), then this simplified circuit is not suitable for your application."


At the end of my resources, as dejectedly gazing at the gimbal working, it seemed to be quite unreliable as yet. I almost gave up. Then an idea hit me, "The most important here is not to rotate the motor quickly or smoothly but to keep it stopping tightly at the point".

It was felt a revolutionary shift of the goal for me. So I drew a figure simplifying Brushless Motor, and based on it I calculated the best operation to maximize the stopping power of motor at arbitrary angle (*1). Next, I prepared a whole new program to execute the operation and uploaded it to Arduino. Then I saw the Brushless Motor was kept stopping at the objective angle very strongly as never seen (*2). And changing the angle given, the Brushless Motor rotated immediately and stopped at the changed angle tightly again.

(*1) I learned fundamental knowledge of Brushless Motor by referring to an article in the site of Ijima-san (in Japanese). Though it is similar to the article by eLABZ in Step 6, an additional topic is mentioned about alternative connections, Y or Delta. Every Brushless Motor used in this project has Y connection. (At first I had the wrong idea that each motor had Delta connection. But later I found Y connection in the motor disassembled. I appreciate Ramirez_MecaUPQ's question.)

(*2) The earliest calculation was based on the assignment of slots (coils) explained in the site of Ijima-san. But no torque was gotten. After research I found a manual to build Brushless Motor kit (in Japanese). It taught me that there are alternatives among Y or Delta connections.


The new operation and program could make a Brushless Motor work like as a Servo Motor. So they were modified to be able to cooperate with gyro. The DOCUMENTARY (9) shows they work well on the test bench and suggests much better performance could be expected than Servo Gimbal.


[DOCUMENTARY (9)] Brushless Motor Made Work Like as Servo Motor

Step 9: Making a Precision Single Axis Brushless Gimbal With Arduino

The new operation introduced in the previous step would make it possible to get a Brushless Gimbal with Arduino of practical use. Now a Brushless Motor can work like as a Servo.

In this operation gyro can be attached to the (2) support side. The test bench prepared in Step 7 becomes a new single axis Brushless Gimbal under this operation. In the DOCUMENTARY (10) below the new gimbal equipped with a camera is tested.


[DOCUMENTARY (10)] The First Brushless Gimbal Operated by the New Program


In the video above we can see the performance of the new single axis Brushless Gimbal from two viewpoints like DOCUMENTARY (4) in Step 4 with Servo Gimbal. Now we can recognize that the new Brushless Gimbal works better than Servo Gimbal in Step 4 though the new one has some rough compensations as yet. Fortunately we have still several rooms for improvement such as value selection for parameter set in the program.

Also we can get some additional data by attaching another gyro to the (1) camera side of the gimbal. Indeed comparing data from both gyros I have understood there are three matters remaining.

  • Time lag at the start or the end of compensation
  • Attenuating shake at the start or the end of compensation
  • Angular shift after compensation: Uncompensated shift remaining

Among these three matters the second would be resolved by the standard PD control using the added gyro in the operation newly. Also the third is thought to be resolved by giving proper values for parameter set or using the added gyro. In the DOCUMENTARY (11) below we can see the effectiveness of exploiting the added gyro in the operation.


[DOCUMENTARY (11)] Effectiveness of Exploiting Added Gyro in the New Operation


In the video above we can recognize that each of the three matters seen in the previous video (10) can be much improved respectively by exploiting the gyro added. And we have still other rooms to improve.

For example the power supplied to the motor is about 5V in these videos above though the recommended voltage is 11 to 15V. In the DOCUMENTARY (12) below four more AA batteries are added to supply enough power to the motor and the values of parameter set are adjusted.


[DCUMENTARY (12)] Effectiveness of Adequate Power Supply to Motor


In the video above we can see that the first problem, "Time lag at the start or the end of compensation", is weakened so much under the enough power supplied. Now we should move from the stage using the test bench as single axis gimbal to the next stage making 2-axis gimbal of practical use.

Step 10: How to Make the Single Axis Brushless Gimbal With Arduino

Before moving the next stage where 2-axis gimbal is made, I show here how to get the DIY single axis Brushless Gimbal with Arduino which works in the DCUMENTARY (12) in the previous step. To avoid the long recipe I suppose readers here have enough experience with Arduino and gyro such as my earlier project.



  • 3-phase Brushless Motor for gimbal (x1): Limited to 14-pole, 12-slot (Though both Y and Delta connection are acceptable, assignment of slots have to be same as the figure shown in this manual.)
  • Arduino UNO (x1)
  • L3GD20 gyro chip carriers (x2): SPI interface with 4 lines (*1)
  • AA batteries (x4-8)
  • L298 motor driver (x1)
  • Plates (x2): For the support of gimbal and the camera mount
  • Others: Popular stuff for work with Arduino

(*1) I used Akizuki’s carrierhere. I know another L3GD20 carrier produced by Pololu. The latter is available also outside Japan. If it were used instead of the former, the picture with schematic above should be viewed.


[Program (or Sketch)]

  • Download the pdf file attached at the end of this step
  • Open it in a proper reader application
  • Copy the whole of text in it
  • Paste the copy to IDE for Arduino and correct misprints
  • Upload corrected program to Arduino using IDE
  • Though this sketch is optimized for Delta connection, it is applicable for Y connection
  • The sign of output of the secondary gyro at the (1) camera side depends on the manner to attach it
  • If the gimbal does not stop nor compensate but rotates the wrong direction (*1), try the last point of "Wiring" below first
  • If the gimbal still does not work well, the two lines commented out in this program should be made effective instead of commenting out the alternative two lines, A and B
  • If the gimbal still does not work well, try the last point of "Wiring" below again



  • See the figure at the top of this step and follow it
  • Three wires with Brushless Motor are connected to pin 3, 5 and 6 on Arduino UNO in arbitrary order
  • If the gimbal does not stop nor compensate but rotates the wrong direction (*2), change this connection appropriately

(*1, *2) To make the gimbal work well, both of outputs of gyros and wiring have to be set correct. Sometimes the output of gyro might become abnormal in spite of correct setting. Then cut the power off to Arduino and gyros once.



  • Reset Arduino
  • Don't touch the gimbal for 6-10 seconds: Keep both gyros still


The rough flow of the program in the attached pdf file below could be understood by seeing it on a block-by-block basis. On the other hand the details of some blocks might be not so clear. It needs much more steps to explain them. If many requests were gotten in future they might be told in another story.

Step 11: Making the 2-Axis Brushless Gimbal With Arduino

We have gotten the single axis Brushless Gimbal with Arduino on a test bench, which works as expected at the start of this project. Now the multi-axis gimbal of practical use should be made. Here 2-axis Brushless Gimbal with Arduino is made and tested.

It compensates un-intended rotation around two axes: TILT (looking up/down) and ROLL (rotating horizontal line). It needs two motors and six pins with PWM. So in this step a richer Arduino board, MEGA, is used instead of UNO. The main materials to build the frame of this gimbal are plastic plates and stainless steel brackets. The former plate is a goods for hobby named "Universal Plate". It has many regular pinholes and needs no special tool to be cut and so on.


The next two points take much time to build the frame.

  • Hunting good material for camera mount
  • Installing a pair of pin and pinhole for the TILT axis

In the former, some steel flat bar with regular pinholes is looked for, which is suitable both to the center of gravity of the camera and to the existing pinholes on the frame. On the other hand the latter work is required to be equipped with a camera bigger than GoPro.

Generally a Brushless Motor works as a good pair of pin and pinhole on arbitrary axis. It supports a cantilever by itself. So an ultra-lightweight camera like GoPro could be mounted on a cantilever with few problems. But cantilever could not support a bigger camera well. Hence a pair of pin and pinhole should be installed on the axis at the opposite side of the motor across the camera. The pin, pinhole and the motor should provide a good pair of fulcrums on the TILT axis to rotate camera smoothly without little backlash.


Once the frame is built, the 2-axis Brushless Gimbal with an augmented program for two axes becomes available to test. This naive gimbal has two problems as follows. The detail and the cause of them, and the countermeasures to these problems are described in the final step.

  • Chattering of the frame
  • Biased output from gyro to Arduino: Disturbance on SPI interface

Most of electrical components of the gimbal made here are plugged into a solderless breadboard and connected to Arduino, gyro or motors by jumper wires as yet.

In the DCUMENTARY (13) below we can see the 2-axis gimbal tested here is working, which is given some countermeasures to the problems above and allowed intentional TILTing additionally. In this video the gimbal seems to work well.


[DCUMENTARY (13)] 2-Axis Brushless Gimbal with Arduino Working (1)


On the other hand, in the DCUMENTARY (14) below, we can observe not only the gimbal working but also film shot by the camera on the gimbal in one picture. This video shows that there remains some room to improve for the compensation to ROLL (rotating horizontal line).

[DCUMENTARY (14)] 2-Axis Brushless Gimbal with Arduino Working (2)

Step 12: Making the 3-Axis Brushless Gimbal With Arduino

The two problems met in making the 2-axis gimbal in the previous step, Gimbal Chattering and SPI Disturbance, are able to be weakened by some conventional symptomatic treatments. Their details are described in the final step. And the room to improve observed in DCUMENTARY (14) could be resolved or reduced by adjusting values of parameter set in the program.

So here, the third Brushless Motor is attached additionally to the top of the frame of the gimbal, which could compensate un-intentional rotation around the axis for PAN (looking at right/left) newly. Next, electrical components are moved from a breadboard to a DIY Shield for Arduino MEGA.

At the same time, the program is augmented again to compensate the un-intentional PAN and to allow the intentional PANing. And the values of parameter set in the program are adjusted to reduce the room for improvement observed in DCUMENTARY (14). Now the DIY 3-axis Brushless Gimbal with Arduino for practical use has been gotten. Its performance can be seen in the DCUMENTARY (15).


[DCUMENTARY (15)] 3-axis Brushless Gimbal with Arduino Working


In the video above the camera mounted on the 3-axis gimbal shoots itself in front of a mirror. We can see both the gimbal working and the stability of mounted camera. As comparing this video with the DCUMENTARY (14) in the previous step, it is clear that the compensation for un-intentional ROLL is much improved in this step. This is the moment to go out with the gimbal and shoot various scenes to see its performance.

Step 13: Shooting With DIY 3-Axis Brushless Gimbal

We can see new matters in outdoor shooting, which are met with hardly in indoor testing. Therefore the values of parameter set are needed to be adjusted repeatedly again by shooting after shooting. We can see the films shot for this adjusting in the DCUMENTARY (16) below. There we should remember that a gimbal cancels out some rotation but it does not compensate any parallel shifts. Hence the vertical (up-and-down) motion in walking is not subject to compensation in the videos below.


[MAKING VIDEO (16)] Films Shot in Outdoor for Fine Adjusting


In the adjusting above, the main issue is the adequate compensation for the un-intentional ROLL. Watching a horizontal line in distant view in the video above, the degree of its rotational stability is different between scenes (shot under different values for parameter set).

The DCUMENTARY (17) below is a film shot in the adjusting also. It is good to see the performance of the gimbal adjusting here, because it has more stable compositions where the motion of horizontal line is observed well and it has a scene of battery is dead suddenly.

[DCUMENTARY (17)] Film Shot in Outdoor for Fine Adjusting (Shooting Forward/Backward)


On the other hand the six videos below are films shot with some adjusted values for parameter set. In the first one, SAMPLE (1), intentional PANing is used so frequently that we can see its effect well. The second SAMPLE (2) is uncut video shot by going up and down the stairs at a quick pace. And the rest videos, SAMPLE (3) to (6), have scenes shot under so various conditions that they would give us good information to estimate the efficiency of the DIY camera gimbal gotten in this project.


[SAMPLE (1)] Effect of Intentional PANing (Turning 540 Degrees)


[SAMPLE (2)] Up and Down Stairs (From Running to Quick Steps: Uncut)


[SAMPLE (3)] Walking in a Park (Flowers and Persons)


[SAMPLE (4)] Walking on Dirt Path in Woods


[SAMPLE (5)] Uncut of the Gimbal Working from Power On to Off


[SAMPLE (6)] Low Angle Shooting

Step 14: Room for More Improvement

I have shown a story getting the DIY 3-axis Brushless Gimbal with Arduino of practical use. As searching web, there are few sites which describe driving Brushless Motor using only Arduino without other special devices. And it is a pity that the rare program provided in a precious article describing it has turned out to be unsuitable for the camera gimbal. (See Step 7.) Therefore I have prepared a new program independently and developed the DIY gimbal in order of single, two- and three- axis while augmenting the program.

The policies shown in Introduction, finishing this project with no imitation and no special device, seem to be kept finally. On the other hand I don't know the merits and demerits of this DIY gimbal well because I have not seen camera gimbal except for it. Here I describe the left room for improvement at the end of story.


(1) High Frequency Noise

The program prepared in Step 8 makes Brushless Motor have strong torque in stopping or rotating. But the operated motor generates noise around 500Hz continuously. This noise has little negative effect to the picture of video. But recorded sound is so contaminated by it.

(* Added: )
It was found that the coils in Brushless Motor generate this noise by PWM pulse applied. The noise can be shifted into non-audible range (31kHz) with making the frequency of the pulse higher. It can be done in Step10 by correcting two points below. I appreciate the comments of EricL50 and ThaddeusW3.

Change Arduino-pin assignment in both the wiring and the sample program.
 Pin8 > 5
 Pin9 > 6
 Pin5 > 9
 Pin6 > 10

Add four lines below in “setup { }” in the sample program.
 TCCR1B &= B11111000;
 TCCR1B |= B00000001;
 TCCR2B &= B11111000;
 TCCR2B |= B00000001;

The video Sample(7) below was shot with the modified sketch. The high-pitched loud noise cannot be heard in it. The values of parameters in the sketch should be adjusted again to keep good compensation in this modification. There seems to be room for it still. The next video Sample(8) was shot with adjusted parameters. We can recognize higher stability even though shot in a high wind.


[SAMPLE (7)] Noise Eliminated

[SAMPLE (8)] Parameter Adjusted for Noise Eliminated Version

And long Shots for 15 minutes: TEST(1), TEST(2), TEST(3)


(2) Chattering of the Gimbal Frame

I met with the persistent chattering of frame in the stage where the 2-axis gimbal of practical use was made from the single axis test bench. In contrast to the noise above, this chattering negatively effects picture. In the video shot with this chattering, the shape of object undulates. Though I do not know the accurate frequency of the chattering it is felt like about 50Hz. As touching some point of the frame by a finger, this chattering stops immediately. But it would disturb gimbal working.


[DCUMENTARY (18)] Disturbed Picture Caused by Gimbal Chattering


Though the root cause of this persistent chattering is not clear, the function of vibration damper in the sketch to compensate unintended tilting causes it. In this project the chattering is reduced by some conventional symptomatic treatments as follows. But more drastic measures are required for the fundamental solution such as improving frame rigidity and so on.

  • Adjusting values for parameter set in the program: Loosening compensation a little
  • Lowering power: Decreasing supply voltage to motor (7.5V) at two thirds of the lower level recommended one (11 to 15V)
  • Increasing size of the handle and attaching some brackets to it: Absorbing the vibration by the palm or changing the natural frequency of the gimbal by clutching bigger handle with brackets tightly.


(3) Un-intentional ROLL Still Remaining

When seen from the outside, the DIY gimbal seems to compensate enough against the un-intentional rotation of its support. But seen from the mounted camera, the rotational stability of a horizontal line is not perfect. It is thought important to improve it that the following matters are resolved.

  • Inappropriate values for parameter set in the program: Loosening compensation to reduce the gimbal chattering
  • Insufficient power supply: Decreasing supply voltage to motor at two thirds of the recommended one to reduce the gimbal chattering
  • Discrepant coordinate system between gyros and frame of gimbal

The first two matters come from the conventional countermeasure against the gimbal chattering. Then the fundamental solution to the chattering is required here also. On the other hand the last matter concerns the calibration of gyro.

The program prepared to control the gimbal in this project is assuming that all four gyros and frame of gimbal have the same coordinate system (or the same three orthogonal axes). But in reality, each of them should be thought specific (*) and the three axes of each system would not be orthogonal strictly. It is possible to know the posture of each system of gyros comparing with the system of the frame. But it does not seem to be so easy and its cost-effectiveness is not clear. Hence it has not been executed in this project as yet.

(*) No special measuring or adjusting has not been done when the four gyros were attached to the frame of the 3-axis gimbal.


(4) Disturbance on SPI interface

The outputs of gyros are transmitted to Arduino by SPI interface in this project. Though it is used for a short range communication between digital devices, there ought to be no problem within three feet of distance. Indeed few matters has been met with while the electrical materials are plugged into a breadboard and connected to Arduino by jumper wires. But after replacing these jumper wires with ribbon cables, the behavior of the gimbal has become abnormal.

For a while (some days) the cause has not been unknown at all. Through a considerable process of trial and error it was made clear that SPI interface is sometimes disturbed when some special lines is put close. Especially the disturbance occurs very often when Clock-line (SCK) is brought near Output-line (MISO). No article which describes such a phenomenon has been able to be found. Hence it is thought that this is a specific problem between Arduino and the gyro sensor used here. Though the true cause has not been known, the problem can be resolved by choice the proper combination of bundled wires.


TonyA3 (author)2017-08-17

Hi ArduinoDeXXX

Thank you so much for a great article - I think you did a superb job with the written English, because, perhaps, your spoken English is not good enough for spoken commentary. The way you educated us through several iterations was superb, and very clever videos. I help run a Hackspace in Leicester, UK, and I feel this would make a great project for our members, demonstrating advanced motor driving and complex feedback in closed loop systems. I appreciate that you wish to hold on to your final code, but it is great that you have answered various posters' questions.

Thank you


ArduinoDeXXX (author)TonyA32017-08-19

I appreciate your thoughtful comment. I see your site of Hackspace in Leicester. It seems very good studio and people look like having so much fun. I would be glad if this article could help you and them. Thank you.

MoodS1 (author)2017-08-17


I'm impressed.normaly I like inventions that are new, but camera gimbals are super cool but super expensive. I am a rookie, I just made my first hackintosh, fast computer for less money. I make music and startet with making video.i just discovered the world of microprocessors and I'm full of ideas.i build things since kid, e guitars, analog fx I can solder and I have passion.

maybe someone can give me an advice how I should start with micro comp?

I think a raspberry pi could bee a thing for me to start. actually I have no clue.but with the hackintosh it was the same and now, with help from forums and a lot of time, it's my main computer.

I think when I start to know Arduino and stuff, you guys will have the perfect DIY gimbal.

all the best


ArduinoDeXXX (author)MoodS12017-08-19

Thank you for your comment. I think you could enjoy DIY projects with microprocessor. If your projects require fast image analysis, Arduino cannot work well (Raspberry Pi can work). If not, you can get start your project with Arduino at a lower cost and skill.

PeshoPetrov (author)2017-07-07

Hello ArduinoDeXXX,

I really want to thank you for the great article. I read it maybe for 30th time.

Since a few weeks I am struggling with my gimball and I have a bit progress. In this video you can see the latest approach. I use arduino nano, cheap brushless, 12V and no ESC.

I have following problem: There are some positions where the rotor oscillates when it comes to the desired equilibrium. You can see this in the video, it oscillates maybe two times when it comes to the zero state. In the video I have a P control. I tried to add a D block with the idea to damp the system but it didn't work. When I make the P parameter very small than there is no oscillation but it is way too slow.

I thought that the problem can be in the array with the sine wave. I increased the number of the array elements from 96 to 576 and it got a bit better but with 1100 it is the same but slower.

Another thing I see is that the motor can't run really smooth when it rotates slow. It is always a bit jumpy. When the currency is turned off and I rotate the rotor with hand I can feel pretty strong magnetic resistance (EMF*). Maybe the problem is that the motor is not the right one for gimball but it was sold for this purpose. It has 12 cogs and 14 poles.

I discribed some additional specifications in the description of the youtube video.

Thank you very much!!

ArduinoDeXXX (author)PeshoPetrov2017-07-07

I saw your comment and video. I think that your code would be similar to the second sample sketch in Step6. To get a good gimbal, I have tried this sketch and abandoned it. See the two videos in Step7; DOCUMENTARY (7) and (8). In these videos the board attached to the top of BLDC motor cannot stay at a point. The board is bigger and heavier than yours. You might see the same situation if you attached a bigger and heavier board to your gimbal. You should try the sample sketch in Step10, which could work well with your BLDC for a single axis gimbal.

PeshoPetrov (author)ArduinoDeXXX2017-07-08

Thank you for your reply!!
You are right, if there is a bigger moment of inertia I will land at exactly at the behavior of DOCUMENTARY (7) and (8).
I am doing this project with the purpose to get experience in control theory and arduino and I want to follow your approach from DOCUMENTARY (7) and (8) to DOCUMENTARY (9) by myself and not just copy paste it.
Could you please advice where should I focus and which topics should I research to overcome my problem?
You mention that the difference between Y and Delta winding was a big point for you and also the change of the goal to "make the motor stop at the right position".

ArduinoDeXXX (author)PeshoPetrov2017-07-12

You can make your BLDC rotate. Hence you should not stay at Step6 or 7. I think you should move Step10 and try to get a single axis gimbal with the sample sketch at first. You will be able to know more with reading earlier messages and replies and changing the sample sketch.

PhilipW69 (author)2017-07-07

Hello ArduinoDeXXX
Very interesting project. Can you please tell me where I can find the arduino code for the project?

ArduinoDeXXX (author)PhilipW692017-07-07

Three sample sketches are shown in this article. The first two attached in Step6 could not work well for a gimbal. The last one for a single axis gimbal is attached in Step10.

ArduinoDeXXX (author)PhilipW692017-07-07

Three sample sketches are shown in this article. The first two in Step6
could not work well for a gimbal. The last one for a single axis gimbal is attached in Step10.

Bibou1207 (author)2017-06-21

Hello ArduinoDeXXX,
I've read your wonderful instructable on making a gimbal brushless, and I have been able to make one working on two axis (x and y). But I have come across a problem that I can't solve :

My start position for having setup leveled is different than yours, and when I modify the following lines in void calibrate :

analogWrite(motorPin1, 217);

analogWrite(motorPin2, 0);

analogWrite(motorPin3, 255);

with my values (0, 210, 255 for x-axis motor and 255, 188, 0 for y-axis motor)

it goes to the correct position for the calibration but returns to the previous position after that.
(see in the video, the calibration position (0, 210, 255) 00:01-00:03
and then the return to "standard position" (217, 0, 255) when in the main loop 00:04-00:07.)

I feel like I need to change something in the nLinePwm calculations but despite reading the comment you made to "game123" I don't really know what to change to make it keep the new start position.

Thanks for the help!

ArduinoDeXXX (author)Bibou12072017-06-21

In “void loop( )” in the sample sketch in Step10, the degree to rotate BLDC is decided by variable “deg1000” in the first function “chkAndCtl( )”. And the value of “deg1000” decides PWM output as variable “variPwm” in the the second function “calcPwms( )”. The angle of BLDC rotating can be shifted by adding a constant to “deg1000” between these two functions. See below.

chkAndCtl( );
deg1000 = deg1000 + 12345;
calcPwms( );

Bibou1207 (author)ArduinoDeXXX2017-06-23

Oh yes I didn't thought of adding a constant there...
Now the position is correct !
Thank you so much =)

wimba_ (author)2017-06-17

hi ArduinoDeXXX!

i see your project is very good, and i like it

so i made my own, but i am using other sensor

i just don't understand with deg1000 's value, if this value from reading the sensor

what kind of that value? is it degree or RAW data?

i'm sorry for my english, thanks before

ArduinoDeXXX (author)wimba_2017-06-17

Variable deg1000 represents 1000 times of the degree to rotate BLDC. You can find some topics about it in the comments below.

wimba_ (author)ArduinoDeXXX2017-06-18

thanks for your reply!

so that you mean value from deg1000 is the actual angle*1000?

for example the value of reading sensor is 90 degree, so deg1000 now is 90000?

ArduinoDeXXX (author)wimba_2017-06-18

Yes. See the comments of EricL50 and replies for them posted about 2 years ago. You can know more detail.

wimba_ (author)ArduinoDeXXX2017-06-19

i see thank you very much!

and i think your program is fixed program, i mean fixed constant value

when i use your program, i just get a little bit something error, so i try to setting with change the value of that constant value, like LnLvl10 and slope1000 and the other. But it didn't make a change. Actually where is the value that i can setting or tuning in your program?

like if i use PID control, that i can tuning by set the value of Kp,Ki, or Kd

ArduinoDeXXX (author)wimba_2017-06-19

Two sample sketches attached in Step6 could work with any 3 phase BLDC motors. On the other hand, the sample sketch attached in Step10 should be limited to 3 phase BLDC motors with 14-pole/12-slot. Though it could work with many 14-pole/12-slot BLDC motors, it might not work with a special Delta connection. However I have never been told such one. See Step8 and early comments of Ramirez_MecaUPQ and replies which contain pictures.

wimba_ (author)ArduinoDeXXX2017-06-20

here i using same motor with 14P12S

and when i upload your program in step10 without any load,it work so well

but when the load is placed, it won't stop at the point and also make a little shake

it has same result when i reduce the load with the thing that not heavy enough like the load before.

ArduinoDeXXX (author)wimba_2017-06-20

If your BLDC is the same model shown in Step5 or its successor model, the sample sketch in Step10 ought to work well. It holds rotator of BLDC strongly at a point when three PWM values are kept constant like “217, 0, 255”. If not, breaking of wire in BLDC is suspected. See earlier comments about this topic.

wimba_ (author)ArduinoDeXXX2017-06-21

thank you

i will try to fix it

TomaszT3 (author)2016-03-26

Hi ArduinoDeXXX!

I bought this motor:

But when I use your code (DOCUMENTARY 6) my motor behave like on movie:

(it isn't smooth)

Can you help me and say why it is so?

Thanks! :)

ArduinoDeXXX (author)TomaszT32016-03-26

It is hard to make BLDC rotate slowly and smoothly with the sample sketches attached to Step6. You will execute it with the sample sketch attached to Step10. See the comments of vonkross and the replies to them (*).

(*) The hyper link to earlier comment (under “More Comments” button) doesn’t work well.

TomaszT3 (author)ArduinoDeXXX2016-04-09

Hi! Thanks for your reply! :)

I made some progress, now my "gimbal" works like your in DOCUMENTARY 9 (its shaky)

But i can't understand how you improved gimbal by adding second gyro,
with single gyro I know that I need eg. 10degree, currenty is 50, my error is 40degree so a need to compenaste this, but how is it works with two gyros?

Have you done some other improvements?

Thank you! :)

PeshoPetrov (author)TomaszT32017-06-15

Hello Tomasz,

would you please upload the sketch you used for this video :) Thank you!!!

ArduinoDeXXX (author)TomaszT32016-04-09

In your video, a small shake of camera is observed at the end of compensation (such as 0:04-0:06). The shake of camera is observed in the video, DOCUMENTARY (11), in Step9 at 1:51-1:58 also. There the secondary gyro attached to the camera-mount does not work. On the other hand, the shake does not appear in the same video at 2:14-2:24. There the secondary gyro attached to the camera-mount works to counteract the shake.

I think you can get good answer by yourself when you complete your gimbal and execute trials and error in practice.

TomaszT3 (author)ArduinoDeXXX2016-04-17

I finally go it!
Thank you very much ArduinoDeXXX! :)

the_3d6 (author)2017-06-07

Wow, a great effort and very detailed report! Thanks!
Once we made a similar project, but it turned out that atmega328 isn't enough to handle 3-axis stabilization at proper speed (it wasn't able to compensate for really fast vibrations), so we switched to stm32 instead. Gimbal chattering was almost completely gone (appeared only in some very special positions) when we managed to complete feedback cycle in less than 1 millisecond. On atmega it was around 6 milliseconds, and I'm almost sure it isn't possible to completely get rid of chattering at such speed.

ArduinoDeXXX (author)the_3d62017-06-07

Thank you for your good comment. I also have suspected that Arduino Mega with ATmega2560 does not have enough power for my DIY gimbal. Hence I have gotten Arduino Due which has ARM Cortex-M3 CPU in AT91SAM3X8E.

I have corrected the original sketch for Mega to work with Due. Though it works well with default PWM frequency, the loud noise is heard. I am searching a good code for Due which can change PWM frequency higher to shift the noise into non-audible range (31kHz) with no trouble.

the_3d6 (author)ArduinoDeXXX2017-06-08

Due is fast enough, but I highly doubt you can find good enough PWM library for it (actually I don't know a good library even for atmega328, have to write registers directly anyway). Your best shot is to go through its datasheet, and find out how to switch timers into PWM mode using their registers. But it is quite complicated, I just took a look here: - and pages from 970 describe its PWM module, can't even really understand how to make it (on page 996 there is "simple 19-step guide" and pages 1003-1006 describe "user interface" registers).
STM32 is so much easier with their HAL library! After stm32Cube makes all initialization code for you, controlling timer takes just a few rather intuitive lines. I really recommend to try it (there are a lot of Nucleo and Discovery boards with stm32F0, F1, F3 and F4 series processors, here F1 is optimal, F4 is much more powerful, but also somewhat more complicated)

ArduinoDeXXX (author)the_3d62017-06-08

Thank you. I appreciate your suggestion. I get a good alternative.

I have looked for topics in web about changing PWM frequency of Due. Then I found a forum about it. A very simple way is described in it. It tells that all we should do are simple changes in variant.h in the Arduino library.

However I cannot find variant.h in my old IDE or the latest version in web. I have downloaded earlier versions between the former and the latter. At last I found it in IDE 1.6.0 and 1.6.1. Why it cannot be found in the later versions?

I felt something disquieting. I stopped and left it for other new projects. I am going to come back to variant.h when these new projects are finished.

rs2k17 (author)2017-03-04

I'm finding it difficult to source the L3GD20 sensor. You mention the MPU6050 sensor in your instructable. These are much more readily available in my area. If I were to replace the L3GD20 sensors with MPU6050 sensors, would the gimbal require any additional components or amendments to your code? Or would it be a straightforward exchange?

ArduinoDeXXX (author)rs2k172017-03-04

MPU6050 has a powerful engine called “DMP”. See Step5. It does not seem as simple as described in Introduction. Hence I did not use it in this project.

Though you can use it as a simple gyro module without activating DMP, I think you will get a problem. It seems that the protocol for MPU6050 is restricted to I2C, and only two addresses, 0x68 and 0x69, are allowed for MPU6050. A pair of gyro modules is required for each axis in this project. It means that you can make only single axis gimbal if you use a MPU6050 as a simple gyro module.

I think you should activate DMP if you use MPU6050. However you have to learn how to use DMP additionally, and I have never used it.

MatteoC47 (author)2017-02-16

Hi :D

I'm trying to reply your project using my hardware but I don't understand how to change the phases of brushless motor according to the angle detected by the gyro. I've read your program but I didn't understood the meaning of your operation.

ArduinoDeXXX (author)MatteoC472017-02-16

I have gotten several comments like you ever. Abil FidaA, ericlo_00, EricL50, vonkross, KhalilY3, AndreaM157 and others posted them. See these earlier comments and replies to them.

MadhupP1 (author)2017-02-15


Where can I find the modified sketch for the 3 axis gimble?

I can only seem to find and download the sketch for single axis gimble.


ArduinoDeXXX (author)MadhupP12017-02-15

My DIY 3-axis gimbal is very special for my own development. And its sketch is special, too. However the core of the program of multi-axis gimbal here is not different from the single axis one. See Introduction. All sketches I can provide at present are attached here.

GiankM (author)2017-01-01

Hi ArduinoDeXX,

At the first happy new year and more wonderful project here!! :-)

I wish to know how are the possible issues to apply your project on a large DSLR camera gimbal.

Thank you for a reply.


ArduinoDeXXX (author)GiankM2017-01-01

Happy New Year,

I think this article would work for making a DIY large DSLR camera gimbal. However it would need several points to be reinforced.

(1) Replace BLDC motor(s) with more powerful one.
Heat sink(s) might have to be attached to driver IC(s).

(2) Build a more rigid frame with aluminum or carbon fiber plates.

If you are NOT a very DIY Hobbyist, I think you should buy a suitable gimbal on the market.

GiankM (author)ArduinoDeXXX2017-01-02

Thank you for your quick reply.
I'm an R/C hobbyst and i know the building difficulties too! :-)
Your suggestions are appreciated thank you! :-)

AbdulR201 (author)2016-12-28

hi, ArduinoDeXXX

can you describe your PID control please?

I have a job from my collage to make that project, can you help me

ArduinoDeXXX (author)AbdulR2012016-12-28


See the earlier comments of edward.chamberlain and its reply.

AbdulR201 (author)ArduinoDeXXX2016-12-28


but i want to ask, i use MPU 6050 for make a project stabilizer servo dynamixel robotis.

i had fusion gyro and accelerometer use complementary filter and than i had problem to use PID for servo.

do you have PID formula for my problem? :)

ArduinoDeXXX (author)AbdulR2012016-12-29

I feel that it is not easy to drive servo motor with PID control. See Step 3 and 4 in this article.

And I have posted two articles for making a self-balancing robot with a gyro. See my page in Instructables.

AbdulR201 (author)ArduinoDeXXX2016-12-29

do you have code for self balancing pwm servo?

ArduinoDeXXX (author)AbdulR2012016-12-29

No, sorry.

AbdulR201 (author)AbdulR2012016-12-29

thank you for fast respon than another

ReinerS1 (author)2016-12-26

Hi, ArduinoDeXXX

for this holiday i decided to create this project. and this is my first time doing arduino project. so far i learned so much stuff from your project (arduino ide,brushless and sensor). and btw im completely begginer in electronic diy

i want to ask about my motor, i tried your test code


void setup () {
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
void loop (){
analogWrite(9, 0 );
analogWrite(10, 255 );
analogWrite(11, 0 );
analogWrite(9, 0 );
analogWrite(10, 255 );
analogWrite(11, 255 );


my motor spin when i upload the test sketch even without external voltage supply. but when i upload your sketch

at documentary six "BLDC_with_3phase_square.pdf", my motor wont spin,it only jerk a little. my motor also have 12N14P , i thought the code will work but it doesnt. can you help me about this?

i've only learn about matlab programing, so im clueless about your BLDC3phasecodesquare.

About This Instructable



More by ArduinoDeXXX:A Levitating Sphere Rotates Glows and Blinks with ArduinoArduinoで作る浮遊光球Another Easier Inverted Pendulum Robot
Add instructable to: