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 »

Hi gompf-2,

Can I ask you to repeat test on: 2.0.6? ;)

regards,
ziss_dm

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: Alternative ESC firmware (reflashing)

Post by gompf-2 »

Hi ziss_dm,

I will, but unfortunately it´s monday... :o I´ll find some time in the next 2-3 days.

Regards,
gompf

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

Hello,
question: Are those (marked with yellow on picture) caps BEMF on F-30A (and F-20A) HK ESC? And should they be removed when used with v2 firmware (it worked O.K. with them not removed on v1 of firmware)?!

Regards Andrej.
Attachments
UP1.jpg

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Yes, they are.
V1 was more tolerant, but still better to remove them. If you after "perfection", you can replace them with 40pf ones.

Regards,
Ziss_dm

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

To simplify firmware flashing and adjusting configuration, now it is possible to use this tool:

http://wii-esc.googlecode.com/files/wii ... _win32.exe

This is simple avrdude shell. It is designed to support users that have never flashed firmware to a micro-controller. Idt supposed to be fully portable and self-contained (with reasonable download size)

Features:
1) Existing firmware backup (flash, eeprom, fuses)
2) Download fresh files
3) Edit Parameters
4) Portable

regards,
ziss_dm
Attachments
wii_esc_flash_main.png
wii_esc_flash_conf_editor.png

LazyZero
Posts: 2
Joined: Mon Jun 25, 2012 6:57 am

Re: Alternative ESC firmware (reflashing)

Post by LazyZero »

Funny ;) , because I released today a new version of the kkflashtool also able to flash wii-esc directly from svn.

The only thing I am still working on is the eeprom editing, I will add it to next beta when it is ready.
So there is a alternative for Mac and Linux users, Windows users are also welcome.

Best Christian

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: Alternative ESC firmware (reflashing)

Post by vpb »

Hi LazyZero, I use your kkflashtool all the time, very comfortable! :D

I have small thing about Turnigy F30 reflashed with Simonk fw, I dont know that's feature or problem. Whenever one of my propeller touch hard-to-cut-through thing, like a (very) small tree branch, tough glass body, leaf, it stops immediately that motor and ofcourse my tricopter fall. But later then, about 1s, it spins again Luckily that's almost at low height when I try to cut the glass :D. Anybody meets that behaviour?

LazyZero
Posts: 2
Joined: Mon Jun 25, 2012 6:57 am

Re: Alternative ESC firmware (reflashing)

Post by LazyZero »

vpb wrote:Hi LazyZero, I use your kkflashtool all the time, very comfortable! :D

I have small thing about Turnigy F30 reflashed with Simonk fw, I dont know that's feature or problem. Whenever one of my propeller touch hard-to-cut-through thing, like a (very) small tree branch, tough glass body, leaf, it stops immediately that motor and ofcourse my tricopter fall. But later then, about 1s, it spins again Luckily that's almost at low height when I try to cut the glass :D. Anybody meets that behaviour?


I think that is normal behavior of simonk firmware, I had to make the same experiences.

Best Christian

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: Alternative ESC firmware (reflashing)

Post by vpb »

thank you, nice to hear that!

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: Alternative ESC firmware (reflashing)

Post by gompf-2 »

Hi ziss_dm,

