HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 28, 2007, 07:43 PM
Registered User
Bay Area, CA
Joined May 2000
108 Posts
On an interesting note, I purchased the TP25A at the beginning of Dec. thinking that I'll get the newer Type II but received the older Type I ESC instead...despites having the red "W" sticker on the package. Is this diode OK to use this zener diode on the Sercon board http://www.fairchildsemi.com/ds/1N/1N4733A.pdf (1N4733A)? Good luck with the stand alone ISP circuit Richard, I'll wait for your result.

-Tony
bt408 is online now Find More Posts by bt408
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 29, 2007, 09:44 AM
Registered User
brashley's Avatar
Joined Dec 2006
517 Posts
No Luck

Still no luck. I included a picture of the home made ISP circuit (I know its not pretty but it was quick to do). The circuit appears to be working as indended (and the same as the SerCom) The Zeners clamp the RS232 (MOSI, SCK) down to 5V and the Reset line gets pulled to ground when the jumper is in and the RS232 reset is activated. Still no luck programming either device though (ESC or FltCtr). I have tried on two different computers (both Dell laptops) One of them is about 6 years old and the other is about 1.5 year old. Both have exactly the same wave forms out of the RS232

The noise I am seeing on the MISO line is present on the RS232 cable without the SerCom as well (but only when there is SCK/MOSI activity). Both computers had this as well.

Strangely, Ponyprog’s signalls do not look like AVRdude’s. Ponyprog SCK clock timing is not very consistent and you can see on the scope that the square waves don’t all line up for each pass on the scope. I don’t know if this is normal (I did run the calibration in Ponyprog before I did anything). If this is not normal then perhaps I messed up my FltCtr when I requested a read using Ponyprog and the jumper in. I am grasping for straws here.

Still no help from the international section in the MikroKopter forum. Last night I even posted a request for help in German in the FltCtr forum. Not much happening there either.

Richard

(The scope scale is Y - 2V per division, X – 20 micro seconds/division)
brashley is offline Find More Posts by brashley
Reply With Quote
Old Dec 29, 2007, 02:48 PM
Registered User
belgium
Joined Jul 2007
13 Posts
hi,
had the same problem a few months ago ....
first - your board is connected to power supply ?
and the 5V is present at the uP ?

in my case - the fuse bits where set wrong ... and on the MK wiki is some section to communicate again with the processor.
use ponyprog and the serprog but an external xtal connected to the uP ( temporary) 4 or 8 Mhz
use a resonator ( 3 wire) then you d'ont need de caps.
then you can (re)communicate with the processor and reset the fusebits as recommanded - remove again the xtal and restart playing .... for shure next year it wil fly !!!!!!
rgds
harry
tiger_bel is offline Find More Posts by tiger_bel
Reply With Quote
Old Dec 30, 2007, 05:23 AM
Registered User
Bay Area, CA
Joined May 2000
108 Posts
Success

Finally, I got it to write successfully. At first I noticed the led on the sercon board blinks a few times every 10 second interval, it wasn't supposed to do that since the led is tied straight to +5v from the BEC. I could see the pattern on the scope too but only on the sercon side...it remains solid +5v on the other side of the ISP1 programming cable . I took the cable apart to make sure it's not an intermittent problem and after I put it back...I got a successful read/write . I can't explain the problem, the interval was too consistent to be a wiring problem. good luck Richard
bt408 is online now Find More Posts by bt408
Reply With Quote
Old Dec 30, 2007, 06:04 AM
Registered User
quax's Avatar
NRW, Germany
Joined Apr 2004
708 Posts
@bbt408

your BL-ESC

seems to be the same design as my first 17a-TowerPro ESC.

The 17a files should work with it.

cul
quax
quax is offline Find More Posts by quax
Reply With Quote
Old Dec 31, 2007, 02:55 PM
Registered User
brashley's Avatar
Joined Dec 2006
517 Posts
Tiger_bel:
Thanks for the hint. Re-checked all, still nothing. Then I hooked up the clock from MAX232 on SerCom to C2 on the FltCtr. I started to then get data back out on MISO although PonyProg still reported that the device was not present (using SerCom). Hooked it up to my Serial-to-ISP circuit and Read the Fuse bits, it worked .. They were all wrong. Security bits set. I reset then to the recommended values (from Mikrokopter forum) and hit write. No problems. Then read them back again – they were messed up again (had never changed) . Tried two more times to write with no luck in terms of it sticking. Tried to read the device and got garbage back but then that was it. MSIO is now back to nothing and I cant get it to come to life. I ripped the ATmega off the board and ordered a new one along with a Dragon AVR so I can use a USB and AVR Studio to program it over USB. I still have no idea what happened. I am sure the same thing happened to my TowerPro ATmega8 when I tried to read it. No answers just more questions.

