PDA

View Full Version : Question help with motor controller


jakob
Dec 12, 2004, 03:57 PM
Hi,

I am currently building a four rotor flyer. I am not the most experienced when it comes to electronics, but for that I have come surprisingly far already.
The motors I am running are GWS350. I control the motors using the following circuit:

http://images.info.tm/jakob/motor.png

The MOSFETS I am using are rated at 60V 30A, the diodes are 100V 1A (I think they can take a lot more pulsed). The diodes are normal rectifiers (S1BDICT-SN) and not shottky diodes.
The MOSFETS are not high-gain, so I put an inverting MOSFET driver in between them and my PWM output (using an AVR microcontroller).

for my testing I use a 450W power supply, where the 12V rail is rated at 30A. My 5V power for the rest of my circuitry (which is working nicely) looks like this:

http://images.info.tm/jakob/power.png

Everything works fine without the load. I can nicely control the voltages on my four motor outputs. Things are starting to go pear-shaped when I switch on the motors. With one its seems fine at first, but sometimes the processor resets. Also the MOSFET does get quite hot, even though I thought it shouldn't when its rated for 30A and switching. The current draw for one motor is something like 1.5A (at the speed I was running it).
When connecting a second motor, the motor instantly drops in speed and both motors only run at a much lower speed than they should.
At first I suspected that the power supply wasn't delivering enough current, but was proven otherwise when the microcontroller cut out, the PWM signal lines went to zero, the MOSFET drivers which are inverting ramped up, and both my motors where running on 12V, and because I didn't expect it nearly made the whole thing fly into my face :rolleyes:

When one motor is switched on, the pulsed signal from the mosfet driver that goes into the mosfet drops by a Volt or so. That is the average voltage because I only have Voltmeter and no oscilloscope.
Also the Overall Voltage drops from 11.8V to about 11.2V. I suspect it drops a lot more, but I don't have the equipment to test for spikes.

MY THEORY:
The motors put huge spikes onto the 12V supply which would explain the microcontroller dropping out at times. As the spikes appear when the MOSFETS are switching, and the mosfet drivers power supply is on the same rail as the motors, they can't provide the current they need to switch the mosfets properly. Hence the motors slow down, and the MOSFETS get very hot.

Sorry for this very long post, but I figured it would be better to supply all the information I have. I have read some other posts on ESCs and that it would be better to use high-gain MOSFETS. Which I would do, would I design the thing again. I hope that I can fix my current design though.

I don't have any Idea how though. Putting a big fat capacitor between 12V and GND to supply the current for the spikes? Any help would be appreciated.

Jakob

Nightz
Dec 12, 2004, 05:38 PM
Use a "bulk" capacitor on your micro supply. Put a 220uF 10V cap (or larger uF) between ground and +5V between your regulator and uC. That way when the motors suck down the voltage durring in-rush, your micro can draw from the CAP and wont reset.

Make sure your driving the FET's hard enough.

Good luck,
-Rocko

Malc C
Dec 12, 2004, 05:40 PM
Can you not separate the supply rail and the motor supply and try that.. this could rule out your theory of spikes. The other possible cause might be that the PSU you are using is not pure DC... try it using a 10 cell flight pack (C cell size Sanyos or something) I'm clutching at straws here, but just throwing ideas into the hat.

Malc C
Dec 12, 2004, 05:44 PM
The other thing you could try is some de-coupling capacitors across the motor terminals - have a look at http://www.mtm-int.com/products/knowhow_capacitors.htm for some info which may help

Mr.RC-CAM
Dec 12, 2004, 09:58 PM
I'll add my two cents:

(1) Heat Issue: The IRF234 is not a good choice for you. It has an RDS of nearly 0.5 ohms.

(2) Motor Noise: Place a Schottky directly across the motor leads, at the motor. Also, add three .047uF Ceramics there too. Short leads.

(3) Your board layout's gnd paths need careful attention. Make sure your motor power sources, including their related gnds, are not directly shared with your controller's circuitry. Daisy chained gnds are a no-no in these sort of projects.

RC-CAM

jakob
Dec 12, 2004, 10:14 PM
Thanks guys, I will get a big capacitor and some schottkys tonight and try that.
To RC-CAM: The FET I am using is a IRFZ34... Sorry for that. Schematics are a bit small. It says 0.05 Ohm in the datasheet. The GND for the 5V and the 12V are more or less separated, and only join at the battery connection.

