Alternative ESC firmware (reflashing)

Randulf
Posts: 11
Joined: Mon Jan 27, 2014 11:08 pm

Re: Alternative ESC firmware (reflashing)

Post by Randulf »

I'll try that tonight. I remember reading about it but had forgotten all about it, thanks for reminding me.

I'm really at loss here. Ive been reading the datasheet over and over and looked at various examples on the net, I really think this should work.
Anyway, I'm learning a lot here just wish I had more time each night to sit with it.

Randulf
Posts: 11
Joined: Mon Jan 27, 2014 11:08 pm

Re: Alternative ESC firmware (reflashing)

Post by Randulf »

Finally some progress!
Swapped

Code: Select all

TIFR = _BV(ICF1);
rx_ppm_callback(time, state);

to

Code: Select all

rx_ppm_callback(time, state);
TIFR = _BV(ICF1);

and now it works to toggle the led in the interrupt handler.
The datasheet states that the ICF1 bit will be reset automatically so maybe we can remove it.
Still no arming beep though.
Can't really see any difference in frequency when turning the throttle up and down. But maybe the difference is to small to notice.

Seems like we're not getting past the if ((tmp >= rx.rcp_min) && (tmp <= rx.rcp_max)) in the filter_ppm_data function.
Tested to toggle the led if(tmp >= rx.rcp_min) and that works.
Then tested to toggle the led if(tmp <= rx.rcp_max) and that also worked, whooot!!
Retested this a couple of times with the same result, guess I'm too tired to see why.
Time to go to bed.

edit:
Could temp be 65535 and evaluate to -1 when checking if temp is less or equal to rx.rcp_min?
Thats the only explanation I could think of.

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Everything is unsigned, so should not be a case.

Randulf
Posts: 11
Joined: Mon Jan 27, 2014 11:08 pm

Re: Alternative ESC firmware (reflashing)

Post by Randulf »

Yeah I know, now when my head is bit clearer.
Dont really know what I was doing yesterday :D

Anyway its working now. Turns out we enable the Analog Comparator Input Capture Enable bit the build target files:

Code: Select all

ACSR |= _BV(ACIC)

If I understand the data sheet this enables noise canceling for Analog Comparator.
And this is nice as long as we doesn't enable the TICIE1 bit in the TIMSK which makes the Analog Comparator trigger the Input Capture.

Had to enable the serial port and actually print out the pulse values I got until I found this, would have been nice to have a oscope sometimes.

This has been a new experience for me, I have never coded microprocessors before except for some arduino stuff. Always fun to learn new things.
Thanks for all the help, I really appreciate it.

Code is here: https://github.com/vizual54/wii-esc
Changed m8_int.h and rct30nf.h

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

Re: Alternative ESC firmware (reflashing)

Post by ziss_dm »

Oops this is left-over of old attempt to use ICP for the zero-crossing detector. Removed from everywhere, to avoid confusion.
Also commited your targets to the main branch. Tnx. ;)

BTW: I think, it still good idea to clear ICF1 flag after changing sensing polarity, so I left it there.

fpvberlin
Posts: 1
Joined: Sun Apr 27, 2014 5:11 pm

Re: Alternative ESC firmware (reflashing)

Post by fpvberlin »

Hi there,

I flashed an rctimer 45A NFS Opto with the corresponding .hex file.
When I connect the ESC it emits a "1-2-3-4-5" ascending beep squence, when I go on full throttle it adds another long "beeeeep" - but then - nothing.
Motor does not run. (iflight-rc 4110)

Can someone help?

Thank you very much!

Goerge

Norbert1992
Posts: 14
Joined: Thu Oct 24, 2013 12:42 am

Re: Alternative ESC firmware (reflashing)

Post by Norbert1992 »

Hello,
did anyone reflashing into fast pwm Redox 20A esc?
I saw info that i can flash it by skywalker 20a hex but i dont know which one :(

Bob1974
Posts: 1
Joined: Tue Sep 16, 2014 3:56 pm

Re: Alternative ESC firmware (reflashing)

Post by Bob1974 »

@ fpvberlin

I had the same problem as you will my rct45nfs (only armed at full throttle). Turns out that the fuses were incorrect and weren't activating the external 16Mhz oscillator (running 8Mhz internal instead). I couldn't fix it with Wii-ESC Flash Tool v 0.7, but I was able to restore the external clock selection fuses with kkmulticopterflashtool, then programmed the wii-esc rct45nfs.hex and the eeprom config using the Wii-Esc Flash Tool.

I'm not sure how the fuses ended up changed in the first place, but I suspect the Wii-Esc tool did it with its 'optimal fuse' settings?

--Bob

User avatar
Rudi48
Posts: 32
Joined: Mon Sep 19, 2011 10:44 am
Location: Wiesbaden, Germany
Contact:

Re: Alternative ESC firmware (reflashing), HK SS18A

Post by Rudi48 »

Hello,
I have not found any infos for reflashing my hobbyking SuperSimple 18A ESC, see picture.

Fortunately I could find some informations elsewhere, so I could reflash the ESC's with simonK software.

So I have put all my information to a web page, in the hope to help somebody:
http://www.rudiswiki.de/wiki9/QuadrocopterESC

Regards, Rudolf
Attachments
how to connect the ISP
how to connect the ISP
reflashing is possible (Atmega8)
reflashing is possible (Atmega8)

rbirdie001
Posts: 178
Joined: Fri Apr 01, 2011 10:32 pm
Location: Czech Republic, Prague

SimonK ESC's give less power than others?

Post by rbirdie001 »

Hi!
while searching found this old thread so trying to reborn it :-)
I bought on ebay G-SUN 30A ESC's with originally loaded SimonK firmware (unknown version) and I'm disappointed because I'm with it getting much less maximal thrust from my motor/propeller (about 70%) compared to other models (more different ESCs). I remember that the same thing happened few years ago when I reflashed some other 10A ESC's to SimonK - I lost a lot of max. power.
Both ESC types don't have crystal nor resonator by CPU so it can be connected also to this feature...
Have anyone experienced this behaviour? Is it normal, can it be changed?
Thanks for any experience!
Roman

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

Re: Alternative ESC firmware (reflashing)

Post by Rob »

This design from 2011 works great with this firmware. I redesigned the PCB and going to make some prototypes.
If there is interest I can publish the design. (after I test the prototypes)

Its a very robust and cheap design on a double sided board.
Al the credits for the good Quality are for ziss_dm !!!!

Image
Image



This was the old design:


Image

Post Reply