Tag Archives: flash

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.

IMG_9914

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

IMAG0295IMAG0297

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.

KKmulticopter.Pic1

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 🙂

KKmulticopter.Pic2

Naze32 Acro to Naze32 Full

Back in September last year I wrote about the Naze32 Acro that I bought from HobbyKing. I hoped they will offer the full Naze32 version with the MS5611 barometer and HMC5883L magnetometer, but this didn’t happen. This full version is even not available on the developers website. There are retailers, that sell the board for 55 – 60 € in Europe. The acro version cost me only 22 € including shipping. So I decided to upgrade my Naze32 Acro to Naze32 Full.

The MS5611 barometer and HMC5883L magnetometer cost about 10$ incl. shipping from Aliexpress.com.

  • HMC5883L Magnetometer from GY-271 Board and even use the capacitors later on the Naze32.

Needed capacitors (μF – Micro farad).

  • 1x 4.7μF
  • 1x 0.22μF
  • 3x 0.1μF

Needed tools: Heat gun/Hot air gun, tweezers, hands free item holder and a solder paste.

IMG_9197

Before you start it is not bad to download the datasheet for the MS5611 and for the HMC5883L. Check out these datasheets to see where is the Pin1 on the downside. On the picture below you can find how to position the sensors and the capacitors (open the original file for better resolution, not the thumbnail).

Naze32Full

How to do it: put very small amount of solder paste on the empty pins of the board, position the parts on the board and apply heat with the hot air gun on the downside of the board. It took me about 20 – 30 seconds on 450 C to melt the solder paste. It is a bit tricky to place all this small sensors and caps right, but that is how it is with SMD. If you have done everything right, now you have upgraded your Naze32 Acro to (almost*) full Naze32 for about 10 $.

IMG_9195

* On the full version there is SPI flash memory too. As far as I know this is not used yet.

Update 12.03.2015: Well as the Cleanflight firmware gets updated, now there is an option for saving some flight data (Blackbox). The needed flash chip is the 25P16VP (same as on the OpenPilot CC3D). Here is a link to the datasheet.

Update 09.06.2015: If you think the soldering of the sensors is not for you, there is a bit cheaper Naze32 Full here.