Alternative ESC firmware (reflashing)

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »


User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Alternative ESC firmware (reflashing)

Post by Hamburger »

ziss_dm wrote:Outdoor test:

togehter with the ESC test very convincing.

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

Hi ziss_dm,

looks great.

I'm interested in a personnel review.

Would you do me the favor and inform us about pros and cons?
If you have ideas for improvements, what should be added or changed?

Regards,

quax

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Quax,

Would you do me the favour and inform us about pros and cons?
If you have ideas for improvements, what should be added or changed?

First, I'll try to summarize the idea: Although your firmware can have resolution up to 255 steps, it still not utilized due limitation of the Arduino PWM output in standard RC range (125 steps) To overcome this limitation, we are extending acceptable PWC pulse range acceptable by ESC firmware to the 16-2016ms. Additionally, we also modifying WMC to output PWM in range 2-252.
Pros:
- Simple modifications for both ESC firmware and WMC
- Looks like additional 125 steps of resolution significantly improve precision and stability.
Cons:
- The ESC is not RC compatible any more, but we can always re-flash it back ;).
- The software decoder for PWC has significant amount of jitter. Probably better to use input capture, but it would require ESC rewiring.
- The margins are really small, which could lead to the problems. For example, 8mhz Plush was not arming, until I properly calibrated RC oscillator.
- With 8mhz ESC’s the PWM frequency probably too low.
Ideas:
- It would be interesting to test 1000 steps resolution somehow. To decide is it really worth an effort. ;)
- Maybe it is good idea to install current sensor on ESC and limit current using it. I think, it may improve efficiency and make ESC more universal

Regards,
Ziss_dm

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

Thanks ziss_dm for you comments :)

In the moment I run my BLCs with 255 -> 200 steps. I program the MWC outputs from 0% to 100% PWM. My BLC is connected via ICP1, measures the input PWM and convert it to 200 steps motor PWM. I fly with that setup from the beginning and for me it works fine. Unfortunately I'm not a very skilled pilot and can only say that the hovering is very stable.

- The software decoder for PWC has significant amount of jitter. Probably better to use input capture, but it would require ESC rewiring.

The ICP1 is much better and worth the rewiring. The 17a-type that I perfer, has the ICP1 open so it can be connected parallel to the INT0 pin.

- The margins are really small, which could lead to the problems. For example, 8mhz Plush was not arming, until I properly calibrated RC oscillator.

I don't use BLCs with internal 8MHz. The flea was an exception. But I thought about replacing the 16MHz with 20MHz. Some people say that is works fine. But I couldn't find a 20MHz resonator and the replacement with a crystal needs additional C's - to much effort and risk.

- With 8mhz ESC’s the PWM frequency probably too low.

Should be about 10kHz. I think an improvement would be, to start the motor with 20kHz or higher and let it run with 10kHz. We mostly use motors with low KV and then 10kHz is ok. Only on startup the current may go to high. That's a problem of all BLCs.

Ideas:
- It would be interesting to test 1000 steps resolution somehow. To decide is it really worth an effort.

I think 200 is enough and a lot of quadrocopters fly with only 100 steps. But I'm curious, if an expert can find an improvement at more steps. 1000 steps at 10kHz makes a step width of 100ns. I cannot believe that this difference is mechanical noticeable. There are a lot of unsymmetrical effects on each motor, e.g. the strength of the magnets, the distance between the magnets, the distance between stator and magnets, the difference in windings of the stator teeth. All this is unavoidable and even exists at high quality motors.

- Maybe it is good idea to install current sensor on ESC and limit current using it. I think, it may improve efficiency and make ESC more universal

Yes, I agree. That is the most important improvement. It's not only good for security and consumption measurement, there are also some ideas, how to start up the motor evaluating the current behaviour. Unfortunately no cheap motor has that feature. For my MWC I integrated a current measurement circuit for the whole current consuption. But that's only the second choice.
There are some DIY solutions (schematics and PCBs) with current measurement. But no design could find enough response to become popular.

Regards,
quax

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Alternative ESC firmware (reflashing)

Post by Hamburger »