(I even made extra sets of cables, checked them all many times, ????? dont know what I did wrong)

Richard
brashley is offline Find More Posts by brashley
Last edited by brashley; Jan 01, 2008 at 09:26 AM.
Reply With Quote
Old Jan 01, 2008, 10:46 AM
Registered User
brashley's Avatar
Joined Dec 2006
517 Posts
Quick question, looking at AVR Studio I can load a program into FLASH memory or EEPROM memory. When I convert the TowerPro I take it I load it into FASH memory. Is that correct?

Thanks,
Richard
brashley is offline Find More Posts by brashley
Reply With Quote
Old Jan 01, 2008, 10:57 AM
I don't want to "Switch Now"
pmackenzie's Avatar
Toronto (Don Mills), Canada
Joined Dec 2002
15,904 Posts
Flash.
EEprom is small, and normally used to store configuration data.
(Stuff like Forward/reverse, Brake on/off, etc)

Pat MacKenzie
pmackenzie is online now Find More Posts by pmackenzie
Reply With Quote
Old Jan 03, 2008, 01:11 AM
Registered User
Bay Area, CA
Joined May 2000
108 Posts
Thank you Quax, I tried to load the file for 17A using my laptop's docking station and Ponyprog and it failed every single time (it did write ok but I read back garbage data). Tried it again using a desktop and it worked fine....1 is done and 3 more to go

-Tony
bt408 is online now Find More Posts by bt408
Reply With Quote
Old Jan 03, 2008, 11:29 PM
Registered User
brashley's Avatar
Joined Dec 2006
517 Posts
My FltCtr is up and working again . I replaced the ATMega chip and used an AVRDragon with AVR Studio over USB to program it (same cables, except no RS232). My desktop does not have an RS232 so before I was using my laptops to try and program with the SerCom (using PonyProg). I am now wondering if that was my problem all along. One note, I did have to slow down the IPS speed in AVR Studio to get it to work though.

I managed to communicate with the ATMega8 on the TowerPro ESC as well (yes, all my cabling was ok on that also). The fuses were programmed all funny though so I went to change them (per the jpg in the update directory). Unfortunately I think I messed that up. For example, the PonyProg jpg dialog box had SUT1 checked and SUT0, CKSEL3-CKSEL0 unchecked. I took that to mean SUT of 10 and CKSEL as 0000. I think I have that backwards though (after reading more ATMEL documentation). It should have been SUT 01 and CKSEL 1111. Lost communication with the ATMega after that.

Oddly enough, as I was hooking up an external clock to pin 7 (XT1 on the ATmega) I lost the AVRDragon (this was totally independent). The Dragon stopped communicating on the USB (no device registration/communication) I tried on three different computers. This just hasn’t been my week .

Any suggestions on being able to communicate with the ATMega8? Is hooking up an external clock going to help given the fuse settings I selected? Any help with the conversion from PonyProg to AVR Studio fuse settings would be appreciated as well.

Thanks,
Richard

(my new motto, one step forward, two steps back…..)
brashley is offline Find More Posts by brashley
Last edited by brashley; Jan 04, 2008 at 09:14 PM.
Reply With Quote
Old Jan 04, 2008, 09:04 PM
Registered User
brashley's Avatar
Joined Dec 2006
517 Posts
Sending AVRDragon back (still can’t get it to work on USB). Got an AVRISP mkII (USB) programmer today. Hooked up the clock from the SerCom MAX232 (pin3) to XT1 on the ATmega8 on the ESC and every thing started working. Changed fuse bits back to what I showed above. Removed the SerCom clock from the ATMega8 (every thing was still working) and programmed in the new HEX file from quax. Programming worked great. (although the ISP speed that was set by default in the AVRISP mkII was too slow at first ~1kHz). Hooked it all up to the FltCtr and to MK-Tool and voila, got a motor to turn over I2C. 3 more ESCs to go.

I think my original problem was with PonyProg over the RS232 on the Laptops. I would imagine it was some sort of timing issue coupled with me trying to force a read of the flash all of which resulted in fuse bits being randomly programmed. For $35 the AVRISP mkII over USB is not a bad choice for a programmer and in this case solved my problems.

