Alternative ESC firmware (reflashing)

Re: Alternative ESC firmware (reflashing)

Postby quax » Sun Jul 24, 2011 9:31 pm

gompf-2 wrote:Fluke 289 gives me 1.14,1.16,1.16nF (desoldered of course) so I asume them to be 1200pF. The one in the RC input filter measures 0.635nF, shoud be 680pf.
ESC is HK 12A blue series, new version (Rs/Cs placed not so ordered).


Thanks, I was wondering, how they want to do high RPM rates. But with 1nF or 1,2nF it should be ok. It's more a spike limiter than a timing element.
Maybe I order a 20A version by next chance.

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

Re: Alternative ESC firmware (reflashing)

Postby quax » Sun Jul 24, 2011 10:24 pm

ziss_dm wrote:Hi Quax,

This is Mystery firmware backup.

regards,
ziss_dm


Thanks again. 8-)

But I must say, although I know a lot about the topic, it's a mystery and not an open book ;)
In the moment I cannot preview when I will have understood all the program functions. It's more difficult as I expected. But I like this kind of puzzle :D

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Mon Jul 25, 2011 12:43 am

Hi gompf-2 Quax,

....
I just point you to this because they also remove 3 caps in the commutation circuite.
....


Are they reffering to the to the LPF's in Back-EMF signal conditioner?
Are we sure, that they should be removed? ;)

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

Re: Alternative ESC firmware (reflashing)

Postby quax » Mon Jul 25, 2011 8:40 am

ziss_dm wrote:Hi gompf-2 Quax,

....
I just point you to this because they also remove 3 caps in the commutation circuite.
....


Are they reffering to the to the LPF's in Back-EMF signal conditioner?
Are we sure, that they should be removed? ;)

regards,
ziss_dm


I just ordered a Mystery 20A for testing. A capacitor in that range may work, but I don't know it. Therefore I need an ESC for testing and measurement, e.g. with my scope. The opportunity to reload the original software :mrgreen: , makes this device to a preferred test object.

Normally there shouldn't be a capacitor in the BEMF circuit. Higher values like 100nF don't work for sure, because the motor timing depends on the RC delay and not on a calculation as I do.

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Thu Aug 04, 2011 11:59 am

Hi Quax,
How is your research?

Just want to share couple of tweaks to your firmware. ;)

1) Zero crossing filter. Just simple majority filter. In my case helps with 4s setup, the motor not loosing sync.
Code: Select all
;-----bko-----------------------------------------------------------------
; *** scan comparator utilities ***
.if CLK_SCALE==2
  .macro __waitp
                nop
                nop
  .endmacro
.else
  .macro __waitp
  .endmacro
.endif

wait_for_low:   sbrs    flags0, OCT1_PENDING
                ret
                clr     temp1
                clr     temp2
               
                sbic    ACSR, ACO
                inc     temp1
                __waitp
                sbic    ACSR, ACO
                inc     temp1
                inc     temp2
                __waitp
                sbic    ACSR, ACO
                inc     temp1
                __waitp
                sbic    ACSR, ACO
                inc     temp1
                inc     temp2
                __waitp
                sbic    ACSR, ACO
                inc     temp1
                __waitp
                sbic    ACSR, ACO
                inc     temp1
                inc     temp2
                __waitp

                cp      temp2, temp1
                brcc    wait_for_low
                ret
               
wait_for_high:  sbrs    flags0, OCT1_PENDING
      ret
                clr     temp1
                clr     temp2
               
                sbis    ACSR, ACO
                inc     temp1
                __waitp
                sbis    ACSR, ACO
                inc     temp1
                inc     temp2
                __waitp
                sbis    ACSR, ACO
                inc     temp1
                __waitp
                sbis    ACSR, ACO
                inc     temp1
                inc     temp2
                __waitp
                sbis    ACSR, ACO
                inc     temp1
                __waitp
                sbis    ACSR, ACO
                inc     temp1
                inc     temp2
                __waitp

                cp      temp2, temp1
                brcc    wait_for_high
                ret
;-----bko-----------------------------------------------------------------


2) Power ramping for the first commutation during startup (pre-align). again in my setup helps smoothly start, even with high startup power.
Code: Select all
.macro SetPWM
                ldi     temp1, @0
                com     temp1
                mov     tcnt0_pwron_next, temp1
                mov     tcnt0_power_on, temp1
.endmacro

wait120ms:
                ldi     temp1, 1
                mov     t1_timeout, temp1
