Apr 032012
 
 April 3, 2012  Posted by  Components, ESCs  Add comments
SimonK Flashed 25A ESC

SimonK Flashed 25A ESC

SimonK Firmware

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.

OpenPilot, RCGroups  and SimonK’s GitHub are excellent resources full of information on flashing ESCs with the SimonK code.

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.

Dynam Detrum 25Amp ESC

Dynam Detrum 25Amp ESC

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

Flashing Rig

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:

ESC Flashing Rig

ESC Flashing Rig

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.

  1. To make the connections, I used two servo connecters, each one has three wires.
  2. I used a small screwdriver to lift up the tab holding the male and female connectors inside their plastic casing.
  3. The male connectors make contact with the programming pads on the ESC, while the female connectors attach directly to the USBasp.
  4. 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.
  5. To help hold the male connectors together in the correct order I wrapped them in a piece of duct tape.
  6. 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.
  7. 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:

  1. I connected the USBasp to my computers USB port.
  2. I touched the male pins of my flashing rig to the programming pads on my ESC.
  3. I didn’t use any external power other than what was coming from my USBasp to power the ESC.
  4. I ran the Khazama program.
  5. I chose “Load FLASH file to Buffer” from the File menu and chose the tgy.hex file I had downloaded.
  6. Under “AVR:” I chose the ATMEGA8 processor to match the processor on my ESC.
  7. Finally, I chose “Write FLASH Buffer to Chip” from the Command menu.
  8. The program showed a little progress bar showing that the flash was being written.
  9. 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:

  1. I connected each ESC to my quadcopter.
  2. I removed all of the propellers.
  3. One by one, I attached the BEC connection from each ESC to the throttle connection on my receiver.
  4. I powered the quadcopter.
  5. I turned on my transmitter with the throttle stick all the way up at max throttle and heard a beep.
  6. I moved the throttle stick all the way down to min throttle.
  7. I heard a few more beeps.
  8. The ESC is then calibrated and the motor runs smoothly.

Conclusion

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!