I did some tests with r381 today, setup again BS12A nFet and KDA20-50s,epp8x4,5.
I was to lazy to export all the graphs so I uploaded the ods-file.
http://www.dateiupload.com/files/lHx71RLdLU.ods
I tried to normalize to U=7,5V as my PSU isn´t stable. The comp_PWM firmware feels fine, normal PWM has problems in my setup with startup transist lower than pwm step 2-20 (e.g. starts with jump 2 - 10 but needs 3-4s to get rotor on ordered rotation/get feedback. Even when the motor seems to run smooth I can observe several sync losses (oszi on Miso-pin shows unstaple PPM) while analoge.Write < ~45.
But as I wrote, comp_PWM feels fine.

PS: Is it possible to disable ee2 support via config? I ask because I use armokopter bootloader (http://www.armokopter.at/wiki/doku.php?id=aok:elektronik:regler_neu:bootloader), works fine but for flash only. I managed to set eg input method by hand but braking seems to be enabled by default in comp-mode when I build it "by hand" and flash the .hex only.

Regards,
gompf

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

The comp_PWM firmware feels fine, normal PWM has problems in my setup with startup transist lower than pwm step 2-20 (e.g. starts with jump 2 - 10 but needs 3-4s to get rotor on ordered rotation/get feedback. Even when the motor seems to run smooth I can observe several sync losses (oszi on Miso-pin shows unstaple PPM) while analoge.Write < ~45.
But as I wrote, comp_PWM feels fine.

You can try to increase RPM_START_MIN_RPM up to 7000-8000 rpm.


PS: Is it possible to disable ee2 support via config? I ask because I use armokopter bootloader (http://www.armokopter.at/wiki/doku.php? ... bootloader), works fine but for flash only. I managed to set eg input method by hand but braking seems to be enabled by default in comp-mode when I build it "by hand" and flash the .hex only.


Added:

Code: Select all

#define    READ_EXTERNAL_CONFIG


regards,
ziss_dm

sim
Posts: 18
Joined: Tue Oct 18, 2011 11:40 pm

Re: Alternative ESC firmware (reflashing)

Post by sim »

Hello! Oops, sorry, I forgot to check here for a while.

ziss_dm wrote:Hi Simon,

I was also looking at making an EEPROM block area for configuration (reverse, brake, timing, and maybe some other options). I wonder if we should try to make something standard / compatible?

Good idea! Currently I use really simple layout:

Code: Select all

struct eeprom_layout {
  uint8_t __ver_magic;
  struct config_data cfg;
};

struct config_data {
  uint16_t rcp_min_us;
  uint16_t rcp_max_us;
  uint16_t rcp_start_us;
  uint16_t rcp_full_us;
  uint16_t rcp_cal_us;
  uint8_t  rcp_deadband_us;
  uint8_t  braking;
};

__ver_magic - layout version.

The only "trick" is that all values in phisical units. If you have better idea, I'm ready to change it. ;)


Gah.. it's fine except for this. :) Actually, I was testing with a very tiny high KV motor the other day, and noticed my new variable timing code is slow enough that it was lagging the timing at very high speed, so I went and ripped everything back out down to 16-bit again. It's fairly easy to do (and the new 16-bit rc pulse code works either way), but I just couldn't find a way to make the input pulse scaling not ugly and slow. I think I prefer optimizing 24-bit and having the extra bits than making the interrupt slower or putting a shift left 3 during input and calibration, just so that scaling from it to PWM range can still happen without much overhead and meet shorter ranges (@8MHz and/or with RC car mode). So I shelved that again and optimized and JITitized the 24-bit stuff, meaning everything still calibrates to 1/16µs steps. I guess you don't want to store everything left-shifted 4 bits. :)

ziss_dm wrote:Currently there is no bootloater bundled. I'm old-fasion man - I think, that ISP connector on the board is safest and fastest way to update firmware. I'm also researching possibility to use SPI as a digital communication channel, instead of PPM as a side-effect it should allow to re-flash without bootloader ;)


Hehe.. :) I also have some contrib code to enable SPI for debugging during operation. It should be pretty simple to use it for commands as well. We will still need a connection to reset for reflashing, though.

ziss_dm wrote:You probably need to adjust dead-time. In C version dead-time inserted naturally by overhead of the case statement. In your case, you probably need to add some delay 0.5 - 0.7us, usually enough.


Yeah, I was experimenting with this. The F-30A boards seem to have pretty good response time except for high FET on time is quite slow. I also notice the effect that starting is easier and even back-EMF seems less noisy with complementary PWM. I'd like to make it an option for larger boards with FET drivers, but they often have the same pin config as tiny boards with P/N. Your P/N test ended quickly, eh? I was thinking about how difficult it might be to measure for both FET on/off times and for the presence of BEMF capacitors, and shift the timing if found. We could drive AIN0 on any board. Maybe it would be possible to measure delay from AIN0 to any mux pin, or from one mux pin to another. Measuring FET timing (to calculate a deadtime) may be difficult when capacitors are present.

ziss_dm wrote:So, you switching power_off only for 15deg? I tried to re-produce this algorithm, but without success: I can see, that it is powering off and automatically commutating when driving HDD motor, but with "normal" motor it never detecting ZC on next state ;( Are you sure, that improvemet is not side-effect of anything else? ;)


Hmm, no, I'm not. I changed too many things at the same time. :/ The intent is, in absolute degrees (0 being the commutation point), 15°: start looking for demag, 30°: give up, stop PWMing, continue as if ZC happened, 60-advance°: go to next step and re-enable PWM. If I skip the looking for demag loop and just go straight to looking for ZC with abs 120° timeout, the hard drive motor driving is really bad. What "normal" motor are you trying?

ziss_dm wrote:
Meanwhile, I have also implemented DC bias removal in update_timing, and this seems to have made low speed a bit smoother and less confusing for the demag tracking.

This is interesting. ;) Can you explain little bit more? I understand, that we can virtually shift zc instant depending on timing difference, but we have only 15deg window for compensation and not clear how to take into account real acceleration.


