A fellow named SimonK has written custom ESC firmware that is optimized for quadcopters and can be loaded on to many common ESCs. My understanding is that the new firmware sends speed changes directly to the quadcopter motors rather than averaging the changes. To use the SimonK code an ESC must be flashed using an AVR programmer. I recently purchased some 25Amp ESCs and gave it a try.
Warning – It is possible to ruin an ESC when attempting this process. Also, factory installed flash is overwritten.
That said, I found it to be an easy process and all of my ESCs work with the SimonK code. Continue reading to see how I successfully flashed my ESCs…
Update 9/20/12 - This Atmel Atmega Socket Firmware Flashing Tool is probably the fastest and easiest way to connect a USBasp programmer to an ESC.
Update 8/11/12 - Recently I discovered a much easier and faster way to flash better all N-Fet ESCs. You can read about it in my post called Simple Flashing of HobbyKing Blue Series with SimonK Firmware.
Choosing ESCs to Flash
To flash ESCs with the SimonK firmware they must have an Atmel processor. ESCs with SiLabs processors may be able to use BLHeli firmware. Also, it is easiest to flash ESCs that have pads intended for flashing. If the ESCs don’t have pads, connections have to be made directly to the Atmel processor. These connections are tiny and much harder to accomplish. The ESCs I chose met those two requirements.
I changed the flash on 25 Amp Dynam Detrum ESCs that I bought at HobbyPartz.com. I like their site because they are pretty cheap and they ship from the US. These ESCs use a programming card that looks just like the one the Turnigy Plush ESCs use. So, I ordered them hoping they could be programmed with the Turnigy version of SimonK’s flash. When they arrived I cut off the heat shrink to compare the chip layout to a picture of the Turnigy/Hobbywing 25A ESC on the RCGroups ESC DIY Firmware Flashing thread.
As you can see, they look very much like the Turnigy 25A ESCs pictured on RCGroups. These are actually old style ESCs. The new Turnigy 25A ESCs use chips from Silicon Labs and will not work with the SimonK firmware. Since these looked flashable, I decided to give it a go.
N-Fet and External Oscillator ESC Design
I later learned that these ESCs have N-FETs and P-FETs (little electronic switches). ESCs with only N-FETs and an external oscillator run cooler and perform better with the SimonK code and would have been a better choice.
You never know for sure what will be under the heatshrink and I haven’t tried or tested any of these ESCs, but here is a list of some ESCs that others suggest using. Keep in mind that many of these may not have flashing pads and may require connecting directly to the processor or other places on the board.
Mystery 12A Brushless Speed Controller (Blue Series)
Mystery 20A Brushless Speed Controller (Blue Series)
Mystery 30A BEC Brushless Speed Controller (Blue Series)
Mystery 40A Brushless Speed Controller (Blue Series)
HobbyKing 12A BlueSeries Brushless Speed Controller
HobbyKing 20A BlueSeries Brushless Speed Controller
HobbyKing 30A BlueSeries Brushless Speed Controller
HobbyKing 40A BlueSeries Brushless Speed Controller
Hobby King 20A ESC 3A UBEC
Hobby King 30A ESC 3A UBEC
Hobby King 40A ESC 4A UBEC
First, I had to build a rig to flash the ESCs. After seeing many rigs built with clothespins, I used the following materials I had on hand to build my own flashing rig:
- 1 Clothespin
- 2 Servo Connectors
- 1 Hacksaw blade
- Duct tape
- Hot glue gun and glue stick
- USBasp AVR programmer (these can be purchased on ebay)
Building the Flashing Rig
The objective of the rig is to connect 6 pins on the USBasp AVR programmer to the corresponding programming pads on the ESC. The pins that have to be connected are MOSI (master out slave in), MISO (master in slave out), SCK (serial clock), VCC((2.7 – 6.0 V power), GND(common ground), RESET(reset). Here is a document with more information on how Atmel AVR programmers work. I didn’t power the ESC. The only power was what was coming from the USBasp programmer.
- To make the connections, I used two servo connecters, each one has three wires.
- I used a small screwdriver to lift up the tab holding the male and female connectors inside their plastic casing.
- The male connectors make contact with the programming pads on the ESC, while the female connectors attach directly to the USBasp.
- I connected the six female connectors to the pins labeled MOSI, MISO, SCK, VCC, GND and RESET on the USBasp programmer then lined them up in the order needed to make the connections to the correct programming pads on the ESC.
- To help hold the male connectors together in the correct order I wrapped them in a piece of duct tape.
- I then sawed off one end of a wood clothes pin and used hot glue to attach the male pins wrapped in duct tape to the end of the sawed off clothes pin.
- I had to bend the male pins a little to make them line up with the programming pads.
Firmware to Flash the ESCs
To flash and ESC you have to have the appropriate .hex flash file. Since my ESC is a clone of the Turnigy/Hobbywing ESCs, I used the file called tgy.hex. All of the SimonK .hex flash files can be downloaded here. There is also a spreadsheet that matches up ESCs with .hex flash files.
Software to Flash the ESCs
A software program is used to write the .hex file to the ESC using the USBasp device. The appropriate drivers must also be loaded for the software program to recognize the USBasp device. Download information about some of these software programs and drivers can be found at www.fischl.de. I used the Khazama AVR programmer software. It is very easy to use and an excellent program.
Flashing the ESCs
The actually flashing was very easy and here are the steps I used:
- I connected the USBasp to my computers USB port.
- I touched the male pins of my flashing rig to the programming pads on my ESC.
- I didn’t use any external power other than what was coming from my USBasp to power the ESC.
- I ran the Khazama program.
- I chose “Load FLASH file to Buffer” from the File menu and chose the tgy.hex file I had downloaded.
- Under “AVR:” I chose the ATMEGA8 processor to match the processor on my ESC.
- Finally, I chose “Write FLASH Buffer to Chip” from the Command menu.
- The program showed a little progress bar showing that the flash was being written.
- After a few seconds it completed successfully.
The only challenge with the above process was to make sure the pins were making a good contact with the programming pads on my ESCs. When there wasn’t a good connection, the flashing process failed, but I just kept trying until I had a good connection.
Calibrating the ESCs
The final step was to calibrate the throttle with the ESC. Here is how I did it:
- I connected each ESC to my quadcopter.
- I removed all of the propellers.
- One by one, I attached the BEC connection from each ESC to the throttle connection on my receiver.
- I powered the quadcopter.
- I turned on my transmitter with the throttle stick all the way up at max throttle and heard a beep.
- I moved the throttle stick all the way down to min throttle.
- I heard a few more beeps.
- The ESC is then calibrated and the motor runs smoothly.
That is how it worked for me. My quad is more stable and quicker to react, but these ESCs run a little hot. I probably should have flashed an all NFet design ESC instead. The ESCs I flashed are 25 amp ESCs and they run hot with my KDA motors that have a max current of 20 amps. However, when I run them on my SK3 Motors that have a max current of 13 amps, they only get warm. Here is a youtube video that does a before and after comparison test:
If you decide to attempt this, I recommend reading all of the information I linked to in this post to make sure it is being done correctly.
Hat Tip – Donate to SimonK for all of his hard work!