HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jul 31, 2008, 11:51 AM
Registered User
UK
Joined Aug 2000
1,082 Posts
It usually takes some effort to get DIY ESC's to work even if you start with code that works on another. Trying to do this on a fried ESC adds another layer of challenge.

If only the one fet is blown then removing it should be fine. Removing the 'same' fet from all phases seems wise to me to keep the on resistances similar which might otherwise affect back emf measurements. I think you would want to get it working with the existing code before trying to run it on other code.
David.
David T is offline Find More Posts by David T
Reply With Quote
Sign up now
to remove ads between posts
Old Jul 31, 2008, 11:56 AM
must build something!
megamatt's Avatar
in front of a computer!
Joined Jan 2008
154 Posts
im sorry,could you please explain that in laymans terms because im really new at the diy eletronics.so,would i be able to remove the fet and the ones next and run a motor on it as is?
megamatt is offline Find More Posts by megamatt
Reply With Quote
Old Aug 06, 2008, 09:55 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
David,

Been browsing this site for years but it's the first time I really need help. I want to thank you for the effort you put into the ff esc project but I am having a couple problems:

The motor does not start by itself. Setting duration, beeps, flashes work but motor only runs if I give it a "push" by hand. Several motors (HC 2g, 5g, 9g purple, 10g, 16g 2211, 19g 1806, 24g "blue wonder", etc) and 4 modified 6a ESCs all do this. Many different props, big and small. Motor gives no sign of wanting to start itself but runs fine if hand started then slows down as expected. Any clue?

Also noted that binary posted does not match that assembed from the source. Similar but many errors on compare of hex files. Both images behave similarly.

I've been at this for may months w/o success. Played with the 25a/18a ESC thread but the 6a is infinitely easier to mod and I really want the free flight feature. Has anyone else got this to work?

Would really appreciate any help. Thanks,

-Rich



Quote:
Originally Posted by David T
I found Bernhard Konze's 'Flea' code one of the simplest to understand. Although my goal was to convert it to a FF timer I put a great deal of effort into commenting his code and it still works as a normal ESC http://www.flyelectric.ukgateway.net/avr_ff_timer.htm

The first few pages of this Microchip paper (AN1160) is quite good at explaining some principles http://www.microchip.com/stellent/id...pnote=en533912

This thread will help you appreciate how hard it was designing these from scratch http://www.rcgroups.com/forums/showthread.php?t=200567

Regards, David.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Aug 06, 2008, 10:47 AM
Registered User
SteveM732's Avatar
United States, OR, Beaverton
Joined Feb 2008
1,976 Posts
Wow, so much disregard for Mike Fortin (the guy who started the thread) by hijackers. What I'm trying to say is that it is poor etiquette to post your question in someone else's thread rather than starting your own. Of course if Mike Fortin and everyone else doesn't care then have at it.
SteveM732 is offline Find More Posts by SteveM732
Reply With Quote
Old Aug 06, 2008, 12:36 PM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
It occured to me that Mike and others might benefit from David's effort because it is by far the easiest path to developing a custom ESC. New threads are fine for different topic but since I am trying, like Mike, to build a "DIY Brushless ESC", this seemed like a good place to post. Sorry if anyone was annoyed.


QUOTE=SteveM732]Wow, so much disregard for Mike Fortin (the guy who started the thread) by hijackers. What I'm trying to say is that it is poor etiquette to post your question in someone else's thread rather than starting your own. Of course if Mike Fortin and everyone else doesn't care then have at it.[/QUOTE]
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Aug 07, 2008, 04:04 PM
Registered User
UK
Joined Aug 2000
1,082 Posts
We have not heard from Mike again on this thread so I will assume our answers pointed him in the right direction. I recommended using an existing design so Rich's inquiries seems a relevant continuation to me.

Rich, the differences between source and hex on the free flight version were probably due to late changes. The source should be the most recent.

I had problems getting it to work initially. I changed so many things I can't remember what the breakthrough was. Advice I will give though is once you get it working keep a copy before making more changes! To that end, I have taken the last four versions that I noted in the file name as 'working'. They are in a zip file on my site. Hopefully these will help you find one that works and then debug from there. I have some older version with fewer mods if these don't work.

I used the LED, beeps and EEPROM for debugging. For instance, add code to switch the LED on before branching to state1 to confirm that the program gets that far. Then keep moving it down the program until you find where the LED does not switch on. Comment out the call to evaluate_stall as it may be preventing the motor from running. I had problems writing to EEPROM sometimes so comment those steps out perhaps. Measure current draw to see if fets are on or off while the motor is not running.

Hopefully my older versions will help. Please let me know if you find any bugs or can improve the code.
David.
David T is offline Find More Posts by David T
Reply With Quote
Old Aug 09, 2008, 11:38 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
David,

Thanks for the older versions. I tried them all with 5v and with battery/motor. No luck:

flea101_dt1a.asm: set duration ok w/5v & battery-motor but motor needs push

site hex file: same although binary is different

flea101_dt1a-working great.asm: 1 flash w/5v & every other switch press but no set duration, nothing at all w/battery-motor

flea101_dt1a-ff working.asm: short&long flash w/5v but no switch function,long flash w/battery-motor but then nothing at all

flea101_dt1a-with ff code diabled.asm: short blink w/5v & battery-motor but no switch function

flea101_dt1a-working.asm: short flash w/5v & battery-motor but no switch function

I tried several fuse setting including dfa4 (original 6a), c1e4 (app,no wdt,8mhz), and 81e4 (wdt). Your program has WDT code but when enabled only get dim glow of LED. What hex bytes did you use for fuse?

I started debugging with LED (poor mans breakpoint) and suspect motor startup code is defective. Could see no resemblance to Bernhards original routines, i.e. he uses MCUCR etc. but no hint of that in yours.