Motors driven very slowly always bad on the F-30A: the commutation steps are very uneven, and I thought this was maybe leading to problems, but since it mostly disappears at higher speeds, I'm not so sure this really helps anything. It does seem to make things more symmetric on the hard drive motor. It just uses the interval of the last two ZCings as 120° and adds half of the difference between the last two intervals to the previous ZC time to "fix" the next ZC time...if that makes any sense. I uploaded some scope pictures here with channel 1 showing phase A, channel 2 showing the start of update_timing until the end of the commutation wait. You can see that it is trying to keep the falling edge evenly spaced.

http://0x.ca/sim/esc/timing_loss_fix/hd ... as_fix.png
http://0x.ca/sim/esc/timing_loss_fix/hd ... as_fix.png

ziss_dm wrote:I have found reason for this jump and dip. ;( In latest version it should be corrected, but in expence a litle bit higher noise at low power.

This is what I was seeing when I was testing with your tree. It seems fixed now.

vpb wrote:I have small thing about Turnigy F30 reflashed with Simonk fw, I dont know that's feature or problem. Whenever one of my propeller touch hard-to-cut-through thing, like a (very) small tree branch, tough glass body, leaf, it stops immediately that motor and ofcourse my tricopter fall. But later then, about 1s, it spins again


Maybe I didn't quite understand when you reported this before. It should immediately reduce duty to maximum 25%, but not stop unless physically blocked, and always keep trying to run again. There should be no 1s delay. Do you think instead that it should stop and only start again if re-armed, like if freshly-rebooted?

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

@ziss_dm: I can see you released 2.0.7 beta and also avrootloader! Can you please summarize changes/improvements.

I'm currently using 2.0.6 with comp_pwm and EXT_MOTOR_RANGE on a Y6 and it works perfectly. The only thing I have noticed when I moved from 3S to (much heavier) 4S configuration was the necessity to set #define MPU6050_LPF_42HZ or I could not remove oscillations, that was defiantly not so obvious with 3S!??

Regards Andrej

My config:
Y6, 1.6kg fly weight
- Crius AIO Pro
- mix of F-30A and F-20A,
- Turnigy D2830-11 1000kv (Aerodrive),
- 4S 5800mAh
- GWS 10x4.7 prop.

zarkon
Posts: 68
Joined: Sat Oct 15, 2011 8:25 am

Re: Alternative ESC firmware (reflashing)

Post by zarkon »

NikTheGreek wrote:Hi.
I ve flashed succesfully my Turnigy Mag8 Towerpro 18a ESC with simonk firmware tp_nfet.hex :D
This is the best firmware for them ? or there is something better ?

Thank you in advance for your time and effort .

FRONT
Image
BACK
Image


hey I have the same ESC mind sharing where is the programming pad for it? can't seem to figure it out

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: Alternative ESC firmware (reflashing)

Post by LenzGr »

zarkon wrote:hey I have the same ESC mind sharing where is the programming pad for it? can't seem to figure it out

There does not seem to be one - you will have to connect to the solder pads of the CPU directly. Check the info and links from this spreadsheet for more info.

frogstarb
Posts: 59
Joined: Wed Jul 25, 2012 10:52 pm

Re: Alternative ESC firmware (reflashing)

Post by frogstarb »

I have one of these in transit, and if it works as it should I'll be flashing my 6 hobbykink blue series 12A escs without even pulling out the soldering iron :)

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: Alternative ESC firmware (reflashing)

Post by NikTheGreek »

LenzGr wrote:There does not seem to be one - you will have to connect to the solder pads of the CPU directly. Check the info and links from this spreadsheet for more info.


You are right...somehow you have to connect the ISP to the microcontroler directly ;)

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,