wait120ms_wait_for_t1:   
                tst     t1_timeout
                brne    wait120ms_wait_for_t1
                ret

pre_align:      ldi     temp1, INIT_PB  ; all off
                out     PORTB, temp1
                ldi     temp1, INIT_PD  ; all off
                out     PORTD, temp1
                ldi     temp1, INIT_PC  ; all off
                out     PORTC, temp1
                ldi     temp1, 20*CLK_SCALE
pp_FETs_off_wt: dec     temp1
                brne    pp_FETs_off_wt
                SetPWM(PWR_STARTUP*1/4);
                rcall   com5com6
                rcall   com6com1
                rcall   wait120ms
                SetPWM(PWR_STARTUP*2/4);
                rcall   wait120ms
                SetPWM(PWR_STARTUP*3/4);
                rcall   wait120ms
                SetPWM(PWR_STARTUP);               
                rcall   wait120ms
                ret               


3) I have managed to merge bl-17a and tp-18a using macroses.

regards,
ziss_dm
Attachments
bldc.zip
(99.21 KiB) Downloaded 316 times
ziss_dm
 
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Postby quax » Sat Aug 06, 2011 9:56 am

ziss_dm wrote:Hi Quax,
How is your research?
....

Unfortunately my ESC isn't arrived yet.
The code reengineering is stopped at the moment. It is very complicated to find out the sense of the variables and subroutines. From time to time I need a break to clear my brain :)

Edit: but I found out, that this is a version with governor mode :mrgreen:

ziss_dm wrote:Hi Quax,
Just want to share couple of tweaks to your firmware. ;)

1) Zero crossing filter. Just simple majority filter. In my case helps with 4s setup, the motor not loosing sync.
....

2) Power ramping for the first commutation during startup (pre-align). again in my setup helps smoothly start, even with high startup power.
....
3) I have managed to merge bl-17a and tp-18a using macroses.

regards,
ziss_dm


I'm very happy to see a progress in the software. By the next opportunity I will test it and hope you agree, if I publish it at the end on my homepage, including your name.

Unfortunately my time suffic only for a few things to do.
In the moment I enjoy the flying with my MWC and build a second one.

Image

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Sun Aug 07, 2011 1:50 pm

Hi,
Just a quick report. I have tested idea of extending ESC resolution up to 250 points. ;) Results is quite impressive so far (next is outdoor tests).

Normal resolution PID's: 5.7/0.030/17
With extended resolution: 12/0.080/60

And it is really stable in hover ;)

The modifications to the WMC:
Code: Select all
#define MINCOMMAND 1000
#define MINTHROTTLE 1080
#define MAXTHROTTLE 2000
#define EXT_MOTOR_RANGE
....
    #ifndef EXT_MOTOR_RANGE 
      analogWrite(PWM_PIN[i], motor[i]>>3); 
    #else
      analogWrite(PWM_PIN[i], ((motor[i]>>2) - 250) + 2); 
    #endif 


Firmware for the Mystery 20A in the attachment. If somebody has interest, I can post instructions how to easily re-flash them using arduino.

regards,
ziss_dm
Attachments
Mystery20A_arduino_pwm.zip
(2.84 KiB) Downloaded 358 times
ziss_dm
 
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Sun Aug 07, 2011 4:06 pm

Hi ziss_dm,

yes, very interesting. Please post info for flashing via arduino.
Does same firmware have chance to work for the 12A blue series?
Thanks, Hamburger
User avatar
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Alternative ESC firmware (reflashing)

Postby EOSBandi » Sun Aug 07, 2011 4:10 pm

Terrific, my batch of mystery 20A esc's just arrived. I'll try them out. What do you think about using serial control of ESC's, as described on the page somebody referenced above? This could free up pins on arduino, especially on hex and octo configs.
User avatar
EOSBandi
 
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Mon Aug 08, 2011 12:31 pm

Hi,

Just a short story, how I'm re-flashing ESC's ;)

1) After opening ESC, you need to solder wires to the ISP pads.
20A_Bild.jpg

2) Connect them to the arduino
Code: Select all
10: Reset
11: MOSI
12: MISO
13: SCK 
GND: GNG
vcc: +5v

