LibrePilot Forum

Users => Vehicles - MultiRotors => Topic started by: JanithMS on November 27, 2016, 02:38:13 pm

Title: CHEAP ESC Problem
Post by: JanithMS on November 27, 2016, 02:38:13 pm
Today i tried to fly with my new 30A escs from ebay ( 18$), but it seems very uncontrollable & didnt give me the full response from my sticks.So i tried to resolve this by adjusting different setting.But it didnt worked.So I identified the case is with the escs.Even Librepilot identifies 490Hz refresh rate the flight was slugish.Should i have to re-flash the esc.
Title: Re: CHEAP ESC Problem
Post by: hwh on November 27, 2016, 04:21:33 pm
This may be a case of "you get what you pay for".  $18 for a set of 4 30A ESCs is a little too inexpensive.  They're also the only ones I've seen in a while that don't say what firmware is on them.  Everyone seems to advertise either SimonK or BLHeli is on their ESC.  These not only aren't marked but the auctions don't say either.

You should probably hook them up to either the SimonK or BLHeli configurators and see if you can figure out what's on them.  And then update them to the latest if you can.

When you ran the LibrePilot wizard and calibrated the ESCs did it work properly?
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 27, 2016, 04:59:59 pm
they worked as normal when esc calibration.when i  run the motors there is a clicking or current shorting sound comes.I think it's coming from esc.
Title: Re: CHEAP ESC Problem
Post by: TheOtherCliff on November 27, 2016, 05:13:30 pm
On all ESCs?  That is usually a sign of ESC firmware that can't handle the ESC protocol you are using.  One thing to remember is to set your ESC max to 1900 (not 2000) before calibrating the ESCs.

It should fly correctly with PWMSync or PWM490.  Make sure you have all banks (colored blobs at the top of the output page) that have an ESC attached configured the same.

If it is is just one ESC, you probably have a bad ESC or motor.

I buy these cheap ESCs, but I always flash the latest SimonK or BLHeli just after testing them for DOA.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 27, 2016, 05:24:09 pm
hey cliff can you explain little bit how to flash these escs.I haven't tried flashing before.Right now i have no flashing tool but i have an arduino uno and little bit of programming experience.It could be very helpful.
Title: Re: CHEAP ESC Problem
Post by: Mateusz on November 27, 2016, 05:56:58 pm
Please follow this for arduino, you don't flash anything yet just try to read what's on ESC
Title: Re: CHEAP ESC Problem
Post by: TheOtherCliff on November 27, 2016, 07:03:35 pm
First of all Silabs processors (usually BLHeli firmware) uses different flashing hardware than Atmel (always SimonK).  I have only ever put SimonK on Atmel (required) and BLHeli on Silabs.

You must use a current limited power supply for the first test after flashing firmware in case you used the wrong firmware.  I use a #1156 car bulb in series with my normal 3s lipo.  You should be able to run successful low power tests on the newly flashed ESC.  If the bulb lights up and the motor does not spin, DO NOT remove the current limiter until you get it working!!!!

ESCs are flashed by either connecting directly to a few ESC CPU pins or connecting to a set of pads built into the ESC board for this purpose.  If you are not using a CPU or flashing pad clip, this requires some very tiny soldering.  The easiest way is with a CPU clip or a flashing pad clip.  In that case it is as simple as cutting a flap in the heat shrink, carefully holding the clip in place during the several seconds it takes to flash, done.

For SimonK firmware you need the COMP_PWM compile option.  For BLHeli you need to set the "Light Damping" config option after flashing.  These both do light braking when the FC needs to slow down the prop.  This means faster effective ESC response and higher possible PIDs (also still works with lower PIDs, but mushy response as low PIDs always give).

Order some large heat shrink tubing from eBay.  You will remove the heat shrink and need something to replace it.  The size you order is the diameter when it is a tube, not when squashed flat.  After taking heat shrink off of one ESC and finding the pads or CPU, you can carefully cut 3 sides of a square in the heat shrink around the programming area and avoid replacing heat shrink.

Find the "rapid esc database".  It has pictures of many ESCs to help you identify exactly what you have.  Here.  I found it for you.  :)

I had some problems with cheap eBay SimonK ESCs.  The problem went away when I flashed the current version of SimonK.  Now I test all the ESCs before flashing in case they don't work and need to be sent back, and then update to the latest firmware before going further.

Maybe you can take this writeup and see if it works and fill out the missing parts and add it to the wiki.  ;)

A random flashing site that Google pointed me to.

Most of my stuff is the cheapest I can find and that is usually SimonK.  HobbyKing has a $20 clip that fits over the Atmel processor.  If you are going to do more than one batch of Atmel ESCs I would get one.  In any case you need a USBASP programmer.  I run Linux.  I used command line "avrdude" in the past.  Avrdude is a command line utility.  I think there is a Windows version of avrdude too.