ziss_dm wrote:First, I'll try to summarize the idea: Although your firmware can have resolution up to 255 steps, it still not utilized due limitation of the Arduino PWM output in standard RC range (125 steps) To overcome this limitation, we are extending acceptable PWC pulse range acceptable by ESC firmware to the 16-2016ms. Additionally, we also modifying WMC to output PWM in range 2-252.
Pros:
- Simple modifications for both ESC firmware and WMC
- Looks like additional 125 steps of resolution significantly improve precision and stability.
Cons:
- The ESC is not RC compatible any more, but we can always re-flash it back ;).
- The software decoder for PWC has significant amount of jitter. Probably better to use input capture, but it would require ESC rewiring.
- The margins are really small, which could lead to the problems. For example, 8mhz Plush was not arming, until I properly calibrated RC oscillator.
- With 8mhz ESC’s the PWM frequency probably too low.
Ideas:
- It would be interesting to test 1000 steps resolution somehow. To decide is it really worth an effort. ;)
- Maybe it is good idea to install current sensor on ESC and limit current using it. I think, it may improve efficiency and make ESC more universal


I am obviously not qualified to comment as an expert here, but maybe the view of an interested user can be helpful as well.
- voiding general usability is ok, even without re-flashability. The ESCs' prices are low enough.
- extending pwm input range to gain more effective stick granularity sounds good. Altering MWii software is an acceptable burden (supposing it can be done)
- completely eliminating the setup-by-beeps-and-throttle procedure is a huge bonus from user perspective, imho.
- using high end motors with current sensors is not an option - too expensive, too few choices, no choices in the small power range of motors (I could not find any)
- electrically chaging the ESCs for current measurement sounds work intensive. For my copters > 300 grams I now use these hardware sensors form amploc. http://amploc.com/store/index.html Advantage: no electric contact to high currents. I d not know if this could ease the implementation you seem to have in mind.
Keep up the good work, it sounds very promising.
Hamburger

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

Again thanks for the feedback. Let's see, what we can solve :)

Hamburger wrote:- using high end motors with current sensors is not an option - too expensive, too few choices, no choices in the small power range of motors (I could not find any)

Sorry, I said it wrong, I ment BLCs with a current sensor and not motors. You are right, there are no motors with a current shunt.

Hamburger wrote:- electrically chaging the ESCs for current measurement sounds work intensive. For my copters > 300 grams I now use these hardware sensors form amploc. http://amploc.com/store/index.html Advantage: no electric contact to high currents. I d not know if this could ease the implementation you seem to have in mind.

Great, that sensor is fantastic. Cheap, simple to implement, and fast, so that also a current interpreter for the startup may work. Normally I would also use one for a MWC and the over all current consumption. For tests on the bench it's also useful for a single BLC. From my next budget I will invest some money for this current sensor :)


Yesterday I received my Mystery20A from Hobbyking and I was also able to read the flash/eeprom back. It was completely unlocked :mrgreen:
Next I will test the original software for it's properties. If it works fine, it could be converted for other BLCs with disappointing properties. There is also a governor mode that maybe interisting. I'm not sure that I would have tried to read the BLC out.


Regards,
quax

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Alternative ESC firmware (reflashing)

Post by Hamburger »

quax wrote:Great, that sensor is fantastic. Cheap, simple to implement, and fast, so that also a current interpreter for the startup may work. Normally I would also use one for a MWC and the over all current consumption. For tests on the bench it's also useful for a single BLC. From my next budget I will invest some money for this current sensor :)

yes, this sensor works well with MultiWii for the 'over all power consumption' already. I did the implementation some time ago; included in v1.8. It works well on two of my copters.

Thanks for the ongoing efforts. Hamburger

funth1ngs
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Post by funth1ngs »

quax wrote: Yesterday I received my Mystery20A from Hobbyking and I was also able to read the flash/eeprom back. It was completely unlocked :mrgreen:
Next I will test the original software for it's properties. If it works fine, it could be converted for other BLCs with disappointing properties. There is also a governor mode that maybe interisting. I'm not sure that I would have tried to read the BLC out.


Hi Bernhard,

I have heard that the new Hobbyking/Mystery Blueseries have ony N-Channel mosfets. Can you confirm this?

Cheers,
Heiko

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

Hi Heiko,

my Mystery-20A has high-side P-FETs and low-side N-FETs.

But a bird piped into my ear that there is an alternate power FET solution. It looks like this:

Image

On the first view it looks like a puzzle to find out, how it works ;)