Note, that we are going to power up ESC's MCU from the arduino through USB, so you need to connect ISP +5v to the arduino's vcc pin.
3) In the Arduino IDE open sketch: Examples\ArduinoISP and upload it into aduino.
4) As we are going to use AVRDude as a programmer, we need to disable reset from USB. Some boards have a switch, some does not (Pro Mini, for example). Easiest way to disable reset on boards without switch is to connect resistor 30 ohm between VCC and RST pins.
5) As I said before, we are going to use AVRDude. It is shipped with arduino IDE and located in \hardware\tools\avr\bin. You can set environment variable ARDIDE and you can copy-paste commands. My arduino mapped to com3, you need to change it to your serial port. Next we need to run this:
Code: Select all
"%ARDIDE%\hardware\tools\avr\bin\avrdude.exe" -C "%ARDIDE%\hardware\tools\avr\etc\avrdude.conf" -v -p m8 -P com3  -c avrisp -b 19200

In case everything connected correctly, it should respond:
Code: Select all
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 "H:\Program Files\arduino-0022\hardware\tools\avr\etc\avrdude.conf"

             Using Port            : com3
             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.03s

avrdude.exe: Device signature = 0x1e9307
avrdude.exe: safemode: lfuse reads as 2E
avrdude.exe: safemode: hfuse reads as CF

avrdude.exe: safemode: lfuse reads as 2E
avrdude.exe: safemode: hfuse reads as CF
avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.

If something wrong, check your wiring, com port, power, etc..
6) If you want to backup existing firmware, execute the following:
Code: Select all
"%ARDIDE%\hardware\tools\avr\bin\avrdude.exe" -C "%ARDIDE%\hardware\tools\avr\etc\avrdude.conf" -p m8 -P com3  -c avrisp -b 19200 -U flash:r:flash-orig.hex:i -U eeprom:r:eeprom-orig.hex:i

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

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

avrdude.exe: Device signature = 0x1e9307
avrdude.exe: reading flash memory:

Reading | ################################################## | 100% 14.55s

avrdude.exe: writing output file "flash-orig.hex"
avrdude.exe: reading eeprom memory:

Reading | ################################################## | 100% 20.97s

avrdude.exe: writing output file "eeprom-orig.hex"

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.

7) To flash new firmware:
Code: Select all
"%ARDIDE%\hardware\tools\avr\bin\avrdude.exe" -C "%ARDIDE%\hardware\tools\avr\etc\avrdude.conf" -p m8 -P com3  -c avrisp -b 19200 -U flash:w:Mystery20A_arduino_pwm.hex

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

Reading | ################################################## | 100% 0.03s

avrdude.exe: Device signature = 0x1e9307
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
             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.81s

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.20s

avrdude.exe: verifying ...
avrdude.exe: 2336 bytes of flash verified

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.


8) Test your ESC with current limiter first. It could be just automotive bulb connected in series.

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Mon Aug 08, 2011 12:43 pm

Hi,

@Hamburger:
I cannot verify it my self, but according to this information http://www.armokopter.at/forum/viewtopic.php?f=9&t=1360 all ESC's in range 6-40A have similar MCU layout and therefore you can use same firmware.

@EOSBandi
Not sure I want to sacrifice serial port for escs.. ;) Currently I'm seriously thinking about this i2c-PPM converter: http://www.rcgroups.com/forums/showthread.php?t=1399162. With price tag around $10 it is really attractive option, to extend Pro Mini up to 8 motors. ;)

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

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Mon Aug 08, 2011 2:38 pm

ziss_dm,
thanks for the thorough description.
I am afraid my eyes and soldering skills are not sufficient to perform such tasks. What a pity.
Maybe I can interest someone to perform these tasks for me ( I have a small bulk of ESCs sitting in drawer, waiting).
Hamburger
User avatar
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Tue Aug 09, 2011 8:59 pm

ziss_dm wrote:Hi gompf-2 Quax,

....
I just point you to this because they also remove 3 caps in the commutation circuite.
....


Are they reffering to the to the LPF's in Back-EMF signal conditioner?
Are we sure, that they should be removed? ;)

regards,
ziss_dm


Hi ziss_dm,

i have a Mystery 30A and would like to test your modificated firmware. I'm unsure if the caps/resistors should be removed? Can i destroy the ESC if i don't remove them?

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Wed Aug 10, 2011 2:27 am

Hi funth1ngs,

In my case, I have removed caps after testing with 4s setup. With 3s it was working fine with caps.

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

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Wed Aug 10, 2011 12:47 pm

Hi ziss_dm,

i compiled the files with the following modifications:

Code: Select all
.equ    POWER_RANGE   = 250
.equ    MIN_RC_PULS   = 1000

