Thread Tools
Old May 30, 2012, 01:18 PM
mansour.ohms is offline
Find More Posts by mansour.ohms
mansour.ohms's Avatar
The Netherlands, OV, Hengelo
Joined Mar 2011
17 Posts
I forgot to show the pictures the modifications to the turnigy esc
mansour.ohms is offline Find More Posts by mansour.ohms
Reply With Quote
Sign up now
to remove ads between posts
Old May 30, 2012, 01:57 PM
simonk is online now
Find More Posts by simonk
hacker
Canada, BC, North Vancouver
Joined Dec 2010
972 Posts
Quote:
Originally Posted by mansour.ohms View Post
Hi Guys I am playing arround with Simon's firmware and the turnigy plush 18A esc. I want to see the difference between 8MHz and 16MHz so i added a 16MHz crystal oscilator. The problem is i cant get the oscilator to run. I have measured with a scope the oscilator signals are stuck low. I am using the standard tgy.asm with the tgy.inc as the include file.

Has any one attemted this before? If so what are the correct fuse settings?

Thx
Ohms
Others have attempted this, and it works. The usual fuses will not start the oscillator. Once you set the fuses, you cannot even program it (or change the fuses back) via ISP unless the oscillator is working, so it's a bit of a dodgy step, but it should work.

Go to http://www.engbedded.com/fusecalc and enter in the current fuse values, then set CKOPT and Crystal/Resonator High Freq from the drop-down. (Any of them will work -- I usually select the bottom one / longest boot wait.)

BTW: My code sets OSCCAL to 0xff which makes it run at almost 16MHz anyway. I noticed it kind of doesn't work so well anymore at 8MHz since the zc filtering was added.
simonk is online now Find More Posts by simonk
Reply With Quote
Old May 30, 2012, 03:10 PM
mansour.ohms is offline
Find More Posts by mansour.ohms
mansour.ohms's Avatar
The Netherlands, OV, Hengelo
Joined Mar 2011
17 Posts
Hi Simonk,

Thanks for the tip i will give it a try.

Ohms
mansour.ohms is offline Find More Posts by mansour.ohms
Reply With Quote
Old May 30, 2012, 08:24 PM
timecop is offline
Find More Posts by timecop
Suspended Account
Joined Dec 2010
11,763 Posts
You need to change the fuse from intrc to ext resonator, 8mhz+. Not sure what bit that is specifically but plenty of avr fuse calculators on the internet. it won't automatically switch to external crystal like most other modern MCUs..
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old May 31, 2012, 01:20 AM
mansour.ohms is offline
Find More Posts by mansour.ohms
mansour.ohms's Avatar
The Netherlands, OV, Hengelo
Joined Mar 2011
17 Posts
Simon and TC Thanks for the tips it is working now.

Simon your remark about zero crossing triggerd a thaught. How sensitive is the zero crossing to offset drift? I assume offset drift changes with the temperature variations of the mosfets? Do you use the zero crossing for frequency measurement or is it needed for somthing else?

Thx
Ohms
mansour.ohms is offline Find More Posts by mansour.ohms
Reply With Quote
Old Jun 01, 2012, 02:23 PM
simonk is online now
Find More Posts by simonk
hacker
Canada, BC, North Vancouver
Joined Dec 2010
972 Posts
Quote:
Originally Posted by mansour.ohms View Post
Simon and TC Thanks for the tips it is working now.

Simon your remark about zero crossing triggerd a thaught. How sensitive is the zero crossing to offset drift? I assume offset drift changes with the temperature variations of the mosfets? Do you use the zero crossing for frequency measurement or is it needed for somthing else?

Thx
Ohms
You mean oscillator drift? It doesn't matter that much, I don't think. The not working as well at 8MHz just comes from the filtering being timed by the number of cycles it takes, not by any sort of timer. Zero crossing sensing is used to track the motor timing. As it spins, and the two other phases are held high and low by active FETs, the undriven phase voltage passes across "zero", ie, the neutral or average voltage of the motor phases. This is how we know where the motor is. We then apply the commutation timing wait, and then advance the FET commutation step.

The difficult part is that we're PWMing the high FET on and off unless at full throttle, so this introduces some noise. Since we're only working with a comparator and not an ADC, all we can do is try our best to filter the comparator's input. This loop changes speed with the oscillator speed, but it's not critically important unless it aliases badly with the PWM speed. The PWM speed at 18KHz PWM is 888 cycles at 16MHz, though, so there are quite a few opportunities to process the comparator input.
simonk is online now Find More Posts by simonk
Reply With Quote
Old Feb 12, 2014, 04:01 PM
gvi70000 is offline
Find More Posts by gvi70000
Registered User
Joined Feb 2014
1 Posts
Question

I have 4x RCTimer 20A that i want to flash with SimonK firmware but i also want to add external quartz for them. In the documentation that i have found so far i can't find where to set the frequency of ATMega8 to 16Mhz. Can any one tell me or point me to where i can find this?
gvi70000 is offline Find More Posts by gvi70000
Reply With Quote
Old Apr 15, 2015, 09:18 AM
i777 is offline
Find More Posts by i777
Registered User
Joined Apr 2015
2 Posts
I have got a problem with my TP25A (HH30A_V1.1) after flashing tgy software (tp_nfet.hex). When I connect battery pack to ESC it emits 3 + 1 beeps and I hope that`s ok. Calibration is also working. I feed the ESC with PWM signal form Arduino with standard 50 Hz frequency. When I increase PWM motor instead of spinning is shaking. Lockbits are set to stock lfuse0x24 and hfuse - 0xda. I have tried disabling bootloader by setting BOOT_LOADER to 0 but the effect is the same. I presume the problem is related with timing. Can anyone help me ?
i777 is offline Find More Posts by i777
Reply With Quote
Old Apr 16, 2015, 09:42 AM
i777 is offline
Find More Posts by i777
Registered User
Joined Apr 2015
2 Posts
Problem solved. I uploaded the same software to other ESC and it works, so the problem was hardware related. I checked and compared all of the electronic parts of the second ESC with non-working first one. All were the good. When I was soldering wires to ISP pins is used flux. Flux is conductive. I washed whole board with detergent under water. Now it works perfectly.
i777 is offline Find More Posts by i777
Reply With Quote
Old May 18, 2016, 07:35 PM
vangalvin is offline
Find More Posts by vangalvin
Boris van Galvin
Joined May 2016
3 Posts
Converted an unknown ESC

I managed to convert a 30A ReadyToFly ESC running SimonK to I2C using this process, the goal is to use an arduino to controll it and sense if the motor is running or not.

However ruining a test using Minpirate to send commands all i am getting is the motor vibrating backward and forward for a short period.

It picks up the ESC when I do a scan
SEARCHING I2C DEVICES...
========================
I2C devices found:
0: 0x29 - 0b00101001

Any suggestions as to what could be causing this?
vangalvin is offline Find More Posts by vangalvin
Reply With Quote
Old May 19, 2016, 05:16 AM
SwiftingSpeed is offline
Find More Posts by SwiftingSpeed
Registered User
Sweden
Joined Oct 2010
108 Posts
You need to send the command repeatedly, about every 100ms or the ESC will stop the motor. You also have to send 0 command (also repeatedly) for a while when you start to arm the ESC.

No control registers are used as in standard I2C devices, only address and command byte.
SwiftingSpeed is offline Find More Posts by SwiftingSpeed
Reply With Quote


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