Here is an Atmel flashing software that runs in your browser.  I used it and it worked.  I don't remember more.

This flash dongle looks OK, but it's been years since I bought one.

Here is some SimonK firmware downloads

You can buy a programming dongle.  (Instead) I have an Arduino flashed with some firmware I found that acts like these dongles.  Silabs only needs 3 pins IIRC and I used a servo connector (the one with a shell and pins) and took the shell off and slightly bent the pins.  It works great.  The first set of Silabs I did I had to find something that worked under Linux.  It was a pain and was not up to date.  I had to modify the flasher for the latest Silabs version.  I got it working, but it was a pain, and I am a programmer.  There is a BLHeliSuite (or kkmulticopterflash) or something similar that runs in your browser.  It calls avrdude IIRC.  It is self contained IIRC and has it's own avrdude.  It works easily, but you will have to look for instructions on how to use it.  I use my Arduino as the flasher IIRC.  I've only done it this way once.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 27, 2016, 07:35:06 pm
Thanks cliff.Very Helpful.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 28, 2016, 06:52:18 am
Hey Cliff , I found that the only firmware for my escs (Hobby power 30A)is tgy by Simon K. I think that these cheap escs also comes loaded with that firmware.Am I Right? (maybe I'm wrong). If i re-flash with that firmware, will they perform well? Basically i want to speed up the reaction time of escs.
Title: Re: CHEAP ESC Problem
Post by: Mateusz on November 28, 2016, 09:18:42 am
Different ESCs come with different micro-controller, it can be Atmel (8 bit AVR), SiLabs (8 bit 8051) or even STM32 (32 bit Cortex-M). At least these are I heard about.
Many of them can be flashed with open-source firmware. Micro-controller usually comes with bootloader and firmware. Bootloader starts firmware and allows programming over servo wire. Alternative way is cutting shrink-tube and hooking up programmer (can be Arduino) to programming pads, this way allows changing everything on the chip, including bootloader, but also changing fuses on some chips and potentially bricking them.

So two ways of programming:

Now as you can probably imagine, every ESC differs not only by chip, but also by FETs type (their speed), gate-drivers and all sorts of technical details which requires different code for programming them. SimonK or BLHeli are in fact not just one firmware but a set of them, suitable for each specific ESC. If you flash wrong firmware and provide enough current, you are likely to damage your ESC. Of course some cloners make ESCs that have different name, but can be flashed with firmware written for original ESC. If you want to flash you ESC you have to determine what firmware was there and is safe to use.

Firmware and bootloader

So if you have Atmel chip you can flash with both SimonK or BLHeli, given that there is firmware written for that ESC or compatible one.

Programming tools
Servo wire programming tools

You can also use Arduino, but I never tried that. It would be awesome if someone could contribute to Wiki with nice write-up how to do that.

I suggest you try hooking up Arduino or Afro ESC programming tool and reading ESCs using very friendly
It should recognize your ESCs bootloader and determine what firmware it was flashed with, as well as offer an update of firmware. This tool would flash BLHeli firmware working with SimonK bootloader. If you don't want to update firmware to BLHeli and be on a safe side, you can still use it just to read (without writing anything) to determine correct SimonK firmware.

BLHeliSuite should automatically detect correct firmware for your ESC based on string encoded in previous firmware flashed. If that string was "Afro 20A ESC Multi-rotor" then it will assume these are the ESCs you have, will offer matching firmware upgrades and show previously hidden options that can be enabled/disabled/tunned for this very specific ESC hardware known as Afro 20A.

I don't know how to determine if  ESC response is too slow and anything faster is needed, but if you flash BLHeli version >= 13.0 then OneShot125 is supported by default. OneShot125 gives you also gyro synchronization which is more important than faster response. Unfortunately, I don't know how that works with SimonK, probably you need to enable some option in the code and recompile firmware. You can also enable active-barking in BLHeliSuite if your ESC supports that. It's a feature that actively slows down motors, instead of just passively relaying on friction between air and propellers.

Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 28, 2016, 11:20:17 am
Thanks Mateusz
Title: Re: CHEAP ESC Problem
Post by: TheOtherCliff on November 28, 2016, 12:20:35 pm
I always upgrade e.g. a SimonK ESC to the latest version of SimonK.  I think that sometimes the reason some e.g. SimonK ESCs are so cheap (like $3.50 for a 30a on eBay) is that they have old firmware that does not work as well as the latest.  At least I can say that the ESC jerkyiness problem I had with one batch of cheap eBay SimonK ESCs was fixed by upgrade to latest SimonK.  :)