Share

  39 Responses to “Flashing my ESCs with SimonK Code”

  1. Thanks for sharing your thoughts about ESC. Regards

  2. [...] When I attempted auto-calibration of the ESCs, there was one that just kept beeping, and wouldn’t calibrate. So I lowered my throttle trim by “6 clicks”; then when I recalibrated, all went smoothly.   Apparently all the speed controllers are not created equal, and are subject to temperature tantrums (since they are not crystal-stabilized).  Here’s a link to the ESC manual.    There are better motor controllers out there, some of which are crystal-stabilized (temperature invariant), and with faster-response firmware (A.K.A Simon K) for similar prices.  Not using crystal-stabilized speed controllers means you’ll need to re-calibrate the ESCs when the temperature changes “too-much” (whatever that means to your ESCs).   Check out this site as-well for more information on the Simon K firmware & flashing). [...]

  3. Hi,

    Thanks for the tutorial. I have followed your steps and did manage to SimonK firmware on my HK Blueseries 30A ESC. This ESC uses Atmega8 and N-FETs.

    I have flashed software using avrdude. Everythings goes well until verification step where avrdude reports problem that verification failed.

    Do you have any idea why this can be? Is it okay if I just ignore this message?

    Regards,
    Adi

  4. Hi
    One cuestion.
    I have 8 esc xaircraft atmega8A 1042 and dont konw any simonk firm. Any idea?
    Thanks
    tengo 8 variadores xaircraft y no se si se poueden flasear con el firm simonk, alguna idea? Gracias.

  5. i’m building a tricopter, but do i first have to program my hobbyking f30a 30a ubec esc’s and than flash them or can i just flash them without programming?

    • If you flash them, they should work without programming. The simonk firmware is set up for multicopters. They will still need to be throttle calibrated though. Flashing wipes out any programming since it overwrites everything.

  6. Google translation
    Hello, I would like to flash my HobbyWing Pentium 30A ESC!
    I found it similar to the RC Timer 30 Atmega 8L row (fects P / N): = FW.file tgy.hex.
    Or find the right tgy.hex file? When I go on the links above, I board the tgy.inc!
    Do I take the one in the archive: tgy_2012-09-30_0d3e617.zip
    It is for use on a Multirotor (hexa), probably with Naza Controller M lite + Gps (the engine is ‘standard’ Pulso X2814 / 22)
    thank you
    Pascal

  7. Hi! I’m new in this “war” and i need some help: 1) I build a +quadcopter with 4 Mystery 20amp connected to a hk board atmel V2.1 168. I cannot calibrate throttle. After follow all procedures when i turn on flight board instead receive the usual 2 beeps i receive only one beep and immediatly motors goes to full power!! Can you help me with some sugestion to cross this problem? (EScs not flashed yet).
    2) I pretend to flash this esc, but if i do, i will cross this problem with throttle calibration?
    3)And after flash is still need to do throttle calibration?
    4) After flash any esc, does it still work with program card? or after flash no need anymore that cards?
    Hopping your best help!
    Regards and congratulations for all excellent job!
    Paulo

    • How are you doing the throttle calibration? What are the specific steps you are following?

      • 1) I turn on radio
        2) Throttle stick full up
        3) yaw pot at board to “zero”
        4) I turn on board
        5) i listen 1 beep
        6) all motors start run at full power

        Can be some problem with ESC? (MYSTERY 20amp – blue series)

        Note: Please give me some coments about points 2,3 and 4 of my last post.

        Regards,
        Paulo

        • I don’t have that board so I am not sure if calibrating the escs will work that way. Another way to calibrate them is to do it individually by connecting the ESC bec directly to the receiver throttle connector.

          No, you won’t be able to use the programming card and yes you will need to calibrate them again.

          • Thanks a lot for help. So, after ESC been flashed we only can calibrate throttle. No more acess to ESC features with programing card. In this case i presume after flashing ESC all features needed to control quad are already inside esc. Correct? Thanks again and congratulations for so good job! Paulo

        • Yes, that is correct.

  8. very nice guide, thanks

  9. hi, is possible on HK redbrik 20A? thank!

  10. I have a hobbyking blue series 20A ESC but some people say don’t need custom firmware that blue series ESC is can change the 8k/ 16k frequency at programming and some people say need it. i don’t know who right the issue.let me know do i need custom firmware or no?

    • I would try them first and if they perform well don’t flash them. If not, it may be worth giving it a try. I have some 30amp blue series on order. I will try and give an update on how they work for me.

  11. FinalFrag, you’re very welcome. I’m glad you’ve eenoyjd the series, and I also thank you very much for the annotation and video comment, I’ve thought of dropping it for just videos, which would speed some things up, but I’ll keep it the way it is for what it’s worth I still am planning on future parts. I have roughly four videos on the BEC part of the ESC alone, and then I’ll come back to the ESC for detail on programming them. It’s just taking longer than I anticipated.I’ll definitely try to slow it down!

  12. Britt..Is there any specific ESC in 30A range for quadcopters that are flashable with Simonk’s firmware and that are available in the market as of now?. I had a Hobbywing Skywalker 20A ESC, When i opened it seems they have the new SIL chipset, can’t flashed i think.

      • I got it thx.

        • Greg,Thanks for the compliments. Tonight at our club meneitg I’m giving a presentation on the basics of electric flight from a ‘I flew glow before, so I know what servos are, just tell me the differences’ standpoint. I’ll do a film/article version of it based on the presentation and kick up the rc power series a bit.As for the real life issues, I’ll make note of these and see what I can show ‘safely’ from a video standpoint.As for a quick non video response – even though C ratings are partially marketing gimmicks, in general, a higher C rating has lower internal resistance (I’ll have to include how that can be measured, but just from a theory standpoint go along with it), so it can provide more amperage to your circuit. Swapping out a lower C rating battery would give you less power, and if low enough, cause enough stress on the battery to make it get warm and ‘puff’ – which is bad for the life span of your battery, and if you get it too hot and puffy, it’s time to rip it out and let it sit on the cement for a while, because it risks venting.As for the ESC rating – you can go ANY amount of amps over what you need. The ESC is your ceiling, it won’t burn out from being ‘under-used’. You can raise it as high as you want, but you can only lower it to the maximum current that goes through your circuit. Or, in a real life scenario, until the ceiling hits your head when you walk into the house. The only reason we try to keep the ESC close to (but still always above) our max amperage is because bigger ESC’s weigh more and are more expensive. Hope that helps!

    • Hmm, I don’t see those on the rc timer website, but they show up other places.

    • I’m using the Hobbywing Skywalker 20A ESC’s as well and you are right, you can’t flash them with Simon K’s firmware since they use the silabs chips :( . Too bad because i think they give a little sluggish throttle response.

      • I’m using the Hobbywing Skywalker 20A ESC’s as well and you are right, you can’t flash them with Simon K’s firmware since they use the silabs chips . Too bad because i think they give a little sluggish throttle response.

        I wonder if there is a solution. It seems to be an <a href="http://helifreak.com/showpost.php?p=4176007&postcount=1762&quot; ESC based on the F330. (click)

        There is a picture of the 20A PCB and some other guy reported success with a Hobbywing Platinum 10A. Maybe it’s possible to compare both based on the layout.

  13. Thanks for the information Britt.

  14. Is this the same procedure for Dynam Detrum 30A ESC (3A BEC) ?.
    http://www.hobbypartz.com/60p-dye-1003-30a-esc.html

  15. Very nice article.Did you test them on the quad and how do they perform so far?.Is it necessary to completely cut the heat shrink wrap or jut remove where ever the pads are for this model ESC’s?

    • When I used them they ran fine, but too hot. I would suggest only doing it with an all NFet design ESC. I quit using them because I had one fail. I think the overheating was why. The rcgroups thread pretty much confirms this. I have yet to try it with an all NFet ESC. And yeah, you can just cut the pad area away.

  16. Hello, I can load the firmware on the ESC, but it does not work on my esc (MAG8 tower pro 18A)
    What can I do??
    Thanks for the answer

    • Have you calIbrated the throttle? What happens? Hearing any beeps?

    • .What I’d like to see are answers to real-life isuess. For example, what will a 25C battery do to performance vs. swapping it for the same mAh capacity battery but with a 16C rating? Also what happens if you use an ESC that is 10 amps or 15 amps over what you need? Will you burn out your components?

  17. Thank you very much for this well-written and easy-to-follow guide. You are great at teaching. Much appreciated.

    Regards,
    Andy

  18. It looks like according to this spreadsheet they are flashable with the bs.hex firmware.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • RSS
  • Facebook
  • Google+
  • Twitter
  • YouTube