NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Motor Controller Help

May 22, 2013
by meltbox360
meltbox360's Avatar

Hi everyone.

I've spent quite a bit of time learning to make PCB boards and I finally have it down (sort of) and decided to make a motor controller. First I made a small one which didn't work at all until I transferred it to a breadboard. I suspect that sharing grounds was the thing that killed it. The microcontroller wouldn't even output pwm on that board. Next I went for a full on two board project. I made an H-Bridge (will attach pictures when I figure out how to) using AOT240L mosfets and ADP3120AJRZ-RL mosfet drivers. At first nothing worked until I realized the MCU was pulling the disable pin down sporadically due to noise somewhere (I can see no other explanation and have no oscilloscope) so I disabled that in code. After replacing a bunch of parts I actually managed to drive a high side FET with a small motor attached. So now thinking that I could go for something bigger I popped on a CIM motor across that same gap. I figured that the mosfet would be able to handle it. It seems that I was wrong and the gate blew through to the drain and took the driver with it.

So I have three questions.

  1. Why do you guys think the CIM blew my mosfet? Is there something I missed in the datasheet. I thought it should handle the current fine for now. (I do have flyback diodes. Do they have to be of a certain type?)

  2. Is the ADP3120AJRZ-RL sensible for driving mosfets in a motor controller application?

  3. Is it normal for mosfets to explode or short from ground to drain.

Any help is appreciated. I've seen too many shooting flames and huge sparks blowing up my components these last few days...

May 22, 2013
by meltbox360
meltbox360's Avatar

I should also mention the mosfet did not simply burn out but rather the motor seemed to do a quarter revolution and then the mosfet blew. I believe current rises is inductors (such as a motor) over time so could it have been that the current just spiked so high? Hard for me to believe it could have gone that high...

Alt Text Alt Text

Assume that I connected the boards together correctly. Also the POS_EXT pins are connected with jumpers.

May 22, 2013
by meltbox360
meltbox360's Avatar

I have yet another question. Are these tiny components absurdly easy to ruin by handling with specific static precautions? It's either that or my soldering that's ruining them so fast. These mosfets drivers seem terribly delicate. When I have time in the future I'll try this with an lm27222 driver.

May 22, 2013
by pcbolt
pcbolt's Avatar

meltbox360 -

I did a quick look at some of the datasheets and at first glance it seems OK. I didn't find too much relating to the CIM except one that operated at 20-30 amps and had a stall current higher than that. The back EMF can easily reach 10x the forward voltage so that is a possibility. One question I had was about your H-bridge diagram above. Shouldn't the transistors be paired in a complementary formation with PNP's on top and NPN's on the bottom? From your drawing it looks like all PNP's. Also, how much voltage is powering your motor?

May 22, 2013
by meltbox360
meltbox360's Avatar

They are all npn. I forgot to mention that whats on the schematic is not what I ended up putting in. I accidentally used the wrong mosfet in eagle. The final schematic is actually all reversed. The npn mosfets have ground and source switched so I turned all the diodes around and redrew the ground trace and then adjusted for everything else. Sorry forgot about that.

I have 12v powering my motor. I was under the impression back emf is only so high when coasting without diodes/caps and with all the mosfets off? Back emf should not even really have any effect when the motor is just spinning up. Or am I wrong in assuming this? Thanks.

May 22, 2013
by pcbolt
pcbolt's Avatar

meltbox360 -

You're right the motor always produces a back EMF while spinning and it is always less than the forward EMF provided by the battery (or whatever external source). Once they become equal the motor stops spinning and stalls. The problem of back EMF spiking occurs when you suddenly turn the forward EMF off. Not only do you get the back EMF from the inertia of the spinning motor, you can also get back EMF from the collapse of the magnetic field stored by the motor itself. Since this second EMF acts like an inductor, you can use the same equation used for inductors....

V = -L * (delta I / delta t)
(where L is inductance measured in Henrys)

The change in amperage (delta I) may be small but if the change in time (delta t) is very small (like the micro-second scale of transistors) the voltage (V) can get very large. You can test this by wiring the motor in parallel with an LED acting as a fly back. Put 12v to the motor/diode pair then quickly remove the 12 volts. See if the LED lights up for a bit.

I'm curious how you wired up the 4 NPN's to the circuit. Could you post a schematic of your H-Bridge? You don't have to include the diodes...I think those are wired correctly. It seems like you did everything right if the original motor worked (BTW do you have any specs/part names/datasheets for the CIM?). My only suggestion would be to break the project down into smaller chunks and test it with LED's step by step. Sounds like a fun project nevertheless.

May 23, 2013
by meltbox360
meltbox360's Avatar

More curious things yet!

As you can see in the logic schematic there are two drivers. The only success I have been getting is with one driver at a time strangely. If I solder two nothing works at all despite checking every single pin against every pin for a short. The only thing I can think of is arcing at this point somewhere where I cannot see it. The stranger thing is that if I solder two they both instantly break. At least I think so. The bottom one gets permanently hot even if I remove the top one and the top one just doesn't work. Strange things. Then there is the fact that even when I soldered in only one its driving at 10v high side and through black magic it seems to work but my small motor seems to be pulsing almost like the pwm was converted to a way lower frequency maybe 30hz instead of my 28khz. I say this because I have tried 30hz as well and it seemed similar to me when it ran.

