HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jan 27, 2004, 09:59 AM
Registered User
mmormota's Avatar
Budapest
Joined Jul 2003
2,579 Posts
Quote:
Originally posted by KreAture
Yes, interrupt on rising edge or falling edge is what I had in mind... Most of the PICs time would be spent decoding PPM and generating PWM at high frequency. (like 30kHz for better 0-crossing detection)
Not so simple. The comparator will switch a lot because of the PWM-like drive. You have to open a narow time window for the comparator (when the appropriate FETs are open) to get useful input.

The PWM output of the chip is something you can't use at all. You have to do it manually from software, because
- you have to keep synch with the rotor phase
- the 6 FETs have to be driven PWM like, and the driver pins are normal port pins, no internal hw to mix them with the PWM register

If the uC is not extremely fast, like a DSP, I think the only way to write an ugly assembly sw loop with delay loops, pollings, and so on. Counting the processor cycles and using dirty assembly tricks everywhere. The processing of the receiver pulses could be interrupt driven.
mmormota is offline Find More Posts by mmormota
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 27, 2004, 10:00 AM
homo ludens modellisticus
Ron van Sommeren's Avatar
The Netherlands, GE, Nijmegen
Joined Feb 2001
10,937 Posts
Quote:
Originally posted by KreAture
Ron van Sommeren
Then how do you get 6 on a 12 pole ? Ah, because you divide by 2 for n/S pair ?...
One N/S pair represents one complete commutation cycle.
Ron van Sommeren is offline Find More Posts by Ron van Sommeren
Reply With Quote
Old Jan 27, 2004, 10:39 AM
Impossible? Hah!
KreAture's Avatar
Oslo Fornebu, Norway
Joined Jun 2003
3,074 Posts
mmormota
There is a way to mix the pwm with the output data. It's actually quite simple. All that is needed is changing the port data to off or back on according to PWM. But this would require a lot of MHz... Better way is to use external gating of the 6 signals. This will allow for 7 bit pwm as fast as 62 kHz running at 8 MHz internal clock... It would add an extra IC or two though...
KreAture is offline Find More Posts by KreAture
Reply With Quote
Old Jan 27, 2004, 12:21 PM
foamforce pilot
dicker's Avatar
Deutschland, Schleswig-Holstein, Braak
Joined Jan 2004
158 Posts
Hello

Im one of the two guys behind bldc.de

First of all I must excuse that I have few time at the moment. So our Project got Stuck a bit.
But we are much further than listed on the Page. The Redesign (Cyclone 6N) is running perfectly fine, driving my Little Torcman 280-5 at 14Amps quite Cool (for an 10A Fet :-))

A new design Im actually working on is back on the N/P driven by Transistors scheme. This is mainly for making it cheap.

The PWM technologie we are using is simple and cool (ofcourse
We are driving the Input Pins of our IR2102s with an 1K resistor as pre resistor. If the PWM Output (of the Hardware onboard PWM Generator) gos to Zero Level, the input Pins of the 2102s are taken down over 3 diodes, one to every Input Pin for the High Level Fets (HLF)

So the PWM is only cutting the HLF, which is afaik the same way as everyone does.

So, if thats not clear, I can make some Schematics from this.

so long,
Julian Wingert
dicker is offline Find More Posts by dicker
Reply With Quote
Old Jan 27, 2004, 12:26 PM
Registered User
mmormota's Avatar
Budapest
Joined Jul 2003
2,579 Posts
Quote:
Originally posted by KreAture
mmormota
Better way is to use external gating of the 6 signals. This will allow for 7 bit pwm as fast as 62 kHz running at 8 MHz internal clock... It would add an extra IC or two though...
Yes, but the pwm then independent to the rotor phase, and the comparator affected by the pwm too - this way you need even more hw.
Better to keep the hw as simple as possible, and emulate the "pwm" in sw. My Jeti controller (and probably all of the commercial controller in the r/c world) do this way. On the oscillogram clearly visible, that the "pwm" is locked to the rotor phase, and there is allways a narrow window in the middle for the zero crossing check.
mmormota is offline Find More Posts by mmormota
Reply With Quote
Old Jan 27, 2004, 12:29 PM
foamforce pilot
dicker's Avatar
Deutschland, Schleswig-Holstein, Braak
Joined Jan 2004
158 Posts
doublepost
dicker is offline Find More Posts by dicker
Reply With Quote
Old Jan 27, 2004, 12:29 PM
foamforce pilot
dicker's Avatar
Deutschland, Schleswig-Holstein, Braak
Joined Jan 2004
158 Posts
Quote:
Originally posted by mmormota
On the oscillogram clearly visible, that the "pwm" is locked to the rotor phase, and there is allways a narrow window in the middle for the zero crossing check. [/B]
The locking to the motor phase is done by the masked output of the controlling port at the mc.
So there will be noc switching on in unwanted moments.

by, julian
dicker is offline Find More Posts by dicker
Reply With Quote
Old Jan 27, 2004, 12:31 PM
Registered User
mmormota's Avatar
Budapest
Joined Jul 2003
2,579 Posts
Quote:
Originally posted by dicker
Hello

Im one of the two guys behind bldc.de

First of all I must excuse that I have few time at the moment. So our Project got Stuck a bit.
But we are much further than listed on the Page. The Redesign (Cyclone 6N) is running perfectly fine, driving my Little Torcman 280-5 at 14Amps quite Cool (for an 10A Fet :-))