@ziss_dm: I can see you released 2.0.7 beta and also avrootloader! Can you please summarize changes/improvements.


Yes, 2.0.7 was released, but list of changes is not really big. ;)
1) The status was changed to the beta, as was no big problems was reported. ;)
2) The timing advance is configurable in EEPROM now (15, 17, 19, 21 deg)
3) Compiller directive to disable EEPROM reading ;)

The flash tool v 0.4:
1) Timing advance in EEPROM editor
2) AVRootLoader added as a target, so it is possible to flash it. Boot sign: "ESCBL1"
3) AVRootLoader added as a programmer. I have created command-line wrapper for the AVRootLoader.dll. It supports writing Flash and EEPROM. The boot sign currently hardcoded to the "ESCBL1". ;) Also there are small addition: It before programming it sets DTR, so DTR can be used to apply power to the ESC, which makes process fully automatic. If there are interest, I can post schematic. ;)

The only thing I have noticed when I moved from 3S to (much heavier) 4S configuration was the necessity to set #define MPU6050_LPF_42HZ or I could not remove oscillations, that was defiantly not so obvious with 3S!??

This is interesting. Usually is enough to reduce P and D by 20-30% (which is quite explainable). So, was no way to remove oscillations by PID adjustments? Was it fast or slow oscillations or erratic? ;)

regards,
ziss_dm

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi Simon,

I have tryed last "fetkiller" release on my micro, and found some anomailies in recovery algorithm.
This is the video:
http://youtu.be/CPsDLV1Xvf4

regards,
ziss_dm

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

ziss_dm wrote:Hi,
This is interesting. Usually is enough to reduce P and D by 20-30% (which is quite explainable). So, was no way to remove oscillations by PID adjustments? Was it fast or slow oscillations or erratic? ;)
ziss_dm

On further testing: it is possible that only bearings get worser and thus produce more vibrations, because oscillations were (and are now getting back) like random kicks around X and Y axes. I really have to test again with 3S....

Regards
Andrej

sim
Posts: 18
Joined: Tue Oct 18, 2011 11:40 pm

Re: Alternative ESC firmware (reflashing)

Post by sim »

ziss_dm wrote:I have tryed last "fetkiller" release on my micro, and found some anomailies in recovery algorithm.
This is the video:
http://youtu.be/CPsDLV1Xvf4


Hello! I think the problem is actually not with the recovery algorithm but with the ZC filter and/or DC bias cancellation stuff, where it keeps falling from running mode back to start mode because it hits what it thinks is a 120 degree timeout. Can you try the latest release at https://github.com/sim-/tgy/downloads and see how it compares? I have only the 2900KV version of that motor, and it seems to work fine (though it hits TIMING_MAX with no prop). Cheers!

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