regards,
Bernhard
Last edited by quax on Mon Aug 22, 2011 7:51 pm, edited 1 time in total.

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Post by marbalon »

I have another question. Is this possible to make software for ESC with overcurrent control? It don't need to be so fast like this one but safer for mosfets ;) Just more steps like you created 200 or 254 little faster but I'm not a good pilot and afraid that I need to change mosfets on ESC often than propellers :(

Thanks for your work!

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

marbalon wrote:I have another question. Is this possible to make software for ESC with overcurrent control? It don't need to be so fast like this one but safer for mosfets ;) Just more steps like you created 200 or 254 little faster but I'm not a good pilot and afraid that I need to change mosfets on ESC often than propellers :(

Thanks for your work!


Unfortunately there is no current sensor on the cheap chinese ESCs. Therefore it's not possible to detect an overcurrent.
But there are some security functions in the software that detect a blocked motor and switches the power off.

cu
Bernhard

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Post by marbalon »

Quax thank for quick reply. So functions used for motor stop detection works to slow for tunned software ?

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

But there are some security functions in the software that detect a blocked motor and switches the power off.

That is the function of my software. I don't know, what the original software really does.

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Post by marbalon »

Hmm but Mystery20A_arduino_pwm.zip comes from you or ziss_dm? My firen use it in mystery 12A and works superb except overcurent detecition. So this functions in in this firmware and should bee tunned for 12A or you still porting your firmware to mystery ?

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

marbalon wrote:Hmm but Mystery20A_arduino_pwm.zip comes from you or ziss_dm? My firen use it in mystery 12A and works superb except overcurent detecition. So this functions in in this firmware and should bee tunned for 12A or you still porting your firmware to mystery ?

That's basically my software.
As I told you, it is not possible to implement an overcurrent function. There is no current sensor.

My software detects dangerous situations, e.g. a blocking of the motor.

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Post by marbalon »

Sorry I just try to say that my friend burn 2 ESC because land in grass and propellers stop the motor. So this it was because he have 12A and blocking motor detection is not working on it? Or maybe this is not ideal and sometimes this can happened?

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

I tried to upload new firmware into Mystery20A and also in HK BlueSeries 20A, but I failed.
First I tried:

Code: Select all

D:\Dokumenty\arduino ostatní\mystery>"D:\Program files\arduino-0022\hardware\too
ls\avr\bin\avrdude.exe" -C "D:\Program files\arduino-0022\hardware\tools\avr\etc
\avrdude.conf" -v -p m8 -P com5  -c avrisp -b 19200 -F

avrdude.exe: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

             System wide configuration file is "D:\Program files\arduino-0022\ha
rdware\tools\avr\etc\avrdude.conf"

             Using Port            : com5
             Using Programmer      : avrisp
             Overriding Baud Rate  : 19200
             AVR Part              : ATMEGA8
             Chip Erase delay      : 10000 us
             PAGEL                 : PD7
             BS2                   : PC2
             RESET disposition     : dedicated
             RETRY pulse           : SCK
             serial program mode   : yes
             parallel program mode : yes
             Timeout               : 200
             StabDelay             : 100
             CmdexeDelay           : 25
             SyncLoops             : 32
             ByteDelay             : 0
             PollIndex             : 3
             PollValue             : 0x53
             Memory Detail         :

                                      Block Poll               Page
          Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
 MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
 ----- ---------
               eeprom         4    20   128    0 no        512    0      0  9000
  9000 0xff 0xff
               flash         33    10    64    0 yes      8192   64    128  4500
  4500 0xff 0x00
               lfuse          0     0     0    0 no          1    0      0  2000
  2000 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  2000
  2000 0x00 0x00
               lock           0     0     0    0 no          1    0      0  2000
  2000 0x00 0x00
               calibration    0     0     0    0 no          4    0      0     0
     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0
     0 0x00 0x00

             Programmer Type : STK500
             Description     : Atmel AVR ISP
             Hardware Version: 2
             Firmware Version: 1.18
             Topcard         : Unknown
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude.exe: Device signature = 0xffffff
avrdude.exe: Yikes!  Invalid device signature.
avrdude.exe: Expected signature for ATMEGA8 is 1E 93 07
avrdude.exe: safemode: lfuse reads as FF
avrdude.exe: safemode: hfuse reads as FF

avrdude.exe: safemode: lfuse reads as FF
avrdude.exe: safemode: hfuse reads as FF
avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.


And then:

Code: Select all

D:\Dokumenty\arduino ostatní\mystery>"D:\Program files\arduino-0022\hardware\too
ls\avr\bin\avrdude.exe" -C "D:\Program files\arduino-0022\hardware\tools\avr\etc
\avrdude.conf" -p m8 -P com5  -c avrisp -b 19200 -U flash:w:Mystery20A_arduino_p
wm.hex -F

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude.exe: Device signature = 0xffffff
avrdude.exe: Yikes!  Invalid device signature.
avrdude.exe: Expected signature for ATMEGA8 is 1E 93 07
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be perfo
rmed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "Mystery20A_arduino_pwm.hex"
avrdude.exe: input file Mystery20A_arduino_pwm.hex auto detected as Intel Hex
avrdude.exe: writing flash (2336 bytes):

Writing | ################################################## | 100% 3.80s

avrdude.exe: 2336 bytes of flash written
avrdude.exe: verifying flash memory against Mystery20A_arduino_pwm.hex:
avrdude.exe: load data flash data from input file Mystery20A_arduino_pwm.hex:
avrdude.exe: input file Mystery20A_arduino_pwm.hex auto detected as Intel Hex
avrdude.exe: input file Mystery20A_arduino_pwm.hex contains 2336 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 4.17s

avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x0000
             0x18 != 0xff
avrdude.exe: verification error; content mismatch

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.

Before and after both the ESC's works, as I programmed anything.
You advise me some?

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

@marbalon
I did my very best, but there are always some situations that are not covered.

@Stalk
These lines look like an incorrect connection:

Code: Select all

avrdude.exe: Device signature = 0xffffff
avrdude.exe: Yikes!  Invalid device signature.
avrdude.exe: Expected signature for ATMEGA8 is 1E 93 07


avrdude read 0xffffff, means, that it saw only an high line, not driven by MISO from the AVR.
You should control the ISP connection.

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

I use Mega Seeduino v1.22 as a programmer. ISP pins are 10,11,12,13 or 50,51,52,53? Here I could be wrong.
Thank you for your answer.

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

We figured it out. The Mega Seeduino it is:
Reset - 53
MOSI - 51
MISO - 50
SCK - 52
Everything went as it should :lol: , but the ESC will beep three times and just enough. Arduino Pro Mini MWC him start. :roll: :cry:
What to do, please help. :?: :?:

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Correction:
The motor will beep four times. They try to spin, but not spin. Only turning jerkily.
Where's my mistake, please? :|

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

In this way I program without soldering.
Attachments
pgramming ESCm.jpg

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

I reflashing alternative firmware to ESC Mystery 20A. I modified the MWC by ziss_dm. I have connected the engine Keda 20-50. The engine does not start. Only slowly rotate jerky.
How can I be wrong?
Thanks for any reply.

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Stalk,

You can try to slightly increase MINTHROTTLE from 1080 to something like 1120.

regards,
ziss_dm

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi ziss_dm
Thank you for your reply.
I tried MINTHROTTLE until 1250, but unsuccessfully. I also tried a bigger engine 20-22L, but nothing.

Is this correct?

Code: Select all

void writeMotors() { // [1000;2000] => [125;250
  for(uint8_t i=0;i<min(NUMBER_MOTOR,4);i++
    #ifndef EXT_MOTOR_RANGE
      analogWrite(PWM_PIN[i], motor[i]>>3);
    #else
      analogWrite(PWM_PIN[i], ((motor[i]>>2) - 250) + 2);
    #endif
  #if (NUMBER_MOTOR == 6) && defined(MEGA)
.
.
.

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Stalk,
Are you using MEGA? You also can try to flash normal RC firmware to test.

regards,
ziss_dm

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Unfortunately I'm at work. I will try it tonight. Should I remove the capacitors, which are discussed above?
I do not know but ktré are.
thank you

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi ziss_dm,
I flash normal RC firmware back intu ESC and its work normally.
However, when I flash fast firmware again, it does not work. Only four beeps and turn choppy when I turn on the motor.
It would help remove the three capacitors, which you talked about earlier? I'm running on 3 lipo.
thank you

regards
Stalk

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Stalk,

Are we talking about , Mystery20A_pwm_fast_200.zip from here viewtopic.php?f=13&t=516&start=30 ?
Or you flashed backup of the original firmware?

regards,
ziss_dm

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi ziss_dm,
the original firmware. I thought that you want to verify the correct operation of my programmer.
Mystery20A_aerduino_pwm.hex not working for me.
Mystery20A_pwm_fast_200.hex požaduje normální signál?
Regards
Stalk

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi ziss_dm,

Mystery20A_pwm_fast_200.hex this works just as wrong - just beeps and twitching. Just I drive through servotester.
Regards
Stalk

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi ziss_dm,

I tried ESC HobbyKing BlueSeries 20A and ... functions. ESC HK has Atmega8A, while Mystery Atmega8.
I do not know the difference. I can not generate a hex for ATmega8A. Would you assist me please?
thank you
Regards
Stalk
Last edited by Stalk on Sat Aug 27, 2011 8:39 pm, edited 1 time in total.

wektorx
Posts: 8
Joined: Sat Aug 27, 2011 8:08 pm

Re: Alternative ESC firmware (reflashing)

Post by wektorx »

Hi
Sorry for my english.
Two weeks ago I reprogram my ESC (Mystery 12A blue series) with firmware from this topic. Quadro is now stable like never before. Thanks a lot for this soft :)
But I have big problem. About 50% of crashes (three times) were ending with burned transistor (AO4409). The strange is that that always is burning the same transistor.

Image
https://picasaweb.google.com/lh/photo/t ... directlink

Quax: Can you explain in few words, how works motor block protection routine?

Regards
Wiktor

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: Alternative ESC firmware (reflashing)

Post by quax »

wektorx wrote:Hi
Sorry for my english.
Two weeks ago I reprogram my ESC (Mystery 12A blue series) with firmware from this topic. Quadro is now stable like never before. Thanks a lot for this soft :)
But I have big problem. About 50% of crashes (three times) were ending with burned transistor (AO4409). The strange is that that always is burning the same transistor.

......

https://picasaweb.google.com/lh/photo/t ... directlink

Quax: Can you explain in few words, how works motor block protection routine?

Regards
Wiktor


Thanks for the flowers :)
There is a direct transfer from input signal to motor power, so the attitude control response is very fast.

I cannot say, why it's always the same transistor. That's mystic ;)