I will post back as soon as I can with requested materials. Terribly tired and I have to throw together a portfolio. Almost done...

May 23, 2013
by pcbolt
pcbolt's Avatar

meltbox360 -

HERE is a datasheet I found for your driver chip. It looks like you have it wired right but I can't tell from the schematic. Some of the traces from the driver chip to the pin header seem to be crossed or wired to two different pins. Also the pin labels from the top layout aren't the same as the bottom so I can only guest they are in order. No need to post a schematic for the H-Bridge, I see from page 6 in the link above how it works (in theory at least :-)

May 23, 2013
by Noter
Noter's Avatar

According to the spec, the ADP3120A is designed to drive a buck converter which is a efficient DC to DC step down power supply. I think you only need one to control your motor voltage and feed it into an H-Bridge that connects to the motor. It appears you have the H-Bridge and buck converter merged together and I think they need to be separate stages. If you have only one buck converter that will use 2 transistors and the H-Bridge will use 4 for a total of 6.

May 25, 2013
by meltbox360
meltbox360's Avatar

You sir are onto something. Hmm I thought these were capable of driving mosfets in high side and low side for pwm type chopping of voltage. Are there chips like that? Wouldn't that be more efficient for motor control? Thanks

May 25, 2013
by Noter
Noter's Avatar

The ATmega in your Nerdkit has PWM capabilities on all 3 of the timers. You could drive your mosfets directly from the chip. But you don't need PWM to operate the H-Bridge. Probably a good idea to get it working first and then add the PWM signal after that. Or do the PWM first then add the H-Bridge. EIther way, get it all working on a breadboard before you make PCBs.

May 25, 2013
by meltbox360
meltbox360's Avatar

Yes but the Atmega 168 cannot drive high side mosfets without a charge pump. I don't mind the PCB jot working since I make them myself. No big lead time or price attached. I got a low side mosfets working and I tested my code. I think the separate buck would make a huge difference seeing as how a buck should have an inductor that is not the load. Worth trying to see if building a buck circuit will work.

May 25, 2013
by Noter
Noter's Avatar

No charge pump here ...

p-type mosfet 12v

May 26, 2013
by meltbox360
meltbox360's Avatar

That is using P channel mosfets for high side. I'd prefer n channel high side which will not work without a charge pump. I know there are other solutions. I also must note that although a 168/328 will drive larger mosfets I have had it only work in the upper range of the pwm almost like it cannot fully drive the mosfet. You can adjust for this in code at the expense of granularity of control.

May 26, 2013
by Noter
Noter's Avatar

Why do you prefer to use n-type on the high side?

May 26, 2013
by meltbox360
meltbox360's Avatar

Lower rdson and therefore higher current capacity from the same number of mosfets.

May 26, 2013
by Noter
Noter's Avatar

Seems it would be easy enough to select a larger P channel that has an acceptable rdson. Or have all possible current by using relays in your H-Bridge.

Another question, since a buck converter is designed to drop the DC voltage to a low level (and low power) for driving logic, how will you use it in your design?

May 26, 2013
by meltbox360
meltbox360's Avatar

Yea... See I didn't realize buck and h bridge have different types of drivers so that's why I messed up. I did however think buck was for high power like desktop CPUs which reach above 100w. I am now looking into buying logic driven h bridge drivers which is what I should have done. I feel stupid.

Could anyone explain why a buck converter driver would be incapable of driving an hbridge? Is the voltage rise and fall too fast instead of the steady voltage it expects due to the inductor that should be present?

May 26, 2013
by meltbox360
meltbox360's Avatar

As for relays I have considered it. Wouldn't you think them a bit limited? Two mosfets can hit 80 amps. I will look again though.

May 26, 2013
by esoderberg
esoderberg's Avatar

meltbox,

I traveled your path about a year ago. Made an H-bridge from scratch with NFET and PFET (same basic layout Noter suggested for controlling the PFET, so no charge pump used). But in the end I found it easier and cheaper to use an H-bridge IC on my PCB.

VNH2SP30

Here's the PCB I made using the above IC. I haven't tested the edges of its capability, but up to 10 Amps has not been a problem so far. There are many options available if this particular one doesn't fit your specs.

H-Bridge IC PCB

H-Bridge IC schematic Eric

May 26, 2013
by Noter
Noter's Avatar

Just for future reference, a continuous duty solenoid will handle high amperage. Here's some 100A and 200A stocked or 500A available with special order.

SOLENOIDS 200A & 100A

May 27, 2013
by meltbox360
meltbox360's Avatar

Thanks everyone. I think I realized what I have done wrong. My mosfets have capacitance over 3000pf which is the max for the driver I am using. Even without the difference between a buck and plain hbridge that could explain a bit. There are still unsolved mysteries here like why putting two on ruins at least one. I didn't realize that relays and integrated controllers can reach such high amperage.

Post a Reply

Please log in to post a reply.

Did you know that LEDs (light emitting diodes) only conduct current in one direction, like normal diodes? Learn more...