Tag Archives: how to

How to flash SimonK and enable comp_pwm

Many of the ESCs on the market have their own firmware and are not optimized for using in multicopters. The solution to this problem is to flash a special firmware on these. Note: Not all of the ESCs can be flashed with these firmwares. Check this list to see which ESCs are supported.

Two of the most used firmwares are the SimonK and BLHeli. Which one is better is hardly to say, especially when using different type of motors. Here I will show you, how to flash the SimonK firmware on an HK BlueSeries 12a ESC and more importantly how to enable the comp_pwm function on it.

But what is comp_pwm? It is not exact the same thing as damped light on BLHeli, but it performs a bit like an ESC with damped light function enabled. On the KISS ESCs it is called active freewheeling. It switches the passive MOSFET on your ESC “ON” during the freewheeling phases and by this reducing the power loss. If you want to learn more about PWM and active freewheeling, watch this video here.

Back to damped light or regenerative braking: what does it do? When you reduce the throttle the motor does not stop immediately. When comp_pwm is enabled, it also helps the ESC to stop the motor faster. This allows faster response of your copter. This video shows it very clear. Note: I am not sure if the guy in the video has enabled the comp_pwm feature on the ESC with the SimonK 2014-09-30 firmware. On SimonK firmware the alternative of damped light is called “MOTOR_BRAKE” and can also be enabled.

You will need the following tools to flash the SimonK or BLHeli firmware on your ESC:

  • An ISP Programmer – USBasp AVR Programming Device for ATMEL; you can also use an Arduino as ISP device, but it is easier with the USBasp. If you still want to use the Arduino check how to do it on this page. You will need to install the drivers for it too.
  • Atmel Atmega Socket Firmware Flashing Tool. On some ESCs, that have pads on the PCB board you can even do it without this tool. I have done it once on my HK BlueSeries 30A, but it is much much easier with that tool. It is worth every penny and saved me so much time.

There are several software applications you use to flash the firmware. I have always used the KKmulticopter Flash Tool. If you want to enable the comp_pwm function you will need the latest version 0.80 beta 6.

I will show you how to do the flashing with the KKmulticopter Flash Tool. Plug the USBasp into your PCs USB-port. If you are using the Atmega Socket Firmware Flashing Tool connect it to the USBasp device.


If you have decided to do it without the tool, connect the pins of your USBasp device with cables to the pads of your ESC (you need to identify the MISO, MOSI, GND, VCC, SCK and RESET pads on your ESC).


Once everything is connected you need to supply power to the ESC. It is not recommended to use a LiPo battery as a external power supply, so do it on your own risk.

Start the KKmulticopter Flash Tool. Choose the USBasp as a programmer. Then choose your ESC type. As said I will be flashing my HK BlueSeries 12a, which has an atmega8 (note: most of the ESCs on the market has this one or a Silabs-chip). Be sure to choose the one “+ enable Bootloader”, so you can later flash new firmware easily trough the servo-cable of the ESC.

It is very important to flash the right firmware on the ESC or you can damage it. The list with the supported ESCs on top of this page tells you, which one is the right for you. Last but not least you can define the firmware version. The latest one SimonK from 2015-04-19 support another useful function called “OneShot125”. It is a modification on how the flight controller and the ESC communicate between each other. It should give us a more responsive system, but there could be issues with some ESCs and motors.


If you don’t want to enable comp_pwm, you need only to click on the green button and the firmware will be flashed to the ESC. You should get the “Flashing of firmware was successful” message.

If you want to get use of the feature click on the “SimonK Firmware Compiler”-Tab. Select the version, click Download on the right and choose again the right one for your ESC. Then on the tgy.asm-Tab scroll down to the line where COMP_PWM is defined. To use enable it replace the “0” with “1”, click “Save” and then “Compile”. The newly created file is ready to flash and you can click on the green button to flash it on the ESC. That’s it 🙂


How to build a foldable motor thrust stand

I wanted to test my motors with different propellers and battery combinations, to achieve better flight time with my multicopters. So I decided to build a so called motor thrust stand. I wanted it to be portable and compact, so a foldable one should be a good solution.

Needed parts:

  • 2 pieces of wood for the arms: 400mm x 46mm x 19mm
  • 2 pieces of wood for the base: 100mm x 46mm x 19mm
  • The carbon parts on the picture for mounting the motor and to put the arms together. File is free to use, so you can build your own.
  • 4 x M4 screws and nuts
  • Shaft (To-do: Find a metal shaft)
  • Watt-Meter and RPM/KV-Meter
  • Scale

Drilled all the needed holes in the wood. The carbon parts were already drilled from my local manufacture.


Then assembled the parts with the needed screws. Well that’s it for now. I need to find a metal shaft (not like on the last picture) so the thrust stand is strong enough and not shaky. Connecting the motor, ESC, watt-meter and battery is easy, so need to show that.


Quadcopter with MultiWii running on Arduino Uno