The protection is a control that the next BEMF has to happen in a short time window. On timeout the motor is shut down. If the motor slows down not so fast, this control doesn't work. Unfortunately there is no current control on these boards. But there is an additional chance to increase the security, if the voltage drop on the FETs is measured. e.g. if an active FET has more than 0.5V Gate-Source voltage, than an error situation is happened. This sounds easy, but it isn't. There are some spike problems and timing problems for ADC measurements.

The best is a current control. If you implement a common current control, you can power down all BLCs on overcurrent. That should work better.

(Still better is not to crash ;) - I don't do that)

Regards
Bernhard

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi,

I reprogrammed the ESC HK Blueseries four and three 20A Mystery 20A firmware from this topic. One piece Mystery 20A does not work with this firmware (see my posts above). When the ESC is still working normally with the original firmware.
Can you deal with someone?

Regards
Stalk

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Stalk,
I would check soldering of the components on the FET side of the board.

regards,
ziss_dm

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi zis_dm,
Thanks for the advice. I will try it later. How do I remove cooler? It's probably glued?
Regards
Stalk

funth1ngs
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Post by funth1ngs »

Hi,

wektorx wrote:...
Two weeks ago I reprogram my ESC (Mystery 12A blue series) with firmware from this topic. Quadro is now stable like never before. Thanks a lot for this soft :)
But I have big problem. About 50% of crashes (three times) were ending with burned transistor (AO4409). The strange is that that always is burning the same transistor.
...