; falling->rising intervals
.equ    MAX_INT_FR    = 2600 ; PWM + 100 = 2500 + 100
.equ    MIN_INT_FR    = 400 ;  PWM - MAX_RC_PULS - 100 = 2500 - 2000 - 100

; rising->falling intervals
.equ    MAX_INT_RF    = 2020 ; MAX_RC_PULS + 20 = 2000 + 20
.equ    MIN_INT_RF    = 980 ; MIN_RC_PULS - 20 = 1000 - 20


When I power up the ESC, the motor beeps and starts immediately to run at nearly full speed (rc_puls set to 1000ms). If I increase rc_puls, the speed increases too. But I can't stop the motor.

The PWM is arround 400Hz (2500ms) with 1000-2000ms rc_puls. Did I set the paramters correct?

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Wed Aug 10, 2011 1:48 pm

Hi Heiko,

I would guess, that you are modifying the pwm_arduino_250.inc file. The macros EvaluatePWC there is not subtracting MIN_RC_PULS and designed to accept PWM in range 16-2016ms .
In case you want standard RC range, just use other include pwm_rc_200.inc or pwm_fast_200.inc (second parameter of the _make.cmd).

pwm_arduino_250.inc:
POWER = Len / 8

pwm_rc_200.inc
POWER = (Len - MIN_RC_PULS) / 4

pwm_rc_100.inc
POWER = (Len - MIN_RC_PULS) / 8

regards,
ziss_dm
Attachments
Mystery20A_pwm_fast_200.zip
(2.85 KiB) Downloaded 376 times
bldc.zip
(103.55 KiB) Downloaded 285 times
ziss_dm
 
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Wed Aug 10, 2011 3:19 pm

Thx ziss_dm,

it's working great now with 3s and 4s (the caps are still not removed) on the test bench. You guessed right, I've copied the pwm_arduino_250.inc and used it as template ;)

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

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Wed Aug 10, 2011 5:14 pm

Hi ziss_dm and quax,

I have a couple of questions regarding the internals of the ESC firmware, please. As you seem to have dived into the firmware internals I ask you for some insight.

You may or may not have followed my attempts to program a powermeter estimator based on the pwm signals sent to the ESC. This works with approx. 5% accuracy for me so far (with BlueSeries and Plush ESC; does not work well with HK SS ESCs). To improve accuracy and understanding I would like to learn more about firmware internals.

1. with arduino we send pwm out of [1000;2000] with step size of "1". But does ESC really care for this accuracy? How many steps resolution of the input signal does the firmware resolve?

2. by what formula does the input pwm signal get transferred into power outputted to motor? It is a linear function, I hope?

3. by power I mean voltage * current. Is the following correct?
- voltage: the voltage does not get moderated by the ESC; so is dependant on battery's ability to keep up with actual current
- current: the current gets moderated by the ESC depending on pwm input to achieve different rpm

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

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Wed Aug 10, 2011 7:12 pm

Hi,

it worked great, but now it's burned ;)

I made some fast throttle changes while the motor was running, no problems. Then while motor was not running, I've set throttle to 100% very fast. The motor made it's normal start sound, but just for a very short time and it did not start to spin. Then I heard some hard clicking and the ESC died.

Is it possible that there is a problem with the start up routine and "motor is running detection"? It looked like the motor was fully powered even though it wasn't spinning. Or could this been caused by the not removed caps/resistors?

I will order some new ones.

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

Re: Alternative ESC firmware (reflashing)

Postby quax » Wed Aug 10, 2011 10:07 pm

funth1ngs wrote:Hi,

it worked great, but now it's burned ;)

I made some fast throttle changes while the motor was running, no problems. Then while motor was not running, I've set throttle to 100% very fast. The motor made it's normal start sound, but just for a very short time and it did not start to spin. Then I heard some hard clicking and the ESC died.

Is it possible that there is a problem with the start up routine and "motor is running detection"? It looked like the motor was fully powered even though it wasn't spinning. Or could this been caused by the not removed caps/resistors?

I will order some new ones.

Thanks,
Heiko


The answer is simple: It's absolutely forbidden to start with 100% power :!:

You cannot have both: a very fast reaction to the input changes and a slow down of the input reaction that is necessary to smoothen power jumps. If you increase the power of a brushless motor from lets say 30% to 100% it is equal to a accu short. The weakest link in the chain will be damaged. Therefore the increase has to be moderate or the ESC has to slow down power changes.

We need a fast power response for attitude control and therefore the power change control in the ESC software is omitted. The MultiWii software makes no sudden high power changes and doesn't destroy the ESC.

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Wed Aug 10, 2011 10:22 pm

