Tuesday, June 8, 2010

Controller Part 2 Continued

Testing the mosfet driver (Micrel MIC4420 6A noninverting driver)


As you can see the MIC4420 is an SOIC-8 part, meaning I need an adapter to DIP; unfortunately the device pitch is too small to solder directly to perfboard. You could also do this dead-bug style, but that is time consuming and worst of all, is probably going to cause inductance issues.

This may look unassuming, but trust me, it is a BEAST! It is rated to drive 2500pf in 12 nanoseconds (ns).
Which is good, because the big transistors I will be driving have (at worst) 140nc of gate charge
Since C = Q/V => C = 140nc/12V = 11.66nF = 11660pf. Yes, that is a lot of gate capacitance for a mosfet.

For risetime comparisons, the 20mA outputs of the AtMega16 I'm using takes about 5 microseconds (5000ns) to charge 100nF.


In the above picture you see one of the giant film capacitors as a 12V bypass cap. The MIC4420 datasheet calls for three bypass caps. Two are 0.1uF directly across each Vss and ground. Due to the high currents, the MIC4420 has two Vss pins, two ground pins, and two output pins. One 4.7uF cap is also across Vss and ground. I don't have a picture, but the supply voltage was sagging from 12V down to 4V. That's right, 8V of sag from *one* switching event, lasting only nanoseconds, but long enough to slow down the switching (not enough drive anymore). So I thew the big cap across it, and the voltage sag is gone. Millivolts, anyways. God those film caps are crazy. When you hook it up to 12V to charge it for the first time, it actually throws a spark. From 12V. DC. From a wall-wart of all things. With a car battery and a piece of wire, sure. From a wall wart and a capacitor? Who knew. . .




I am using the small motor and small mosfet to test the MIC4420, and to learn about it.
In the picture below you see the yellow line as the input to the MIC4420 driver rising from 0 to 5V. The blue line is the output of the driver, rising from 0 to 12V in only 14ns!


There is a problem with this incredible risetime, however. It is called dV/dt, or the change in voltage with respect to time. If the output rises 12V in 14ns, we see dV/dt is 857,000 V/s (Volts per second).
This causes the output wire to be an antenna. An AMAZINGLY good antenna, in fact.

At low speeds, the motor would act strangely, and I saw on my scope a kind of digital ringing after a rise on the input, lasting for several microseconds. This would cause the motor to speed up erratically.

Touching the wires changed the effect! Suddenly I realized what was happening. In the next picture, you see the solution. The black wire taped to the desk is the output of the MIC4420, connected to the gate of the mosfet. I had to put a loop in the wire! (the taping to the table is just to maintain the loop, its orientation is unimportant.



What was happening, was that the input would rise, causing the output to rise. The input would fall again so soon (due to low PWM duty) that the EM waves emitted from the output travelled through the air to the input wire, causing the wire's voltage to increase, turning on the driver again, etc etc.

Pretty amazing, huh?

About the final design, the mosfets are much larger, and thus the risetime will be much slower. This should reduce dV/dt, so hopefully it is not as much of a concern.

1 comment:

  1. The proper thing to do, is to use a twisted pair of ground and MIC4420 output to reduce the EMI but I'm not entirely sure where to attach the ground connections. Besides, a loop works for the moment :)

    But ground is ground, right? No-sirree-bob. Not when you have high current digital pulses mixed with high current analog signals.

    ReplyDelete