@werktorx: did you remove the caps? Look here, open the attachment and browse to "__INFO\12A Bilder". I don't know if this will improve your fet problem, but you can give it a try.

@quax, ziss_dm (or anyone else with the knowledge :D): simonk did some "improvements" (modifications) on the plush code, you can see it here. Maybe they can be usefull for the Blue Series, too?

Cheers,
Heiko

funth1ngs
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Post by funth1ngs »

Hi,

today i recieved the new HobbyKing Blue Series 20A ESC's. As expected, they have n-Channel FET's only.

Here are 2 modificated files for the ziss_dm package (bldc.zip). I changed the p-FET definitions as described by Geert.

Cheers,
Heiko
Attachments
Mystery20A_nFET.zip
(1.42 KiB) Downloaded 267 times

funth1ngs
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Post by funth1ngs »

Hm,

3 days ago everything worked, but now i have a startup problem :cry:. I checked the modified ESC with a power supply, then with a 8 cell NiCd battery: No probelm at all.

Yesterday I tried a bigger prop (13x4.5) on a 4S lipo. This resulted in 2 burned FET's while the motor tried to start. Today I reflashed a new ESC and removed the 3 caps, but the startup still doesn't work.

I made a small video in which you can see the problem.

I modified the p-FET definitions (swapped cbi/sbi for on/off) as mentioned in the post above.