Richard
brashley is offline Find More Posts by brashley
Reply With Quote
Old Jan 05, 2008, 04:00 PM
Registered User
Bay Area, CA
Joined May 2000
108 Posts
hi Richard,
One of my ESCs is having the same problem of not having communication to ponyprog and I think it has something to do with screwed up fuse bits. I tried to hook up Pin3 from Sercom to pin7 on the ATmega8 while trying to program using Sercom without success. Do I need to use a separate programmer in order for this to work?

Tony
bt408 is online now Find More Posts by bt408
Reply With Quote
Old Jan 05, 2008, 07:55 PM
Registered User
brashley's Avatar
Joined Dec 2006
517 Posts
Tony, I don’t think you need a separate programmer. For example, I was at one point able to read the fuse bits from my FltCtr with this method with SerCom using PonyProg (before I did a flash read and messed up things even more). Depending what fuse bits are set you could be locked out for good using ISP (security bits for example). I switched to a real ISP programmer (from ATMEL) because I finally figured PonyProgs interaction with my Laptop’s RS232 port was probably causing the problem (I don’t know if it was the speed, ATMEL recommends that the ISP speeds needs to be less than ¼ CPU clock and more than 2kHz, or just the RS232 port/timing on my laptop). In my digging I was not the only one experiencing difficulties with PonyProg and RS232 ISP programming. In any event the AVRISP mkII is fairly cheep and uses an ATMEL controller with software to control the programming. If you are convinced that nothing else is wrong and that the ATMega8 is no longer accessible because potentially the fuse bits being set wrong and you tried the and external clock, then you may be left with replacing the ATMega8. They should be cheap.

Some other thoughts From ATMEL AVRISP mkII doc:
1) “Once a ‘Lock mode’ protection level is enabled it is not possible to lower the protection level by selecting a ‘lower’ degree of protection be setting a different ‘Lock mode’. The only way of removing a programmed lock bit is to perform a chip erase, erasing both program and data memories”.
2) "for target clock less than 12MHz, the ISP frequency must be equal or less than ¼ of the target clock. For target clock above 12MHz, the ISP frequency must be equal or less than 1/6 of the target clock”.
3) “Be aware that for parts with CKDIV (clock divide) fuse and/or CLKPR (clock prescaler register), the ISP frequency must be calculated out from the divided target clock”
4) “if having problems with connecting to target, try to lower the ISP frequency”
5) "Chip erase will work down to 51Hz. Erase the AVR if it runs to slow to be programmed because of the value of CLKPR"

Richard
brashley is offline Find More Posts by brashley
Last edited by brashley; Jan 05, 2008 at 08:01 PM.
Reply With Quote
Old Jan 06, 2008, 08:41 PM
Registered User
Bay Area, CA
Joined May 2000
108 Posts
Thanks Richard,
So the good news is I got the 4th ESC to program OK but it's not working correctly. When I ran the motor test in MK tool, all it did was stutter the motor at all speed...it's almost like a phase wasn't connected. I checked and found no short anywhere, I think I might've burned out a FET or 2. Looks like I'm going to have to order a few more next week to finish the conversion.
bt408 is online now Find More Posts by bt408
Reply With Quote
Old Jan 07, 2008, 04:20 AM
Registered User
quax's Avatar
NRW, Germany
Joined Apr 2004
708 Posts
Quote:
Originally Posted by bt408
....
When I ran the motor test in MK tool, all it did was stutter the motor at all speed...it's almost like a phase wasn't connected.
....
Hi Tony,

did you make the I2C changes on the board? One cut and one new conection has to be done to free on I2C port.

Can you make some detailed images and give me the links or send them to me? Before buying new ones, some old ones should run, I think.


cul
quax
quax is offline Find More Posts by quax
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
2 Electro Fusion Motors & CC esc's from Coronas for sale mthomson Aircraft - Electric - Airplanes (FS/W) 7 Mar 18, 2004 06:13 AM
FS- FMA M5 dual conv Rx and 2 esc's- all NIB Etonic Aircraft - Electric - Airplanes (FS/W) 3 Nov 17, 2003 01:27 PM
How do I hook 2 esc's into 1 receiver ? Al P Power Systems 2 Aug 30, 2002 05:38 PM
EBAY Brushless Motor & 2 ESC's S Anastasio Aircraft - Electric - Airplanes (FS/W) 0 Aug 12, 2002 06:41 AM
WTB: 2 Hitec Feather Recievers and 2 ESC's Ryan Nau Aircraft - Electric - Airplanes (FS/W) 6 Jul 03, 2002 07:13 PM