ziss_dm wrote:3) AVRootLoader added as a programmer. I have created command-line wrapper for the AVRootLoader.dll. It supports writing Flash and EEPROM. The boot sign currently hardcoded to the "ESCBL1". ;) Also there are small addition: It before programming it sets DTR, so DTR can be used to apply power to the ESC, which makes process fully automatic. If there are interest, I can post schematic. ;)
ziss_dm

If you meant the schematics for programer than: Yes please!

Regards Andrej

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: Alternative ESC firmware (reflashing)

Post by gompf-2 »

Hi ziss_dm,

ziss_dm wrote:3) AVRootLoader added as a programmer. I have created command-line wrapper for the AVRootLoader.dll. It supports writing Flash and EEPROM. The boot sign currently hardcoded to the "ESCBL1". ;) Also there are small addition: It before programming it sets DTR, so DTR can be used to apply power to the ESC, which makes process fully automatic. If there are interest, I can post schematic. ;)


Again, thank you very much for this comfortable and easy solution! :ugeek:

crashlander wrote:If you meant the schematics for programer than: Yes please!


The "programer" is a rs232 to 1-wire interface consisting of 2 resistors, see the small schematic under the "Hardware" section (sry, page is in german): http://www.armokopter.at/wiki/doku.php?id=aok:elektronik:regler_neu:bootloader
I tested this setup with HK BS12 nFet and 10k pullDOWN (list sais pullup) and it works fine with external power source.
With wii_esc_flash_v04_win32 DTR goes from high to low when entering programming so I assume ziss_dm intended to power the ESC via a pnp driver, general types like BC557 should be fine.

Edit: I tested this with success:
Image
Powering the ESC via the 3pin connector doesn´t work for HK BS12 as the BEC connected there is seperated from the MCUs +5V

Regards,
gompf

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

The "programer" is a rs232 to 1-wire interface consisting of 2 resistors, see the small schematic under the "Hardware" section (sry, page is in german)


With FTDI and "Blue Series" style boards it is even simplier: 1 resistor. ;)

With wii_esc_flash_v04_win32 DTR goes from high to low when entering programming so I assume ziss_dm intended to power the ESC via a pnp driver, general types like BC557 should be fine.


Yes, that was intended. This is my "schematic":
servo_prog_imp_small.jpg
servo_prog_proj.jpg


Code: Select all

 R1 - 1.6k
 R2 - 4.7k


This works for all "bs" family. For others I'm just replacing resistor on the board (or put jumper, if I'm leazy)

Powering the ESC via the 3pin connector doesn´t work for HK BS12 as the BEC connected there is seperated from the MCUs +5V

True, but it is possible to put diode, like this:

IMG_20120927_173049.jpg


regards,
ziss_dm

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

@ziss_dm & gompf-2: Thank you for schematic.

Another question regarding EXT_MOTOR_RANGE and atmega328, since Alexinparis introduced LadyBird option (brushed direct FET control) the ESC does not arm (even with MINTHROTTLE 1008), so I must add each time +2 in output.ino to get old behavior back.
eg. new default:

Code: Select all

OCR1B = ((motor[1]>>2) - 250);

old working:

Code: Select all

OCR1B = ((motor[1]>>2) - 250)+2;

Is there any known workaround to fix this (without changing output.ino each time).
Regards Andrej

frogstarb
Posts: 59
Joined: Wed Jul 25, 2012 10:52 pm

Re: Alternative ESC firmware (reflashing)

Post by frogstarb »

Hey all,

Just received my socket tool for programming my ESCs. These are 12A hobby-king blue series (which HK implies are mystery rebranded), but before I go about building and flashing I thought I'd ask; are these know to work/not work with the alternative firmwares? Is there one I should try first?

Pointers greatly appreciated :)

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: Alternative ESC firmware (reflashing)

Post by gompf-2 »

Hi frogstarb,