Thanks for your help,
Heiko.

Edit: Removed some crap (internal pullups on an output pin).

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi,
I tried to fly with the ECC with the firmware from this forum. After about 8 flys one burnt ESC.
There was talk here about the removing three capacitors. What are they please? I have Mystery20A/HK Blue 20A and HK Blue 12A (see pictures).
Thank you in advance for your help.
Regards,
Stalk
Attachments
Mystery 20A.jpg
HK BlueSeries 12A.jpg

funth1ngs
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Post by funth1ngs »

Hi Stalk,

the 12A looks like the new ones with only n-Channel FET's. You can find some infos here.

For the 20A version I couldn't find a picture, but it should be the 3 caps in the lower right corner.

Cheers,
Heiko.

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi Heiko,
thank you for your help.
For 12A I use the hex file from this site?
Sorry, but I'm not a programmer and I can not assembler.
Good luck,
Stalk

funth1ngs
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Post by funth1ngs »

Hi Stalk,

Stalk wrote:...
For 12A I use the hex file from this site?
...


do you mean the armokopter.at site? I have posted the link just for the picture. Their software uses a diffrent protocol (UART instead of PWM). If you have only on type of FET's, you must compile the ziss_dm package with the files I posted.

But be careful, I have the problem as mentioned above. I don't know if it's caused by the ESC or my low KV motor.

Cheers,
Heiko.

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Post by Stalk »

Hi Heiko,
Thank you
Regards,
Stalk

User avatar
Rob
Posts: 77
Joined: Sun Apr 03, 2011 4:40 pm

Re: Alternative ESC firmware (reflashing)

Post by Rob »

wektorx wrote:Hi
Sorry for my english.
Two weeks ago I reprogram my ESC (Mystery 12A blue series) with firmware from this topic. Quadro is now stable like never before. Thanks a lot for this soft :)
But I have big problem. About 50% of crashes (three times) were ending with burned transistor (AO4409). The strange is that that always is burning the same transistor.

https://picasaweb.google.com/lh/photo/t ... directlink

Quax: Can you explain in few words, how works motor block protection routine?

Regards
Wiktor


Wiktor,

Image

I have make a own ESC design and discover the same problem if I use this software,
Is the burned FET always the B, "Nfet" switched the coil to ground?
It looks like a small timing problem?

Rob
Last edited by Rob on Wed Sep 21, 2011 6:46 pm, edited 1 time in total.

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

Looks like, I have found possible problem: After loosing sync, it was trying to restart motor with current power, which could lead to over current. I have changed it to reset BLDC completely, so now it would wait for min. throttle again (and beep).

Change List:
- fixed pre-align
- fixed control timeout
- another attempt to correct PWM at high power (full power bump)
- power ramping on startup (soft transition from MIN_STARTUP to MAX_STARTUP)
- power ramping on transition from startup to run (now it is more safe to start with high power)
- full reset on loosing sync
- etc.

regards,
ziss_dm
Attachments
bldc.0.3.zip
(33.41 KiB) Downloaded 242 times

User avatar
Rob
Posts: 77
Joined: Sun Apr 03, 2011 4:40 pm

Re: Alternative ESC firmware (reflashing)

Post by Rob »

@ ziss_dm

Ok, I try this tomorrow. I test with "bad bearing motors" so the start up is not "clean" but it should work... and very good for testing :D

Rob

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Heiko,

Any updates on your startup issues? Is it actually starting without prop?
Have you measured current? I had something similar when one of the pFETs was not working - raugh startup, but if it starts everything seems to be normal. The only difference - much lower current at full power.

regards,
ziss_dm

Post Reply