Hi Hamburger,

1. with arduino we send pwm out of [1000;2000] with step size of "1". But does ESC really care for this accuracy? How many steps resolution of the input signal does the firmware resolve?

This is not exactly true.
1) Arduino PWM has only 8 bit resolution. It has multiplier 8
2) To fit to the RC range 1000-2000, we have to limit values to the 125-250. So effectively WMC has < 7bit of the resolution of the PWM

The different ESC's firmwares have different internal resolution:
Mystery - 64 steps (according to my experiment)
Plush - 128 steps (according to my experiment)
BL-Ctrl 2.0 - 2048 steps
CC - 2048 steps
Quax - up to 255

2. by what formula does the input pwm signal get transferred into power outputted to motor? It is a linear function, I hope?

Sometimes yes, sometimes ESC has built-in throttle curve.

3. by power I mean voltage * current. Is the following correct?
- voltage: the voltage does not get moderated by the ESC; so is dependant on battery's ability to keep up with actual current
- current: the current gets moderated by the ESC depending on pwm input to achieve different rpm


I would say vice versa. The esc controls voltage and have no idea about current (we are talking about cheap escs). 50% of throttle usually means 50% of input voltage.


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

Re: Alternative ESC firmware (reflashing)

Postby quax » Wed Aug 10, 2011 10:24 pm

Edit: ziss_dm was faster than me ;)

Hamburger wrote:....
1. with arduino we send pwm out of [1000;2000] with step size of "1". But does ESC really care for this accuracy? How many steps resolution of the input signal does the firmware resolve?
....

If you use an ESC with an onboard resonator of 16MHz, then you have 200 steps solution on the motors PWM side.
For an ESC that run with the internal 8MHz you have only 100 steps.
Meanwhile I can say that a solution of 100 ist sufficient for the attitude control of a quadrocopter.

Hamburger wrote:....
2. by what formula does the input pwm signal get transferred into power outputted to motor? It is a linear function, I hope?
....

It's linear, not least because of the calculation effort needed for other transfer characteristics.

Hamburger wrote:....
3. by power I mean voltage * current. Is the following correct?
- voltage: the voltage does not get moderated by the ESC; so is dependant on battery's ability to keep up with actual current
- current: the current gets moderated by the ESC depending on pwm input to achieve different rpm

Thanks, Hamburger

The voltage of the motor is the average of the motor-PWM. V_motor = on_time/pwm_period. If the PWM frequency is high enough, the voltage is transformed by the inductivity of the motor. The motor voltage controls the motor RPM.

The current depends on voltage, rpm and motor_properties. As the example of the sudden rise to 100% power shows, that current is also a function of the RPM. If you look for http://www.drivecalc.de/ (there is also an English version) you can see that behaviour in graphs and you can do some tests with the parameters.

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

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Thu Aug 11, 2011 9:30 am

ziss_dm and quax,

thanks to both of you for your explanations. Now I understand much better how to interprret the arduino output signals with respect of the power consumption. A future version of the power estimator could improve on that basis.

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

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Thu Aug 11, 2011 10:54 am

quax wrote:
funth1ngs wrote:Hi,

it worked great, but now it's burned ;)

I made some fast throttle changes while the motor was running, no problems. Then while motor was not running, I've set throttle to 100% very fast. The motor made it's normal start sound, but just for a very short time and it did not start to spin. Then I heard some hard clicking and the ESC died.

Is it possible that there is a problem with the start up routine and "motor is running detection"? It looked like the motor was fully powered even though it wasn't spinning. Or could this been caused by the not removed caps/resistors?

I will order some new ones.

Thanks,
Heiko


The answer is simple: It's absolutely forbidden to start with 100% power :!:

You cannot have both: a very fast reaction to the input changes and a slow down of the input reaction that is necessary to smoothen power jumps. If you increase the power of a brushless motor from lets say 30% to 100% it is equal to a accu short. The weakest link in the chain will be damaged. Therefore the increase has to be moderate or the ESC has to slow down power changes.

We need a fast power response for attitude control and therefore the power change control in the ESC software is omitted. The MultiWii software makes no sudden high power changes and doesn't destroy the ESC.

Regards,
quax


Hi Bernhard,

thanks for the explanation.

I made some quick changes from 5% to 100% and nothing happend as long as the motor was running. Because it has happened while the motor did not run, i thought it maybe has something to do with the start up routines or not removed caps.

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Thu Aug 11, 2011 2:25 pm