yes, they work. You just have to find out if you have the older version with p- and n-fets in the powerstage or the newer one with nfets only. If you remove the shrink tubing for programming check if you have 6 identical fets under the heatsink (->nfets only) or 3 each of 2 different types (p- and nfets).
With p/n fets you have to choose Blue Series as target, with nfets only Blue Series V2 or Blue Series V2 with complimentary PWM.

I use BS12 V2 with KDA20-50s and for me it feels better with complimentary PWM. Also I like the bootloader option with the BS-ESCs as rx from the mega8 is connected to the ppm input -> no rework needed.
PS: It woudn´t have been tooo dificult to find this info here... ;)


Regards,
gompf

frogstarb
Posts: 59
Joined: Wed Jul 25, 2012 10:52 pm

Re: Alternative ESC firmware (reflashing)

Post by frogstarb »

Hey gompf,

Thanks for the info. I'm not the patient type so I went ahead and reflashed them with bs_nfet.hex from simonk, I didn't know I should have checked the fets... oops. Now, they all work and while I had to play with reversing rotation, everything else was simple and straightforward, I will check the fets tomorrow before I recalibrate the escs. I was confident about using nfet because the RapidEsc DB only mentioned one kind of BS 12A.

I know information isn't hard to find here, but there's so much of it and I have no way of knowing what to trust so I thought I'd ask on a thread dedicated to the alt firmwares. I learned a lot today, thank you!

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

Also I like the bootloader option with the BS-ESCs as rx from the mega8 is connected to the ppm input -> no rework needed.


BTW: The bootloader in flash tool uses PD2(INT0) pin directly, so it does not require this connection any more. ;)

regards,
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 »

Is there any known workaround to fix this (without changing output.ino each time).
Regards Andrej

Try set MINCOMMAND 1008. I think that is used for initializing?

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

Hamburger wrote:Try set MINCOMMAND 1008. I think that is used for initializing?

Thank you! That did the trick yes.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

Hello,
where are BEMF caps on HobbyKing Blue Series 12A ESC.

Regards
Andrej
Attachments
annotated esc.jpg

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: Alternative ESC firmware (reflashing)

Post by vpb »

Has aybody tried new Simonk fw (30 Sep) on F-30A esc? Any performance gains: heat, longer flight time...etc?

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

HKBlue12A_Cs_MБssenRaus.JPG



regards,
ziss_dm

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

ziss_dm wrote:Hi,

regards,
ziss_dm


Thank you.

razorconcepts
Posts: 1
Joined: Thu Oct 25, 2012 2:49 am

Re: Alternative ESC firmware (reflashing)

Post by razorconcepts »

In the wii-esc source code, does anyone know where the FET on/off methods ( AnFETOff(), ApFETOff() , etc..) are located? I'm trying to compile it myself but all of those functions seem to be missing.

sim
Posts: 18
Joined: Tue Oct 18, 2011 11:40 pm

Re: Alternative ESC firmware (reflashing)

Post by sim »

In src/hal/bs_nfet.h, for example, included by core.h. See makefile.avr.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by scrat »

Hi,

question regarding ESC's:

Now I have set MINCOMMAND to 1000 in config.h. I have simonk esc's. When I plug the battery in, everytime I should hear 4 beeps. 3 for 3S lipo and one for inicialisation. Sometimes I hear just 3 beeps but quad works normaly.

Will bo something wrong if I set MINCOMMAND to 950 or leave at 1000?

Thank you.

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: Alternative ESC firmware (reflashing)

Post by vpb »

I use 950 for F-30 reflashed with simonk fw, never have any problem.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by scrat »

Thanks.

EDIT: I have set mincommand now to 950 and esc's inicialise every time :)

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

The new version of wii-esc is available 2.0.9:

1) Added possibility to adjust end-points using stick programming procedure (full throttle, power-up, wait for 2 beeps, throttle down, wait for long beep).
2) Tweaked pwm on/off procedures for complimentary pwm, to archive constant dead-time.

regards,
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 »

