Quadrocopter ESC

For Copter use, the ESC (Electronic Speed Control) for the brushless motors needs to be modified. Usually the signal update rate for the ESC is 50 Hz (20 ms) from the Radio Control (RC). For a smoother control of the copter this update rate should be faster, about 500 Hz.

For an explanation of the ESC, see at Links 1.

In October 2004 Bernhard Konze, see at Links 2, developed an assembler program (Atmel ATmega8) for such a faster ESC operation.

In 2011 Simon Kirky updated the software (Atmel ATmega8) to allow a broader range of commercial ESC to be modified to a faster update rate, see at Links 3.

There is a good list which commercial ESC could be modified, see at Links 4.

Unfortunately in 2014 more ESC are build with a SiLabs C8051F334 MPU (Micro Processing Unit, 8051 core), which could be no longer modified. The good thing is, that Hobbyking.com is now selling ESC with SimonK program already included.

Fortunately for some ESC from the year 2011 with SiLabs MPU there is also a modified with faster update rate available, see Links 4. The software has a beacon functionality, where the ESC will start beeping after a given time (10 min?) of zero throttle. This can be very useful for finding lost crafts.


Click on the pictures to enlarge.

Turnigy Plush 10 A ESC

Fortunately there are 4 test pads on the board, which you can use for reprogramming, see the picture on the right. There is a thread and tutorial about programming this type of ESC at rcgroups.com, see Links 14/15.

So, i soldered 3 wires from the test pads to a 3 pin IC socket, glued on top of the electrolyte capacitor.

For programming you need an interface, either the SiLabs ToolStick, or an Arduino board.


In my case I used a low cost China made Arduino Nano 3.0 board. I have downloaded the package release-20131027.

Warning: Today, October 2014, you have to be beware of the USB-Serial Converter. If it is a FTDI cloned chip, it may be bricked by a new FTDI driver under MS Windows and probably Mac OS X. Search on http://youtube.com with the words unbrick ftdi for more information.

The wiring between the Arduino Nano3 and the ESC is made with 3 wires, see the picture on the right.


The ESC must be powered from the battery plug while programming. It is recommended to use a current limiting (0.2 A) power supply, just in case of a wrong wiring.

Then I used the Win32 program BLHelitool.exe (Links 16) for programming the file TURNIGY_PLUSH_10A_MULTI_REV10_4.HEX. The beep parameter was a little bit calm with the value 40. I set it to 128 to get a more louder start tone sequence. The latest revision 12.1 of BLHeli is not supported by the program BLHelitool.exe (checked at 2014-11).

2015-03-21 One problem was with the parameter beacon delay, which was set by default to 3 minutes (parameter = 4). This function should help with beeping to find the copter, in case the copter got lost. Under normal circumstances 3 minutes are enough to start the BL motors. But if you have GPS on board, it may need up to 15 minutes to find 8 satellites. Then you have to listen 12 minutes to the beeps of the beacon function, what could make you nervous. Therefore I programmed it to 5 = infinite, which means no more beeps.


Hobbyking SS18A ESC

I bought in October 2011 4 pieces of Hobbyking.com SS Series 15-18A ESC. Yes, they are very cheap, but the cable to the receiver was shorted to 10 cm, and the Atmel ATmega8 MPU was no longer in the TQFP (Thin Profile Plastic Quad Flat Package, 9 x 9 mm, 0.8 mm pin spacing), instead in the MLF (Micro Lead Frame Package, 5 x 5 mm, 0.5 mm pin spacing), which makes it more difficult to solder wires to the chip for reprogramming, see the picture to the right (click on the picture to magnify).

For the wires I used thin wire-wrap wire. At the free side I glued with hot glue a 6 pin IC socket to the board, and shorted the pins to about 1 mm length. First the 2 power supply wires are soldered. The other 4 wires are soldered one after the other to the chip, see the data sheet page 2 for the pin out.


First I soldered the wire to the IC connector, the bent it, that the tinned end of the wire just touches the pin of the chip. Then, with a head lens and good light, I press for a few seconds with the soldering iron the wire down to the already tinned pin of the chip.

Wiring schematic:
pin IC socket, Signal name, pin of the ATmega8

1  MISO    16 (lower row, most right)
2  VCC     capacitor
3  SCK     17 (right side, most down)
4  MOSI    15 (lower row)
5  Reset-  29 (upper row, 4th from the left) 
6  GND     regulator pin

Software Assembly

For test I use a Servo Tester board.

I started with a hex file tp_8khz.hex and it worked, the motor turned. In the test I once powered the ESC up with the pulse width in the middle (about 1.5 ms). Then I could let the motor run forward and backward, why? It has to do with the parameter RC_PULS_REVERSE which was set to 1 in the source code.

Unfortunately, once set, you can not delete this parameter by software, only by clearing the EEPROM content, which needs a programmer. The same is true for the parameter RC_CALIBRATION, once set to 1.

Therefore I need to set those parameters by myself, and assemble the program by myself.

I wanted to do that on Mac OS, so I installed Crosspack-AVR, see Links 6. Unfortunately the assembler does not follow the Atmel syntax, so I ve to use either Atmel Studio (actual version 6.2, win32 only, about 700 MB), or avra (version 1.3, freeware for Linux, Mac OS, Win32)), see at Links 7. For Linux you get an already compiled program. For Mac OS and Win32 you have to compile from the source code.