Hi Julian,

Is your design free?
Is it possible to try out your code?
I can't speak German and my effort to registrate on your website was unsuccesful.
mmormota is offline Find More Posts by mmormota
Reply With Quote
Old Jan 27, 2004, 02:17 PM
foamforce pilot
dicker's Avatar
Deutschland, Schleswig-Holstein, Braak
Joined Jan 2004
158 Posts
I dont think it would help you much if I gave you the source and schematics. Without comments and documentation its nearly useless...

I'm working on publishing the 6N Cyclone completely on our website, please give me some time to complete (erh write, I mean) the documentation. The german collection office has written me some ugly letters , so I'll have to do some hard stuff first...

by then, Julian

*damn english leaks... grammar isn't my favour*
dicker is offline Find More Posts by dicker
Reply With Quote
Old Jan 27, 2004, 03:05 PM
Impossible? Hah!
KreAture's Avatar
Oslo Fornebu, Norway
Joined Jun 2003
3,074 Posts
dicker
Thankyou for noting how you have done the gating. Yes ofcource (me has a revelation), no need for more advanced gating. As long as the current supplied is high enough to give quick switching, the diode solution is very good, and only cutting one side is also suffichient.

I didn't have time to tell that the pwm switching would not interfere before you did so. Just detecting the 0-crossing should be fine in any regard. From what I can see on the scope (of my MGM 18 amp running my MiniAC) there should not even be any issues with combining all 3 phases into 1 commutation signal. (1 side will be High, the other low, and the center will determine when we commutate. High and low should cancel eachother out since the FET's will have a marginal voltage drop.)
KreAture is offline Find More Posts by KreAture
Reply With Quote
Old Jan 27, 2004, 03:25 PM
Impossible? Hah!
KreAture's Avatar
Oslo Fornebu, Norway
Joined Jun 2003
3,074 Posts
Oh, but there is another way of doing the PWM too, it can be synched with the commutation, and the pulse can be held a percentage of the length from the previous commutation.
Kinda only using n% of the 100% available for each commutations timeframe.

This may not be as effichient as using a seperate high-frequency PWM, or it may be better. I really don't know.
KreAture is offline Find More Posts by KreAture
Reply With Quote
Old Jan 27, 2004, 03:48 PM
Impossible? Hah!
KreAture's Avatar
Oslo Fornebu, Norway
Joined Jun 2003
3,074 Posts
I have been sitting here looking at the waveforms produced by my MiniAC and the MGM controller for maby 30 minutes now.
The MGM is using a higher frequency PWM running the whole time, but I am having a hard time seeing it's 0-crossings. It appears it is using a lead-in causing commutation at about 5% over the crossing. This is probably dependant on load as I think it is self adjusting.
KreAture is offline Find More Posts by KreAture
Reply With Quote
Old Jan 27, 2004, 04:00 PM
Impossible? Hah!
KreAture's Avatar
Oslo Fornebu, Norway
Joined Jun 2003
3,074 Posts
Ahh! Finally I got it! The MGM only uses PWM on the N-channel FET's (lower side) thus increasing the 0-potential and moving the 0-crossing upwards. Now it made sence. I was running at a little less than 50% and thus the lower edge of the signal never wendt below the half-way line between + and - but if I think of the upper and lower part of the signal as + and -, then the commutation is right on the dot for the 1/2 point.
KreAture is offline Find More Posts by KreAture
Reply With Quote
Old Jan 27, 2004, 05:03 PM
foamforce pilot
dicker's Avatar
Deutschland, Schleswig-Holstein, Braak
Joined Jan 2004
158 Posts
ah, theres one thing left to say...