Hi Heiko,

I think, there are big difference between fast transitions and attempt to start at high power:
During fast transitions the motor start responding almost instantly and there are no big power difference between commutations. During startup it starts at low power and runs about second and then switches to the normal mode. If you set throttle to 100% this would produce step change between 5% and 100% and may damage FETs or even motor ;(

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Thu Aug 11, 2011 2:48 pm

Hi Quax,

Meanwhile I can say that a solution of 100 ist sufficient for the attitude control of a quadrocopter.


Currently I can test both 125 and 250 steps resolution on the same setup, just by re-flashing ESCs and WMC ;) And I would say there are big difference. With 250 steps resolution I pretty much cannot make it to oscillate (I have increased P up to 16 and stopped because, for some reason, it became difficult to control height. But was no signs of oscillations). Will see how it flies outdoors, but so far results are really promising. ;)

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

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Thu Aug 11, 2011 8:32 pm

ziss_dm wrote:Hi Heiko,

I think, there are big difference between fast transitions and attempt to start at high power:
During fast transitions the motor start responding almost instantly and there are no big power difference between commutations. During startup it starts at low power and runs about second and then switches to the normal mode. If you set throttle to 100% this would produce step change between 5% and 100% and may damage FETs or even motor ;(

regards,
ziss_dm


Hi ziss_dm,

it's hard to explain with my limited english :).

It looked like the startup didn't work and the ESC went into the normal mode although the motor has not rotated.

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Thu Aug 11, 2011 11:55 pm

Hi Heiko,

Was it completelly stopped for long time?

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Fri Aug 12, 2011 2:42 am

Hi,

Just a short video of ESCs running with 250 steps resolution, this is acro mode:
http://www.youtube.com/watch?v=n_g2s1nc ... rofilepage

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

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Fri Aug 12, 2011 8:29 am

ziss_dm wrote:Hi Heiko,

Was it completelly stopped for long time?

regards,
ziss_dm


Hi ziss_dm,

I'm not 100% sure, but i think it was stopped for at least 5 - 10 seconds.

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

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Sun Aug 14, 2011 8:30 am

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

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Sun Aug 14, 2011 5:12 pm

ziss_dm wrote:Outdoor test:

togehter with the ESC test very convincing.
User avatar
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Alternative ESC firmware (reflashing)

Postby quax » Sun Aug 14, 2011 9:55 pm

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
User avatar
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby ziss_dm » Mon Aug 15, 2011 9:37 am

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
ziss_dm
 
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Alternative ESC firmware (reflashing)

Postby quax » Mon Aug 15, 2011 9:49 pm

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
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Tue Aug 16, 2011 8:38 am

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
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Alternative ESC firmware (reflashing)

Postby quax » Wed Aug 17, 2011 10:19 am

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
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby Hamburger » Wed Aug 17, 2011 1:19 pm

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
User avatar
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Alternative ESC firmware (reflashing)

Postby funth1ngs » Mon Aug 22, 2011 6:32 pm

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
funth1ngs
 
Posts: 68
Joined: Tue Aug 09, 2011 8:37 pm

Re: Alternative ESC firmware (reflashing)

Postby quax » Mon Aug 22, 2011 7:48 pm

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.
User avatar
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby marbalon » Mon Aug 22, 2011 7:50 pm

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!
marbalon
 
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Postby quax » Mon Aug 22, 2011 7:57 pm

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
User avatar
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby marbalon » Mon Aug 22, 2011 8:00 pm

Quax thank for quick reply. So functions used for motor stop detection works to slow for tunned software ?
marbalon
 
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Postby quax » Mon Aug 22, 2011 8:55 pm

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.
User avatar
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby marbalon » Mon Aug 22, 2011 9:00 pm

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 ?
marbalon
 
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Postby quax » Mon Aug 22, 2011 11:13 pm

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.
User avatar
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby marbalon » Tue Aug 23, 2011 7:21 am

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?
marbalon
 
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Alternative ESC firmware (reflashing)

Postby Stalk » Wed Aug 24, 2011 10:40 am

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?
Stalk
 
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: Alternative ESC firmware (reflashing)

Postby quax » Wed Aug 24, 2011 10:19 pm

@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.
User avatar
quax
 
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm

Re: Alternative ESC firmware (reflashing)

Postby Stalk » Thu Aug 25, 2011 9:37 am

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

Next

Return to ESCs, propellers , servos and radios

Who is online

Users browsing this forum: No registered users and 1 guest