IIRC, the following distinction is not so great today because both flashing and configuration can be done through the servo lead and by the same program?  To make changes to SimonK settings you must compile new firmware and flash it because there is no post flashing configuration.  To make changes to BLHeli, there is a program you run any time after flashing the firmware.

I am trying to catch up on current ESC flashing technology.  :)

At least in the past, SimonK would not run on SiLabs processors (the brain inside the ESC), but BLHeli would run on either Atmel or SiLabs processors, so it is important to know what kind of processor your ESC has.

SimonK bootloader allows flashing (and configuring for BLHeli?) of either BLHeli or SimonK.

I am not completely up on current technology.  Do typical modern ESCs (both SimonK and BLHeli) support flashing (and for BLHeli, post flashing configuration) through the ESC servo wire?

Changing bootloaders cannot be done through the servo wire (1-wire programming) because it sometimes requires changing the CPU "fuses" (power on configuration settings).  Also, servo wire programming requires a different dongle than the flashing built into the ESC (pads on the ESC board or using a CPU clip).

Importantly, there is servo lead "ESC flashing and BLHeli post flashing configuration" being tested for inclusion into the LP release after this one.  :)

Finally, the only thing I personally need changed in BLHeli is enabling "light damping".  I haven't found the need or time to play with changing the many other BLHeli settings.  For SimonK it is the COMP_PWM compile setting.  These do the same thing: some amount of braking to slow the prop down quicker for faster response.
Title: Re: CHEAP ESC Problem
Post by: Mateusz on November 28, 2016, 12:49:06 pm
Hi Cliff,

You are right, I also don't recall SimonK running on SiLab chips, probably Simon focused only on AVR but they're well written, clean code and very efficient. I guess he didn't dig into 8051 assembler for SiLabs.

When it comes to
Do typical modern ESCs (both SimonK and BLHeli) support flashing (and for BLHeli, post flashing configuration) through the ESC servo wire?

I have ESCs with SimonK bootloader, flashed them with BLHeli firmware using just servo wire and I can configure them with BLHeliSuite. It also matches my observation (you're right) that SimonK (unlike BLHeli) does not offer post-flashing configuration and options have to be switched in the code. Some GUIs just offer firmware compiled with different options.

I usually use GUI to change motor direction and enable "light damping".

There are also new ESCs coming to the market, which I didn't mention earlier running SiLabs EFM8BB21F16 (aka Busy Bee2) those flash with BLHeli-S firmware, I guess worth checking out besides almighty flyduino KISS24A (sorry for hijacking thread and mentioning this here).

Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 29, 2016, 08:38:45 am
I did a mistake at first.I didn't tell you about the cc3d board.I bought this board from eBay just for 9$.When i first started by plug in to pc,librepilot was unable to recognize the board.So i started to search the internet for some ideas to get this board working.Then i found a file called "" .After i flashing this file into the board and installing the STM virtual COM port drivers, my board started to work. :)  Then I started to build my 450 quad using eBay escs. My first test flight was not so good.With all jerkiness & unresponsiveness,the landing was a mess.After a while I was thinking about changing and customizing some of the settings for a good flight.The funny thing was ,after plug into my PC the TX & RX bars wear gone as shown in the picture below. :-[

Then i re-flashed the board with "" file and the board started to work.Doing the setup procedure again.The flight was same as the beginning with all the mess.I thought the responsive problem was with my escs. That's why started to get help(Flashing ideas). :) :) :)

Then i started to bulid my quad again with a Hobbyking CC3D board. Then the magic happened.The flight was so good & smooth.Now I know that the problems came with the CHEAP CHINESE CLONE CC3D.I could again rescue the board but I don't like to hurt  my props again. :D
Title: Re: CHEAP ESC Problem
Post by: Mateusz on November 29, 2016, 09:40:44 am
Hi JanithMS,

I don't know what """ is and couldn't find it by google, what the fix is. However you should consider two things

Can you point to the website where this file was found ? What kind of fix is that ? Maybe that would shed some light on why LP firmware didnt work for you.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 29, 2016, 02:58:21 pm
Hi Mateusz,

This is the link >>

Their you will a CC3d Board.Then scroll down a bit.You should find a category named "Downloads". Their should be a file named "CC3D Firmware Boobloader fix".

I forgot to mention that my board had a boot loader problem.First it was not recognized by LP.After flashing this file my board worked as normal.But suddenly/ randomly my board gets unrecognized by LP.

This file could be a great solution for CC3D users those who have bootloader errors. :)
Title: Re: CHEAP ESC Problem
Post by: TheOtherCliff on November 29, 2016, 04:56:22 pm
There is really no reason to need that I can think of, but I haven't researched it either.

