View Full Version : Help! Sinusoidal BLDC ESC
james_will
Jul 30, 2007, 07:59 AM
Hi guys,
I'm trying to build a sinusoidal controller for a brushless motor based on the application note AVR447 from Atmel. The motor is also built by me and has 18 teeth, 24 poles. I use hall sensors 120 deg. apart to sense the rotor position.
Well... everything works pretty good, i mean the motor runs ok and the amp draw is a little lower than with a regular, commercial ESC for the same throttle setting. The noise generated from the motor is much lower than with the regular ESC and it seems to me that it runs a lot smoother.
However, the problem i have now is that i use PWM settings from 0 to 255. The motor runs ok up to 190 (74%) throttle and then if i try to go higher from 74.5% to 100 % the motor maintains the same speed. I'm using the controller in open loop without any kind of speed controll. I just set the amplitude and that's it. I've tried everything but whatever i do if i set the amplitude between 190 and 255 the speed remains the same.
What could cause such behaviour ?
The MCU is an ATMega88 running at 8MHz. The code can be downloaded from the Atmel website.
If anyone can help i will be forever grateful...
Thanks,
James
JimDrew
Jul 30, 2007, 11:43 AM
At 8Mhz and 24 poles, you may not have enough CPU horsepower to handle the BEMF at higher speeds.
james_will
Jul 30, 2007, 12:05 PM
I've tried it with a 16MHz external osc. No difference...
AndyKunz
Jul 30, 2007, 12:08 PM
Your findings are correct - one day the RC market will catch up and go sinusoidal drive.
A little more info here would be helpful. Do you have motor constants?
Is the PWM value you refer to the max value you send it according to a sine scale? Can you provide some traces? (A 4-trace scope would be handy - one on each leg, and one on the raw PWM out of the micro.) Is the motor perhaps rotating too quickly, such that it is unable to get to full PWM value before the Hall tells it to change commutation? If so, put a bigger prop on to load the motor and slow it down (your current will increase).
Andy
james_will
Jul 30, 2007, 04:00 PM
Hello !
I've tried to run the motor with no prop, small prop, big prop and oversized prop. It behaves the same way... Of course, the current increases with the prop size but it's still lower than with a commercial ESC and what gets me going it's the generated noise, i mean, the absence of it.
The sine table values go up to 254 (99.6%) so the PWM value i reffer to (190 -> 74.5%) is not the max value according to a sine scale.
I don't think that the motor is spinning too fast because i wired it to run at approx. 320 rpm/V and i run it with 4 Li-Po cells so it should spin at around 4800 rpm (mechanical)
All the best,
James
stumax
Jul 30, 2007, 07:16 PM
James, what happens to the current draw above 190? Some scope pics showing sensor outputs, gates, and at least one winding at various duty cycles would help enormously.
Sinusoidal drive will be more efficient, more so if the motor is specially wound for it (ie so it has a sinusoidal back EMF shape). The reduction in noise you're seeing is due to the massive reduction in harmonics generated compared to a trapezoidal waveform. I think it will be a very long time before we see a commercial esc go this way as the computing power to do it sensorless will be massive (100MHz+ DSP land), and no one wants to go back to sensored, although I've given it some serious thought for a big EDF esc to allow higher efficiency and slower idle speeds. BTW, did you do the commutation in software, or are you using a commercial IC for it?
Stu.
TommyBurger
Jul 30, 2007, 08:25 PM
Try varying the input voltage if you can. Maybe you are just reaching max rpm for the input voltage for your motor.
hul
Jul 31, 2007, 01:48 AM
I think it will be a very long time before we see a commercial esc go this way
http://www.sinusleistungssteller.de/ makes them already
Hans
stumax
Jul 31, 2007, 02:46 AM
Wow, Hans, nice esc's - price isn't too bad considering. I wonder if anyone around here has tried one? ~550Euro for a 14S 100A esc isn't out of line - depending on how well they work, of course.
Stu.
james_will
Jul 31, 2007, 04:09 AM
James, what happens to the current draw above 190? Some scope pics showing sensor outputs, gates, and at least one winding at various duty cycles would help enormously.
Sinusoidal drive will be more efficient, more so if the motor is specially wound for it (ie so it has a sinusoidal back EMF shape). The reduction in noise you're seeing is due to the massive reduction in harmonics generated compared to a trapezoidal waveform. I think it will be a very long time before we see a commercial esc go this way as the computing power to do it sensorless will be massive (100MHz+ DSP land), and no one wants to go back to sensored, although I've given it some serious thought for a big EDF esc to allow higher efficiency and slower idle speeds. BTW, did you do the commutation in software, or are you using a commercial IC for it?
Stu.
Hi Stu,
The current draw remains the same between 190 and 255 and the rpm also. I will try to post some scope images in a couple of hours.
The motor has a sinusoidal BEMF and i do the commutation in software. I'm using the code from app. note AVR447 from Atmel. You can take a look at it here: http://www.atmel.com/dyn/resources/prod_documents/AVR447.zip
The only modification i did, was to add I2C communication. The commutation and sine tables are the same.
All the best,
James
AndyKunz
Jul 31, 2007, 08:58 AM
I don't think that the motor is spinning too fast because i wired it to run at approx. 320 rpm/V and i run it with 4 Li-Po cells so it should spin at around 4800 rpm (mechanical)
4800 RPM mechanical on a 24 pole motor is quite a bit higher electrical RPM - you're pushing 60K there!
Andy
james_will
Aug 24, 2007, 07:43 AM
Hi guys,
Sorry for the late reply... i was on vacation for a couple of weeks.
I'm posting below some osc. images. The gates for phase A and B. I have just a cheap usb oscilloscope so the images aren't too good...
One thing i've noted so far is that i have to set a huge deadtime... around 12us otherwise the motor and the FETs get extremelly hot.
Please let me know if you have any suggestions.
Thanks,
James
james_will
Aug 24, 2007, 08:21 AM
Here's circuit for one of the phases... Am I doing something wrong here ? Am I missing something ?
AndyKunz
Aug 24, 2007, 08:36 AM
How about comparing the high-side drive and the phase voltage? If the FETs are getting hot, you may have some shoot-thru caused by then FETs not being fully off. The hot motor would be a symptom of a phase being turned on when it should be off (ie, the inductor is saturated and is now just acting like a wirewound resistor), or of the commutation timing being way off.
Andy
james_will
Aug 24, 2007, 10:31 AM
Ok... here's another osc. image...
The n channel is yellow, the p channel is red.
It seems to me that the n channel works ok, i mean it turns on and off without any problems but the p channel doesn't. In the spot marked by the intersection of the dotted lines, it can be seen that the p channel gate remains low for 10.4us instead of going completely high like the n channel. So, the high side doesn't turn fully of before the low side goes high.
What could i do to get the high side to go high ?
All the best,
James
AndyKunz
Aug 24, 2007, 11:35 AM
You probably have a capacitance issue with the gate - either internal or external. Try pulling the PFET off harder (smaller value resistor), or start turning it off sooner so that's it's off when you want it to be.
Remember you only need to turn off one of them for doing the PWM. It's only during commutation changes when you need to turn off the top FET.
Andy
james_will
Aug 24, 2007, 11:41 AM
Hi Andy,
How low can i go with the pull up resistor value ? I've tried a 390R and it already works a lot better...
Thanks,
James
AndyKunz
Aug 24, 2007, 12:39 PM
I don't know - you'll have to analyze your circuit. Check the gate capacitance on the FET, check the transistor, look at your wiring. 390 is pretty low. How fast is it rising now?
I think you're finding why we use N-FETs on top and bottom and FET drivers to switch them.
Andy
Dan Baldwin
Aug 24, 2007, 06:07 PM
I would use a smaller value resistor for the P-channel pull up. Perhaps a 220 ohm. I would also use a smaller resistor to feed the base of the bipolar than 10K; perhaps 1K or smaller. It should help square up the turn on and turn off of the fet. The base of the bipolar doesn't pose a large capacitive load like the gate of the FETs, but it still has some capacitance.
Dan
james_will
Aug 25, 2007, 04:14 AM
Hello again,
Thanks for your input...
I've tried to lower the pull up resistor to 180R and it works a lot better. Now i can go from 0-255 (0% - 100%) without any problems. However, it still runs slower than a commercial (trapezoidal) ESC. I think it's still because the deadtime is too high. I've looked at the datasheet of the FETs and the input capacitance for the P FET is 1700pf and for the N FET is 3480pF, should i pull the N FET harder ? There's a mistake in the schematic, the 47K resistor used to pull down the N channel is actually a 4k7. Maybe i should increase it...
I'll try to change the resistor for the bipolar to 1k or 680R.
I really want to get it working especially because of the noise. When it runs, the only thing i can hear is the whirl of the propeller. No commutation noise. :)
All the best,
James
AndyKunz
Aug 27, 2007, 01:08 PM
Try using a FET driver chip (IR4427-ish) on each device. That will put a good hard totem pole onto the gates. IR2210 rings a bell...
Andy
KreAture
Sep 04, 2007, 08:20 AM
You are changing both drive frequency and amplitude right? Not just amplitude?
In open loop you would need tables of this to give the motor optimum conditions.
vintage1
Sep 04, 2007, 01:01 PM
My guess is the drive circuitry is pretty poor on both P and N.
You could try boostrapped cascode type pairs...the more time the FETS spend 'in transit' the bigger deadband you need or the hotter they get when BOTH are on. Yuk.
You need a very hard hitting driver that drives up as well as down on each gate to turn them off as fast as you turn them on. The 10k resistor in series with the base of the driver tranny should have a capacitor across it to sped it up as well.
Or take Andys advice, and buy some high speed FET driver chips.
In the bad old days I had to design a high speed video amp to drive a superfast TV display for avionics. We JUST got it right with a two transistor cascode pair and a pair of complementary emitter followers - bit like a crude audio amp of the class B flavour.
You drive the bottom NPN as normal, with as low an impedance as won't cause oscillation problems, carry its collector to the emitter of another NPN, whose base is held by a decoupled resistor chain at something like 2.5v.
The collector of that probably has about 470 ohms to rail, and a choke as well if you can fit it in. Few UH. Then you have a pair of complementary transistors - we used TO5 metal can ones here - that have bases and emitters joined: The bases go to the top NPN collector, the emitters are the outputs and the collectors go one to each rail.
We got swings of up to 60V from a 75v rail IIRC at a 25Mhz bandwidth. 180ns rise and fall for the bigger swings IIRC.
You want to TRY and make your gate swing about 2-5 times faster than the FETS maximum rise time. Beyond that it makes no difference really.
I would expect a sinusoidal controller to underperform a trapezoidal: there is simply less time when the poles are fully energised. The AVERAGE voltage is lower..
KreAture
Sep 04, 2007, 01:21 PM
vintage1
I think the sinusoidal controller will run the motors that are designed for it smoother, and even more efficiently, but as you say the maximum power is lower due to the lower average voltage.
motor_control
Feb 01, 2009, 09:41 AM
the motor and the FETs get extremelly hot.
Please let me know if you have any suggestions.
Thanks, James
Try this cool fet driver
http://s47.radikal.ru/i116/0902/c7/3dc098b92948.jpg
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.