Nightz
Dec 12, 2004, 10:33 PM
I forgot to mention. Make sure your bulk capacitor an electrolytic!!
Good luck.

-Rocko

jakob
Dec 13, 2004, 03:17 AM
I have tried the bulk capacitor now, and it has definitely improved the situation. I have put a 1000uF electrolytic capacitor between 12V and GND, and with one motor the FET seems to be driving OK now, doesn't get hot, and the MC seems to work quite stable too. When I connect another motor the power still drops, but not as severely as before. I suspect the problem is with the FET drivers. Now, would anyone have an idea how I could maintain stable 12V for the drivers without the need for a rather large 10000uF capacitor? Is there any way I could easily decouple the motor 12V from the FET drivers 12V?

Turbo-Tom
Dec 13, 2004, 06:02 AM
I have tried the bulk capacitor now, and it has definitely improved the situation. I have put a 1000uF electrolytic capacitor between 12V and GND, and with one motor the FET seems to be driving OK now, doesn't get hot, and the MC seems to work quite stable too. When I connect another motor the power still drops, but not as severely as before. I suspect the problem is with the FET drivers. Now, would anyone have an idea how I could maintain stable 12V for the drivers without the need for a rather large 10000uF capacitor? Is there any way I could easily decouple the motor 12V from the FET drivers 12V?

There are a few things to observe when doing such high-power PWM stuff. First of all, you should add Gate resistors to your FETs (about 100 Ohm, depending on PWM frequency and specs of your particular transistor). These power devices have got really high gate-capacitances and even worse, considerable reverse transfer capacitances. It requires considerable current momentarily to switch a MOSFET from folly conductive to fully blocked state and vice versa. Usually the driver ICs haven't got a problem supplying these currents for the short time, but the power supply may not be up to it. Moreover, if the gate is not "dampened", you will get all kind of nasty things (overshot, ringing, spikes on the ground and power supply...). Be very careful not to have a ground loop in your layout and connect the logic level ground to the power stage ground only at one place. Ideally this should be the negative terminal of the power supply bulk capacitor. This capacitor itself should really be a LOW-ESR type (Low Equivalent Series Resistance) like the Rubycon ZL series. The capacity itself isn't that critical, though higher capacities probably won't hurt. Don't forget to add a 1µF ceramics in prallel for the really high frequencies.

If possible, use a PWM routine in your controller that doesn't switch all the motors in-pase, but rather have two motors 180 degrees out of phase. Though this may be not easy to do, it will improve the overall performance of your circuit a lot. At least try to avoid a common switch-on or switch-off event to all the PWM channels.

To decouple the dirver IC power from the motor supply, you should consider to add a small schottky diode in series and a separate (though smaller) buffer capacitor for the driver alone. Once again, don't forget the ceramics in parallel.

Observing all these hints should pretty much solve your problem.

Cheers,
Thomas

jakob
Dec 14, 2004, 06:47 PM
I've now damped the FETS with 100 Ohm resistors, added a 2200µF capacitor to the 12V, and a 220µF one next to the FET drivers. Also the FET drivers 12V has now got a schottky diode to prevent the motors from sucking the current from them. Works like a treat for the drivers. The FETs stay nice and cool. The power supply seems to struggle though, as the power still drops the more motors I connect. I guess when driving from a battery pack this shouldn't happen anymore. I will probably write my own PWM routine for the processor, to shift the phases. Thanks very much for all your help.

Terry S
Dec 16, 2004, 03:56 AM
Hi, I just scanned this thread and I thought I would pass on what I do as it may help you move forward quicker. I designed my own speed controllers for a while now and I found in the early hours its worth dropping the frequency of the pulses as most of the problems will drop too,after you have got it all working ok you can work on bringing it up again (if you need to).

Terry

Terry S
Dec 16, 2004, 04:01 AM
Oh, dont forget the figures quoted for a transistor are max and you will need a heatsink to see them. Try using 2 FETs in parralell, its a better answer.

Terry

jakob
Mar 26, 2005, 04:20 PM
Solved it! Thank you all very much for the help. It took my only 6 months and about $700 worth of equipment to find out that the cable I was using to connect the power supply to my flyer was too thin. When I replaced it with bigger leads the thing actually took off and nearly crashed into a wall. It's always the simple things one doesn't think about.
Thanks again guys.