theres NO Zero Crossing detection...

The Back EMF sensing is based on the inducted sine waves by the motor itself. They are PWM cleand by the low passes (some 100nF caps normally parallel with 1k damping resistors)and what is left is the small sine wave the motor is inducting...

This signal differs from motor to motor a bit, but is reliable enough.
It is phase shifted by the filter (in our case about 25-30 degree). What we are detecting is the point where two of the motors phases are changing theyr relativ polarity.. Uhh how can I describe that....

for example in steps (Phases are called A, B and C):

Before switching position set:

A: 1,5V
B'C: 1,6V

switching point:

A: 1,55V
B'C: 1,55V

after switching:

A: 1,6V
B'C: 1,5V


For phase A's signal C and B are taken as relative compare signals on an OP used as differential amplifier. For B's are A and C and for C'S are B and A used.

I hope I dont writing **** now, its late and I'm tired...

whatever, did I annihilate any clarities? :-)

good night, Julian
dicker is offline Find More Posts by dicker
Last edited by dicker; Jan 27, 2004 at 05:12 PM.
Reply With Quote
Old Jan 27, 2004, 05:37 PM
Impossible? Hah!
KreAture's Avatar
Oslo Fornebu, Norway
Joined Jun 2003
3,074 Posts
Hmm, whoopsy!

Yes dicker, and no you didn't mess it up

I have been sitting here fiddling with the waves ever since my last post and it hit me the 0-crossing as I call it (wich is the 1/2 V crossing of the EMF) is happening 30 deg out of phase with my actual commutation if I am in perfect lock with the motor.

Imagine the phases A, B and C and E = (A+B+C)/3:
Code:
A \__/\__/\__/\__/\__/\
B _/\__/\__/\__/\__/\__/
C \__/\__/\__/\__/\__/\__
E \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
(where / and \ is where the phases are undriven and _ and are the driven stages. Each symbol is 60 deg of the rotation.)

The result is the EMF (and possible noise) on the E channel.
If I measure the delay between each change (assuming amplification to TTL levels) of the E signal and commutate after half that time, I will be in synch with the motor. (Using only 1 phase might be easier ?)

A lowpass filtering of the signal would, as you mention, phase-shift the signal, but if this is done correctly, can't I then use the edge as a trigger for when I should commutate ? (30 deg shift is nice.) The triggering on the rising and falling edge would have to be

I have seen a brushless controller with such a sensor method. It seemed to work.

There is another alternative too, waiting for the EMF to reach very close to it's "destination" and commutate with that as a trigger. The whole point of the motor-control is, after all, to wait for the emf to do it's job and then go to the next stage once it has reached a point close enough.
KreAture is offline Find More Posts by KreAture
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Brushless speed control problem TomL Sport Planes 8 Jun 08, 2003 02:23 AM
TMM-18-3ph Brushless Speed Control nelsonjo1 Power Systems 5 Apr 04, 2003 01:33 AM
FS: Model Motors 40 amp Brushless Speed Control. Jim McPherson Aircraft - Electric - Airplanes (FS/W) 3 Dec 10, 2002 06:02 PM
Dragon 35 brushless speed control Steve H. Aircraft - Electric - Airplanes (FS/W) 0 Aug 17, 2002 01:29 AM
Hooking up a Jeti Brushless Speed Control to a Jeti Pashor 15/4 motor. HELP!!! Rob R Power Systems 3 Jan 10, 2002 07:37 PM