Next I tried avra on Mac OS, unfortunately I got an error while assembly:

make tgy.hex
Pass 1...
/bin/bash: line 1:   729 Abort trap: 6           avra -fI -o tgy.hex -D tgy_esc -e tgy.eeprom -d tgy.obj tgy.asm 2>&1
       730 Done                    | grep -v 'PRAGMA directives currently ignored'
make: *** [tgy.hex] Error 134

Doing the same thing on Linux (Ubuntu 14.0) works perfect. Now I had the file tp_8khz.hex and can program the ESC. This program also contains a boot loader for a self update via the pulse input wire. I will describe that in Arduino USB Linker.

Programmer USBtinyISP, avrdude

As a low cost programmer hardware USBtinyISP is used, see Links 5. The software used was avrdude (version 6.0.1) which is available for Linux, Mac OS, and Win32.

I am working on Mac OS, so the command line for programming looks like:

# flashing the ESC program
$ avrdude -c usbtiny -p m8 -U flash:w:tp_8khz.hex

# flashing the fuses for boot load, and brown out voltage 4.0 V
$ avrdude -c usbtiny -p m8 -U lfuse:w:0x3f:m -U hfuse:w:0xca:m

To check for the right fuse bits, you can use an online calculator, see at Links 8.


Once the ESC is mounted, it is no longer easy to reflash a new program. In this case it would be nice to reflash the ESC via the pulse input wire. That can be done with either the Hobbyking.com hexTronik USB Key for HXT BESC, see at Links 9, or an Arduino board, either Uno or Nano 3.0, and the program ArduinoUSBLinker, see at Links 10.

Take care, that you can not flash the fuses, just the program itself.

I have used an Arduino Nano 3.0 board. The connection is:

Arduino Nano   ESC
GND            GND
D2             Pulse Input
# +5 V must NOT be connected

First the program ArduinoUSBLinker.ino must be programmed with the Arduino IDE. You can check if it works by starting the Arduino Monitor with a Baud Rate 19200 baud:

# type: $M< ENTER
# answer:

Then make a connection from the Arduino board to the ESC. The ESC must be self powered. The handling to flash a new program under Mac OS is:

# check for good function:
$ avrdude -c stk500v2 -b 19200 -P /dev/cu.usbserial-A9GNVXD1  -p m8
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.10s
avrdude: Device signature = 0x1e9307
avrdude: safemode: Fuses OK (H:FF, E:00, L:00)
avrdude done.  Thank you.

# flash the new file tp_8khz.hex:
$ avrdude -c stk500v2 -b 19200 -P /dev/cu.usbserial-A9GNVXD1  -p m8 -U flash:v:tp_8khz.hex:i

rcgroups discussion

In http://www.rcgroups.com there is a big discussion about RCTimer/Turnigy/Hobbywing ESC DIY Firmware Flashing.

SimonK potsted about the Hobbyking.com Super Simple 18A ESC flashing, see at Links 11, page 241.

He recommends the variant tp_8khz.hex, via the words:

"A FET may have failed partially in a way that still allows it to beep. I'm thinking about changing tp.hex to always run at 8kHz PWM, unless anybody has a better idea. It's not really a heatsink/no heatsink thing. Under the right conditions, the HK-SS board design will just blow up regardless of a heatsink.".

User Raj Quest reports on page 240 (2012-05-06) that the program tp.hex could give a problem with over heating. This already mentioned on page 230 from user cyhyam (2012-04-25), and commented from user timecop: "Yes, F20 will be better. Stop using obsolete P/N fet designs, switch to all N-fet. Cooler, more efficient. Bonus of extosc. ".

On page 211 user timecop told (2012-04-06) about Silabs MPU: "rctimer cloned hobbywing a while ago, back when they were using atmega-based design. however, since then hw switched to silabs, and rctimer has no plans to do so".

On page 181 user ashtasky (2012-03-13) told about hot ESC and demonstrated the copter stability in a video.

On page 109 user alteskind (2012-01-23) mentioned a tutorial for flashing HK Super Simple 18A ESC, see at Links 13.

On page 51 user simonK (2011-12-13) posted about SS18A heating up with tp.hex, better use tp_8khz.hex.

There is also a hint about the hobbyking.com Atmel programmer USBasp, see at Links 12.

  1. ESC = Electronic_speed_control

  2. Bernhard Konze, Reprogramming ESC

  3. SimonK, tgy -- Open Source Firmware for ATmega-based Brushless ESCs

  4. Spreadsheet list of ESC with status for modification posibility

  5. USBtinyISP, programmer for Atmel processors

  6. Crosspack-AVR for Mac OS

  7. avra assembler, source code

  8. Atmel fuse online calculator

  9. hexTronik USB Key for HXT BESC

  10. ArduinoUSBLinker

  11. SimonK, HK SS18A, tp_8khz.hex

  12. Hobbyking USBAP Atmel USB programmer with 6/10 pin cable

  13. Tutorial to flash HK Super Simple 18A ESC

  14. Flashing Turnigy Plush(SiLabs) success

  15. flashing-silabs-escs-with-blheli-firmware

  16. owsilprog-tutorials (German)

  17. BLHeli source and HEX files

List of pages in this category:

-- RudolfReuter 2014-11-01 10:51:21

Go back to CategoryQuadrocopter or FrontPage ; KontaktEmail (ContactEmail)

QuadrocopterESC (last edited 2015-03-21 18:01:43 by RudolfReuter)