Do the motors run slowly when the throttle stick is low and it is sitting level on the grass?  It is OK if some speed up slowly but not quickly or jerky.  If it doesn't run well at low speed, like maybe the motors are immediately too fast at 5% throttle then you need to calibrate and neutral your ESCs.  Calibration is stored in the ESC, so it generally only needs to be done once, not every time you start configuration over.  Setting the motor neutral (lowest speed point) must be done each time you start over with a reset FC configuration.

Have your balanced and tracked your props?  Unbalanced / untracked props often cause enough vibration that at some RPM it is suddenly more vibration than the gyros can stand and it will go a bit crazy in roll / pitch, but not in average throttle.  It won't shoot up although it may climb a little.  A bad landing can bend a prop so it is untracked and change a flying quad to a crazy quad.

Make a video for us to see will help sort this out.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 29, 2016, 05:32:42 pm
Hi Cliff,

Is it compulsory to have all motor neutrals equal? My motors have bit different neutrals(M1 1096,M2 1095,M3 1098,M4 1096). Because of that I changed all motor neutrals to 1100. Is it a good idea or not?
Title: Re: CHEAP ESC Problem
Post by: hwh on November 29, 2016, 05:54:41 pm
...This file could be a great solution for CC3D users those who have bootloader errors. :)
That file is some unknown variant based on the old OpenPilot 15.02.02.  Why would you want to load someone's odd, unknown firmware onto a board instead of coming here and getting the official version?  All the real, official bootloaders and firmware are available on the download page and the wiki has instructions for flashing and updating firmware and bootloaders

The screen capture you posted is usually caused by windows loading the wrong driver.

Title: Re: CHEAP ESC Problem
Post by: TheOtherCliff on November 29, 2016, 06:11:22 pm
Your motor neutrals are fine either way.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 29, 2016, 07:05:40 pm
Hai hwh,

When i first plug the CC3D bought from ebay, LP didn't recognize.So i hit the rescue button,my board was recognized.Then i clicked on the "Upgrade & erase".But Nothing happened(error). I thought that it was a driver problem so i checked COM PORT list.Their were no any COM PORT named COPTER CONTROL.After that i installed STM Virtual COM port driver.Nothing happened.Then I figured out that my board doesn't have a bootloader.(maybe I'm wrong). So i tried to flash the board with "bu_cc.opfw" & "bu_cc3d.opfw" but nothing happened.Luckily i found a video how to fix the bootloader problem.

After flashing that  file,it worked. THAT IS WHAT I EXPERIENCED.All errors gone. After some test flight again my board had problems such as LP recognizing/ lower flight responsiveness & jerkiness, TX RX bar problems.But those were random.

I have to mention that my first FC is a CC3D & have no idea about others.( I personally like Opensource)Are these low budget Chinese clone boards are useful and how to point out a good CC3D? Thats all I want to know.
Title: Re: CHEAP ESC Problem
Post by: TheOtherCliff on November 30, 2016, 05:17:24 am
If a board doesn't have a bootloader, it must be flashed with a bin (not opfw) file, and that cannot be done by the GCS.

If a board does have a bootloader, you can flash a program called a bootloader updater (BU).

In either case, you want to flash the normal firmware after flashing the bootloader (something like fw_revolution.opfw).
Title: Re: CHEAP ESC Problem
Post by: Mateusz on November 30, 2016, 10:24:07 am
Flash on the chip has two regions: bootloader and firmware.

Firmware is needed for flight, bootloader just starts firmware and allows flashing new firmware. When you flash normal firmware with GCS it can't change anything in bootloader.
There are two ways to update bootloader

So what you probably did (trying to reconstruction possible actions) is you tried flashing bootloader updater opfw file. Which might not have finished updating bootloader or didn't boot at all.
Then you flashed some unknown bin file, which happens to work, but is unknown version. It could be this file is either compatible bootloader or the firmware+bootloader. I don't know.

I suggest you flash ef_cc3d.bin file with dfu-utils and SBL method from the LibrePilot GCS version you are using.

You need to short SBL pads. SBL is located on top side of board close to corner hole close to ESC/servo outputs (use 3.3v and SBL).
The CC3D SBL procedure cannot be done with USB. You need FTDI USB to Serial adapter.

Here is description how to update cc3d firmware with SBL method

Just flash ef_cc3d.bin (ef stands for entire flash and flashed both bootloader and compatible with it firmware). If board is functional it should work and is all you need. After doing SBL method, next time you can just use GCS as correct bootloader is there.
Title: Re: CHEAP ESC Problem
Post by: JanithMS on November 30, 2016, 11:20:17 am
Thanks  Mateusz. I'll try that :)