DIY Brushless Speed Control - Page 12 - RC Groups
 Jan 29, 2004, 07:07 AM foamforce pilot "Calculating the phase offset won't be much of a pain" hmm, thats the point i got stuck the last time... I dont know wether it was my inability or a real problem... I didnt get it working... Bye Julian
 Jan 29, 2004, 08:45 AM Registered User Hi Julian, When are you going to update bldc site??
 Jan 29, 2004, 09:28 AM Impossible? Hah! Instead of calculating the phase shift based on timing and stuff, it should be easily calculated based on the commutation frequency. If one knows the characteristics of the filter, the phase shift is easily calculated in advance and thus, one can use a rough table lookup with the time between commutation-pulses as parameter to find a pre-calculated delay for when to commutate. This would be very fast too. A even simpler solution is to go to my original idea of using 1 order of magnitude between the max commutation frequency and the PWM frequency. This would allow me to use for example a 2-pole active filter set to allow a max of maby 1 degree phase-shift at 6 kHz (my max comm rate that = 10,000 rpm on a 12 magnet cdrom motor) and a attenuation of nearly -28dB of the PWM signal. The phase shift would be minimal and allow for the simple t/2 commutation for 0-deg lead-in. Waddya think ppl ? I like the last idea best. Less computations to perform.
 Jan 29, 2004, 10:57 AM Impossible? Hah! Lol, Now if I could only get same performance of my filter using a real opamp instead of an ideal one
 Jan 30, 2004, 07:32 AM Impossible? Hah! After investigating the matter, I think a filter with linear and minimal phase response is what I need. Then I can compensate for it in steps to keep phase error below 1°, anyone have ideas ?
 Jan 30, 2004, 07:45 AM Registered User To be honest KreAture, you have lost me somewhere along the way. Cant help think that you are prehaps over-complicating things here? Or is it just me? Would love to hear more feedback from others here too. Those others being people that have got a controller working as well. Are you talking 'timing' as in advance/retard ... or just getting the phasing/feedback right for zero timing ... if that makes any sense?
Jan 30, 2004, 08:47 AM
Registered User
Quote:
 Originally posted by Mr DIY To be honest KreAture, you have lost me somewhere along the way. Cant help think that you are prehaps over-complicating things here? Or is it just me? Would love to hear more feedback from others here too. Those others being people that have got a controller working as well. Are you talking 'timing' as in advance/retard ... or just getting the phasing/feedback right for zero timing ... if that makes any sense?
KreAture is searching for a solution to get a clean bemf signal, and about to build a hw to do it. The opamp active filter most probably do the job - the question is that all this hw is really necessary.

It is question of preference. I personally prefer simplest hw possible and do the job in sw. I prefer to omit even the hw comparator, using a/d instead. The sampling is in synch with the pwm, additional filtering in sw if necessary.
Jan 30, 2004, 09:26 AM
Registered User
I have not noticed this thread.

Here is the sensing signal wave form of my simple latest schematic comparator input which can handle full power and easy starts.

I have a problem by ringing on the sensing signal for power duty control.

I used no-modified CD-ROM motor for making program. But, the modified powerfull CD-ROM motor does not make ringing?!

I made some filter circuits and software to erase this ringing. Still can not find the final answer.
May be, I will write timing adjust program after my cold sick will go away from my body.

Anyway, the software can have a rest time after finding 1/2 Vcc point. That is why I use slow clock.

### Images

Last edited by Takao Shimizu; Jan 30, 2004 at 07:58 PM.
 Jan 30, 2004, 10:00 AM Impossible? Hah! mmormota Yes, I am trying to filter the commutation signal to such a degree that the possible error caused by PWM noise will be limited to maby a degree or less error. The system will use a HW timer to handle the sensoring and another HW timer to handle the actual delay neded before commutating. First timer will be used to measure time between up/down flanks (each change would equal a commutation) and then if I caon't get rid of the phase error (wich it seems I can't) I'll simply use a phase-correction table to make sure I know where the commutation actually need to occur. Then calculate the delay needed and update the delay-timer. The rest of the system will be interrupt driven as well, making for little work to be done outside the interrupt-system. Your AD solution is a good one as well, but the problem is closer to 100% power, as the non-pwm part would be so small. I can do a 10 bit AD conversion in 40 cycles or so, running at 8 MHz/2MIPS. This would mean 50,000 samples pr second, or a sample time of 20us. If the pwm-rate is too low, it would be ineffichient compared to the commutation rate. But if it's too high, I would not have time to do a sample during the off cycle to get readings where they are needed, that is close to the half-way point. I have though about a simpler solution than the filter. I could simply generate a inverted PWM signal to add to the EMF. This would cancel out all the PWM noise and only leave the EMF signal and the motor switching noise. This noise will be very high frequency and should be easily removed with a very high fc, low-pass-filter. The high fc on filter would not do much to the phase of the low freqency EMF signal. Something as simple as a passive R/C network could then be used. I really like the idea of being able to sense the emf for each commutation. It would allow for very fast response to load changes.
Jan 30, 2004, 07:49 PM
Registered User
This schematic is under construction.

### Images

Jan 30, 2004, 07:53 PM
Registered User
This software is under construction.
Just testing full power and start only, no power control by Rx interface.