1) Added possibility to adjust end-points using stick programming procedure (full throttle, power-up, wait for 2 beeps, throttle down, wait for long beep).

this can be disabled at compile time, I suppose?
I like wii-esc version 1 beyond other aspects because it is _not_ configurable at run time; so whatever stupid happened on the input side (like MultiWii fc outputs), that could not de-calibrate the ESC; effect: the ESC always worked with the same compile time settings, period.

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

It can be disabled in EEPROM config. :)
Basically all shipped configs, except "default" have this disabled.

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

Re: Alternative ESC firmware (reflashing)

Post by Hamburger »

perfect.

Quad FRITZ
Posts: 44
Joined: Wed Apr 25, 2012 11:21 pm

Re: Alternative ESC firmware (reflashing)

Post by Quad FRITZ »

Does the WiiESC FW also have a bootloader or will it "kill" the bootloader I have in my ESC from the SimonK FW?

Did somobody try to use: https://github.com/c---/ArduinoUSBLinker instead f using the Turnigy USB linker with the kkMulticopter Flash Tool?

Thanks

Btw: MT 2814-10 770kV is giving problems with original SimonK FW- for this reason I want to flash the wiiEsC FW to my F-30A ESCs

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

Hello,
today I made a mistake and flashed bs_nfet on a old bs with P/N fets...
... the magic smoke escaped...
The question is which is the part that dyes that way? Is it user replacable?
I'm talking about old HK-12A BlueSeries (http://www.hobbyking.com/hobbyking/stor ... oller.html) and in accordance to (https://docs.google.com/spreadsheet/ccc ... ZRlE#gid=0) it should be all N.

Regards Andrej

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Hi,

WiiESC not "bundled" with bootloader. That means you can use any bootloader of your choice. If you do not have off-the-shelf USBLinker it is easier to use AVRRootLoader as schematic is just one resistor with FTDI (published 1 or 2 pages before). Also Wii-ESC flash tool has support for it. If you want to use Simonk bootloader easiest provcedure:
1) Flash RapidESC through ISP
2) set fuses through ISP
3) flash wii-esc through USBLinker

The question is which is the part that dyes that way? Is it user replacable?


Usually P-FETs ;( You can buy them on Ebay, but usually it is faster and cheaper to replace whole board.


@Quad FRITZ: You also need to remove BEMF filtering caps.

Image

regards,
ziss_dm

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

Hello,
I have issues with ziss_dm's AVRootLoader and WII-ESC Flash tool:
1. flashing HK's F-30A over USBasp with ESCBL1.hex
2. Using AVRootloader to flash bs_nfet.hex
3. Unsuccessfully using AVRootloader to write eeprom settings, ESC/rootloader does not responds anymore!

If I invert steps 2 and 3 it works, but only one time.
IMHO: it looks like actual flash for ESC overwrites part of rootloader!?

The behavior is same with flash tool 0.4 and 0.5 and with ESC flash from r433 and current.
Flashing everithing with plain USBasp works.

Regards
Andrej

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: Alternative ESC firmware (reflashing)

Post by gompf-2 »

Hi crashlander
IMHO: it looks like actual flash for ESC overwrites part of rootloader!?

This happens if you don´t write the lockbits for the bootloader section after writing the bootloader, have a look at the boards.txt of arduino for Mega8 boards:

Code: Select all

atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F

Be very careful what you type to avrdude at this point and read twice before hitting return...

As you can write the bootlaoder once it seems to be unlocked now, so you have to
1. Flash ESCBL1.hex via ISP
2. Use avrdude to lock bootloader section
3. Use bootloader to write flash/ee2

Regards,
gompf

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Alternative ESC firmware (reflashing)

Post by crashlander »

Ups... :o
I had impression that when using WII-ESC-Flash tool it takes care of fuse (and other) bits.
But it seems not.
I guess/hope/persume that lockbits can be inverted (unlike reset disable)?!

Regards
Andrej

Post Reply