CHEAP ESC Problem
« 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.

hwh

  • *
  • 1018
Re: CHEAP ESC Problem
« Reply #1 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?

Re: CHEAP ESC Problem
« Reply #2 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.

Re: CHEAP ESC Problem
« Reply #3 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.

Re: CHEAP ESC Problem
« Reply #4 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.

Mateusz

  • *
  • 808
Re: CHEAP ESC Problem
« Reply #5 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 http://oscarliang.com/esc-1-wire-bootloader-signal-cable-blheli-simonk/

Re: CHEAP ESC Problem
« Reply #6 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.  :)
https://docs.google.com/spreadsheet/ccc?key=0AhR02IDNb7_MdEhfVjk3MkRHVzhKdjU1YzdBQkZZRlE#gid=0

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.
http://www.fluxfpv.com/choose-escs-quadcopter/

Atmel
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.
http://0x.ca/tgy/

This flash dongle looks OK, but it's been years since I bought one.
http://www.ebay.com/itm/USBASP-USBISP-AVR-Programmer-Adapter-10-Pin-Cable-USB-ATMEGA8-ATMEGA128-GM-/262130708242

Here is some SimonK firmware downloads
http://0x.ca/tgy/downloads/

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

Re: CHEAP ESC Problem
« Reply #7 on: November 27, 2016, 07:35:06 pm »
Thanks cliff.Very Helpful.

Re: CHEAP ESC Problem
« Reply #8 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.

Mateusz

  • *
  • 808
Re: CHEAP ESC Problem
« Reply #9 on: November 28, 2016, 09:18:42 am »
Hardware
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:
  • Servo wire (bootloader allows that)
  • Programming pads

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
  • SimonK bootloader: Can run SimonK firmware or BLHeli firmware
  • BLheli bootloader: Can run only BLHeli firmware

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.

Programming
I suggest you try hooking up Arduino or Afro ESC programming tool and reading ESCs using very friendly https://blhelisuite.wordpress.com/
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.

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


Re: CHEAP ESC Problem
« Reply #10 on: November 28, 2016, 11:20:17 am »
Thanks Mateusz

Re: CHEAP ESC Problem
« Reply #11 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.
https://oscarliang.com/esc-1-wire-bootloader-signal-cable-blheli-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.

Mateusz

  • *
  • 808
Re: CHEAP ESC Problem
« Reply #12 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).


Re: CHEAP ESC Problem
« Reply #13 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 "cc3d_fix_robojax.com.bin" .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 "cc3d_fix_robojax.com.bin" 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

Mateusz

  • *
  • 808
Re: CHEAP ESC Problem
« Reply #14 on: November 29, 2016, 09:40:44 am »
Hi JanithMS,

I don't know what ""cc3d_fix_robojax.com.bin" is and couldn't find it by google, what the fix is. However you should consider two things
  • Firmware for CC3D has hardware safety checks, it won't boot if something is not working properly
  • Firmware built should always be used with the same version of GCS. Firmware knows how to construct messages and GCS knows how to parse them and send the out. If you keep using different version of firmware then GCS it may happen that something gets set incorrectly. If firmware you flashed was based on 15.09 you are using without additional changes to other UAVTalk objects, it should work, but in general I would avoid using firmware that does not match GCS version.

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.