Last week I posted an article on how to connect all the parts you need for a quadcopter. I used my KK2.0 flight board for a while. Last month I bought an MultiWii and MegaPirate AIO board and I use it now on my quadcopter. But today I wanted to test if I can use my Arduino Uno with a Chinese GY-86 IMU for my quadcopter-build. All you need are the essential quadcopter parts and: Arduino Uno, IMU (with MS5611, HMC5883L and MPU6050 sensors) and some cables. You can also use Arduino Nano or Arduino MEGA board, as well an IMU with only an MPU6050.

Arduino UnoGY-86 IMU

All you need to do: connect all the quadcopter parts as previously described without the flight board (you want to use the Arduino as flight board). Remove the propellers from the motors for safety reasons. Connect the receiver (RX) and IMU to the following pins on your Arduino Uno:


You also need to connect the tiny cables from your ESCs to the Arduino Uno. The cable from ESC Nr. 1 will provide the Arduino board with power. So you need to connect not only the signal cable (yellow) but also Ground (brown) and Positive (red).


Once you have done all these connections you need to install the MultiWii firmware on your Arduino Uno. To do this download the latest MultiWii firmware.

Unzip the file and open the MultiWii.ino file from the MultiWii folder. As stated in the MultiWii manual you need to define some lines in the config.h tab in your Arduino software. Then upload the sketch on your Arduino Uno (this must be connected to the USB port of your PC and not to the battery of your quadcopter).

Start the MultiWiiConf.exe from the MultiWiiConf folder. Select the right COM port, click connect and then start . If everything is connected right, you should see a graphic of your quadcopter moving, when you move your quadcopter. If you want to change some of the numbers, do this: move the mouse cursor over the number you want to change, click and slide. Once you have done this, disconnect from the USB port, turn on your transmitter, connect the battery and do some test without the propellers to check if all motors spin in the right way. That’s it!

If you need more information visit the official MultiWii website. You can find additional information, on how to install MultiWii on other Arduino boards. Have a fun with your copter and if you liked my article, feel free to share it :).

Update 09.06.2015: Although it is great fun using an 8bit Arduino with MultiWii as a flight controller, there are better and cheaper 32bit flight controllers using the MultiWii firmware too. The two big competitors for now are Naze32 and CC3D.

Building my Quadcopter

In my last article I described which parts do we need, so we can build a 300$ quadcopter. I will try to explain the building process as simple as possible. In this article I would not mention how to optimize your copter by eliminating vibrations, balancing props or tuning the PID settings of your flight board. In my opinion a beginner should start with the basics and then learn new things step by step. So let´s get started.

In my very first quadcopter I used the X525 frame from HobbyKing, but later I created my own frame. This one is made of plywood on a CNC-machine. If you bought the X525 frame you should start with assembling it first. An assembly manual is included in the package with it. When you are ready with this step, then you should mount the 4 motors on it, without any attached propellers. The Turnigy D2830-11 motors come with a mounting adapter, screws and prop-adapters. On the X525 you don’t need the mounting adapters and can easily mount the motors direct on the glass fiber motor mounts. On the picture below you can see the motor on my actual plywood frame.


On the second picture you can see it from the bottom side. Here we come to the next step: connecting the four ESCs with the motors. Every ESC has on the one side 3 cables (red, black and yellow) and on the other side 2 cables (red and black). There is also a tiny cable which ends with a male-plug.


Please note that the ESC on the picture has no connectors on its cables. As I mentioned in my first article you can buy these 3.5mm gold connectors and solder them on the ESC. By two of the ESCs (either Nr.1 and Nr.3, or Nr. 2 and Nr. 4) you should reverse the red and yellow cables. This is because we want two of the motors to spin in counter-clock direction. I tried to illustrate this on the picture below.


Propellers: The right one spins in clock direction, the left one in counter-clock direction. I had the problem as a beginner that, I didn’t mount the right prop on the right motor and so my quad either not take off or flipped. So take you time and do it right.

Next you should connect these tiny cables from each ESC to your flight board. If you bought the KK 2.0 board or the newer one KK 2.1, you can check the next picture on how to do it right. The cable from ESC 1 (front left) comes on pin1, ESC 2 (front right) comes on pin2, ESC3 (bottom right) comes on pin3 and ESC 4 (bottom left) comes on pin4. The tiny-cables must have this order from left to right: yellow, red, brown.

Then you should connect the other cables of each ESC to the battery. All 4 red cables to the red cable on the battery and all 4 black cables to the black cable on the battery. There are three ways to accomplish that: You have bought a power distribution board and solder the cables on that one. Or you bought a power breakout cable…or you make yourself one.


Once you have done this, you should connect the receiver (RX) to the board. On the KK2.0 and KK2.1 the receiver-pins are on the left side. You need at least a 4-Channel-RX for a quadcopter and if you are using the KK board it is good to have a 6CH or more. When connecting the cables to the board, beware: from right to left: yellow, red, brown. (Brown for ground, red for VCC and yellow for signal cable). If you want to test, if all the cables are right connected go to the “Receiver Screen” on your KK board and do this: Move the sticks on your Transmitter (TX) and see if it is right indicated on the screen. Probably you should also reverse some of the channels on your TX to do it working properly.