Did you start with the fblmc101.asm file? It's serial only according to him.
Your version does not compile with UART enabled. There are references on RCG to other versions but I am not aware of. What does SBL-Flea mean?

Another fellow on a different site is having same problems. At least I don't feel so bad.

I'm not quite a beginner having created hundreds of embedded designs since
late 70s favoring AVR since it appeared mid 90s. Many of my clients products made it to market. I don't have extremely high IQ though and have difficulty debgging/understanding others code. Have blown a few ESCs. Last "snap-crackle-pop" was July 4th, very appropriate.

I'd really like to write a program that just starts motor (maybe turns it off after few seconds too). The UART/I2C stuff just complicates thing for me at this point. I can add free flight etc. functions from that point.

What motors did you use? Did you try the files you posted? What fuse bytes?

Help!

-Rich




Quote:
Originally Posted by David T
We have not heard from Mike again on this thread so I will assume our answers pointed him in the right direction. I recommended using an existing design so Rich's inquiries seems a relevant continuation to me.

Rich, the differences between source and hex on the free flight version were probably due to late changes. The source should be the most recent.

I had problems getting it to work initially. I changed so many things I can't remember what the breakthrough was. Advice I will give though is once you get it working keep a copy before making more changes! To that end, I have taken the last four versions that I noted in the file name as 'working'. They are in a zip file on my site. Hopefully these will help you find one that works and then debug from there. I have some older version with fewer mods if these don't work.

I used the LED, beeps and EEPROM for debugging. For instance, add code to switch the LED on before branching to state1 to confirm that the program gets that far. Then keep moving it down the program until you find where the LED does not switch on. Comment out the call to evaluate_stall as it may be preventing the motor from running. I had problems writing to EEPROM sometimes so comment those steps out perhaps. Measure current draw to see if fets are on or off while the motor is not running.

Hopefully my older versions will help. Please let me know if you find any bugs or can improve the code.
David.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Aug 09, 2008, 02:03 PM
Registered User
UK
Joined Aug 2000
1,082 Posts
Rich,

Are you using a current-limiting power supply? This can help reduce the risk of damaging ESC's although it can also be a hindrance as motors probably need around 0.5 to 1A to start. I used CDRom and 5g motors. I did my testing at 8.4v/2lipos.

I used Ponyprog and the fuse settings are set in that. Screen print appears at the top of the page on my site (next to the circuit diagram). I did not use UART so have performed no testing/compiling with that enabled.

I started with Bernhard's 'flea101.asm'. I have listed all the changes I made in my source code so you could start from scratch with Bernhard's code and consider whether to apply each of my changes. I attach in this post the oldest version I have where I noted in the file name that it was 'working'; this should have the fewest of my modifications.

I would check that your transmitter is providing an 'rcpuls' duration within the required range (1100-1900ms).
David.
David T is offline Find More Posts by David T
Reply With Quote
Old Aug 09, 2008, 04:46 PM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
David,

Thanks for the reply. Using 5v w/o from USB (500ma) most of the time and a 4a BEC set for 8.4v for final tests with motor. The 6a Turnigy is so cheap it's not a real problem. Blue Wonder is CD and I used 5g HC motor so I guess that's not it. Fuse settings compatible too apparently.

I got fblmc101.asm. Can't find any reference to "flea101.asm" on forums or Bernhards site. Google directs to yours. Any links? Post a copy?

No transmitter. Free flight. And Bernhard says his is UART. It's just that your program does exactly what I need and the Turnigy is soooo easy to mod. I'll keep trying.

Thanks,
-Rich






Quote:
Originally Posted by David T
Rich,

Are you using a current-limiting power supply? This can help reduce the risk of damaging ESC's although it can also be a hindrance as motors probably need around 0.5 to 1A to start. I used CDRom and 5g motors. I did my testing at 8.4v/2lipos.

I used Ponyprog and the fuse settings are set in that. Screen print appears at the top of the page on my site (next to the circuit diagram). I did not use UART so have performed no testing/compiling with that enabled.

I started with Bernhard's 'flea101.asm'. I have listed all the changes I made in my source code so you could start from scratch with Bernhard's code and consider whether to apply each of my changes. I attach in this post the oldest version I have where I noted in the file name that it was 'working'; this should have the fewest of my modifications.

I would check that your transmitter is providing an 'rcpuls' duration within the required range (1100-1900ms).
David.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Aug 09, 2008, 05:44 PM
Registered User
UK
Joined Aug 2000
1,082 Posts
I think it must have been fblmc101.asm. I don't remember changing the name but I must have to simplify it slightly. I have early versions with fblmc101.asm and personal file name extensions so that must be the one I started with. Sorry for misleading you.

I think you could try changing compScanTIMEOUT to 48000 as per the original version; this will allow more time for the motor to turn during startup.

I don't think USB will drive a motor and I don't know what "4a BEC set for 8.4v" really means. Bernhard referred to startup currents of 20A in discussions. I think I set my PSU limiting to 1A in testing without a prop. Although old it is a high quality one that I'd expect to sustain a surge without fading. Is it possible your device cannot drive startup loads? You seem to be very close if it runs with a manual start.
David.
David T is offline Find More Posts by David T
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
FAQ five(5) diy brushless ESC designs Ron van Sommeren DIY Electronics 105 Feb 13, 2014 07:39 AM
Diy brushless esc slowflyer90 DIY Electronics 66 Mar 25, 2006 07:56 AM
Best DIY Brushless ESC Kit? gfcermak DIY Electronics 10 Aug 25, 2004 01:23 AM
group order for diy Speedy-BL brushless ESC family Ron van Sommeren Electric Plane Talk 5 Jul 27, 2003 10:56 AM