So if everything is connected the right way you can try to make your first fly. To do this you need to “ARM” your flight board. Move the Throttle-Stick on your transmitter down and right and hold it for a few seconds and then release it. In this case the board should indicate “Armed”. Now move your throttle stick very slowly so the motors start spinning. Then move it again very carefully and observe the behavior of the copter. If you have problems such as not taking off or flipping, as said you had mounted the props wrong or connected the yellow and red cables of the ESCs wrong. If so, “disarm” your copter by moving the throttle stick down and left for a few seconds, so the KK board shows the “Safe” screen. Then try to fix the problem and try again. If you cant solve the problem, you can either search on google or comment here.

At the end: Beware, these machines are not toys, they have a lot of power and can heart people. Be careful when flying and have fun. If you find my article useful, please click on the buttons below to share it. Thanks!

02.06.2014 Update: Here you can see my new build with the “SG Adventure” carbon frame.

How to build a Quadcopter

A few years ago I read an article about the so called “Drones” and I was very excited about the idea of building my own drone. Last year after my final-exams I had a lot of time, so I decided to build my first QuadCopter. My budget was about 300 $. The most popular website I found was: hobbyking.com. So I started buying the parts. Here are the ones I bought, but you can choose your own if you have a bigger budget:

First you need a frame, where you will mount the motors and the electronic-parts. I chose a X525 Glass Fiber frame for 15.25 $. It looks cool and is very durable. A year after I work on my own frame, but as a beginner it was the best choice.

For a QuadCopter you need naturally 4 electric motors. I chose this one: Turnigy D2830-11 1000kv for 9,5 $. I’m still using these in my own quadcopter. There are some better motors, but they are more expensive too.

For all types of MultiCopters (Quadcopter, Hexacopter, Octocopter, Tricopter) you need the so called “speed controllers” (ESC). A speed controller is the electric part, which regulate how fast your motor will spin. My choice was a  HobbyKing 30A BlueSeries Brushless Speed Controller. One of these cost about 11 $. As you have 4 motors on a quadcopter, you also need 4 speed controllers. In February I was able to upgrade the firmware of the speed controllers with the very popular SimonK. It is specially created for multirotors and there was a big difference before and after the software upgrade. To do this you need a little bit of solder skills. As I said if you have a bit bigger budget you can directly buy four of the Afro 30A Speed Controller, which is already upgraded with the SimonK firmware. This one cost about 14 $.

Probably the most important part of every multicopter is the Flight Controller or Flight Board. There are some extremely good flight controllers such as the DJI Naza. Here is a link for the DJI Products Website. This one cost about 300 $. So it was too much for my budget. I decided to get the Hobbyking KK 2.0 Board for 30 $. For that price it is a very good flight controller, but it lacks the altitude hold because there is no barometer on the board. My copter is still with this board and it still works well after a lot of crashes. Last month Hobbyking introduced the successor of the KK 2.0 board – the KK 2.1 board. Practically it is the same board with upgraded software and some upgraded sensors. It still doesn’t have a altitude hold. And it still costs 30 $. Another good flight controller is the APM 2.6 by 3D-Robotics with GPS. This could be my next flight controller, but now I don’t have the 240 $ for it. There are clones of this board, but is always good choice to support the original one if you have the resources $$$.

For a quadcopter you also need 2 x Standard Rotation and 2 x Right Hand Rotation propellers. I decided that the best propeller size for my quadcopter build is 10×4.5. So I bought this pack for 2,6 $ from Hobbyking. Well I bought 3 packs for the case I will crash my quadcopter. And… I crashed it many times… so it was a good decision.

At first I bought a 2200mAh 3S 40C LiPo battery for 15$ and it was ok, but then I decided that I need more flight time, so I bought also a 3300mAh 3S 30C LiPo for 26 $. The first one has 3.5mm connector and the second one 4mm connector.

As a beginner I didn’t knew that the KK 2.0 flight board comes without cables to the receiver. So I didn’t buy these Male to Male Servo Leads for 4 $. Then I bought these on ebay for much more.

You will need some 3.5mm gold connectors and 4mm gold connectors for the speed controllers and for the battery. If you don’t want to solder, then you will need to buy presoldered ESCs (such as the Afro 30A speed controller) and this 3.5mm Power Breakout Cable. The last one can be used with the 3300mAh 3S LiPo battery. I also bought some zip ties.

Annnddd last but not least you need a transmitter for your drone. For a multirotor a simple 4 Channel radio will be ok. The KK 2.0 board have also a Self-level-feature, so you will need 5 CH. My first choice was the DX6i by Spektrum. It is a very good radio but it was too expensive for me, so I got the cheap Turnigy 9x. It is also a very good 9 Channel radio for 50 $. It has not the design and build quality of the Spektrum, but for a beginner it was and still is a good choice.

So my order was about 230 $ and 40 $ for shipping, overall 270 $ for my first quadcopter. It is still not a small amount of money, but the feeling of building your own drone and then see it flying … priceless.

p.s. In the next weeks I will also blog about the build process and my troubles with the quadcopter.