New HEXFETs or New Drivers

Discussion in 'The Projects Forum' started by dksoba, Jan 8, 2010.

  1. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    I currently have about 20 MTP3055V MOSFETs from eBay. In order for them to be fully "on", they need a Vgs of about 10V, from my understanding. To do this, I used a TC427 MOSFET driver, since the signal was coming from a 5V PIC. However, I accidently miswired one of the drivers, and it broke. I'm using them to control a stepper motors.

    This thread is to ask the best way to proceed. What I am doing is making a stepper controller for my PCB mill. I basically just need to drive MOSFETS with a +5VDC signal. From what I've read, I can get HEXFETs that will be fully "on" with a logic level signal. Is this true for all HEXFETs? What the in the datasheet should I be looking for to find the minimum on voltage for Vgs? If I don't buy logic level HEXFETs, I can always buy more motor drivers. It's too bad these things take a week to get here from digikey! (Any recommendations on where else to get this stuff?)

    I think I'm in favor of switching to logic level HEXFETs, since that'll reduce the number of components on the board. I'm just not sure which HEXFETs to buy.

    Here is maybe one option? http://www.jameco.com/Jameco/Products/ProdDS/669901IR.pdf

    My stepper motors are rated at 2.583V, 2.1A,1.23 ohms. According to my calculations, if I run these off a +5V source (from a PC power supply), I need to put a ~1 ohm power resistor.

    V=IR => V=(5V - 2.583V), I=2.1A ==> R = V/I = (5V - 2.583V)/(2.1A) = 1.165 ohm.

    Power: P=IV: 2.1A*(5V-2.583V)=5W. I should probably get a 10W resistor just in case.

    Any recommendations on resistors? They need to be non-inductive, and 10W. I'm a student, so cost is also a concern (Altho I assure you this is not a school assignment, I'm actually studying mechanical engineering). I should also consider the resistance of the HEXFET, but if it's fully on then the resistance should be low. Are my calculations about correct?

    Thanks for any help,
    Matt
     
    Last edited: Jan 8, 2010
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It would help a great deal if you posted your schematic.
    Are your stepper motors bipolar or unipolar?

    Keep in mind that HEXfet is a trademark. A more generic term is:
    "logic level power MOSFET"
    The "power" portion loosely implies an enhanced-mode MOSFET that is capable of sourcing or sinking 1A or more.

    While it is possible to directly drive logic level power MOSFETs from uC's like PICs, you have to keep in mind that the gate of the MOSFET is like a capacitor, and must be charged and discharged. The gate charge is specified in nC's.

    If you are switching at very low frequencies, a simple resistor to limit maximum current between the gate and the I/O pin may be sufficient. However, a gate driver IC or discrete component solution will decrease the amount of time the MOSFET spends in the linear (partially conducting) region, where it dissipates power as heat.

    Driver ICs will minimize your parts count, but they might cost a dollar or two each.
    A discrete component solution will be cheap, but will occupy more board space and not be as effective as a driver IC.
    A simple current limiting resistor between the gate and the I/O pin is dirt cheap, simple, but the performance may not be adequate.
     
  3. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    I'm not sure the best way to post my schematic. Here's a shot:

    PIC Pin -> Driver IC -> MOSFET -> Unipolar Stepper Motor Coil -> Power Resistor -> Ground

    There's four of these. I think I'll keep my current MOSFETs, and then buy more driver ICs. These have worked well before, it's just that it's going to take a few days for these to get here.

    Since I have a 12V supply, is it possible to drive the gate w/a transistor? I tried using an NPN transistor, and it was wired like this:

    Base: +5V (presumably to the PIC, but for my test just to the +5V rail)
    Collector: +12V
    Emitter: MOSFET Gate

    But the voltage at the MOSFET Gate was still only 5V, so clearly there's something about transistors I'm not aware of. I don't need to switch particularly fast (Edit: About 16 kHz, or 62.5 microseconds), but it'd be nice to have *something* that can drive the stepper even at slow speeds while I wait for the MOSFET drivers to come. When I order things from digikey, I send them a check in the mail so that I don't have to pay shipping, but it takes some time! :(. Being a student, I have to be patient.

    Thanks,
    Matt
     
    Last edited: Jan 8, 2010
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    LTSpice is a good (and free!) SPICE simulator and schematic capture program.

    Google: LTSpice download

    Attached is a simulation using just a PIC driving a standard power MOSFET via a resistor, and an improved driver using discrete components. As you can see, the parts count is rather high, but the power dissipation in the MOSFET is less.

    You could substitute a 1N914/1N4148 for the 1N5817, but a Schottky diode will really perform much better.

    You were attempting to use an NPN transistor as an emitter follower. It won't work very well with the standard MOSFET.

    Non-inductive resistors - seems to me that Dale makes non-inductive wirewound resistors.

    It really would be helpful to have a more complete schematic posted; as that eliminates time and guesswork.

    If you need a package for schematic capture and PCB design, consider Cadsoft Eagle. They have a freeware version that's limited, but you can make two-sided boards up to 3"x4" with it in freeware mode.
     
  5. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    Thanks SgtWookie for the schematic. I modified it since I don't have enough transistors to do it the way you specified. (see attached).

    Also, after I put the inductor/resistor of a coil on my stepper motor, the simulation showed that the max current that can go through the stepper coil, when it is being actuated at 16khz, is about 40mA. I decided for now I'd just stick with 120RPM. Hopefully my frequency calculations are correct:

    120RPM = 2 R/second
    1 R = 200 steps
    A MOSFET gets turned on one out of four steps, so 50 times per revolution.

    So: (50/R)*(2 R/second) = 100hz

    The period is then 1/100hz, and the on time is 1/400hz.

    Adjusting the simulation, I can get really reasonable rise times with my modified circuit. I'll be ordering MOSFET drivers soon anyways though, unless this works well enough that I can just wait until I have time to create a chopper drive. Since these things are for a PCB mill, it's only appropriate, right?

    Thank you,
    I have much to learn.
    Matt
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Transistors are only as far away as your nearest Radio Shack. If you buy the assortment of 15 PNP transistors, you'll get 4 or 5 2N2907/PN2907 in the mix; there will also be some 2N3906 and 2N4403 transistors. If you get the assortment of 15 NPN transistors, you'll get 4 or 5 2N/PN2222 transistors, and some 2N3904 and some 2N4401 transistors.

    You can use any of the NPNs in the assortment for Q1 (referring to my original schematic).
    You'll get the best performance using the 2N2907 transistors for Q2/Q3, but performance won't be terrible with the other PNPs. If you change to the other PNPs, increase R4 to 20 Ohms or so.

    The modification you made will result in slower gate fall times. You eliminated the 10 Ohm gate resistor, which is not good; this will cause "ringing" on the gate due to the L of the wiring (not shown in the simulation) and the C of the gate; it makes a resonant circuit.

    Are you planning on half-stepping or power-stepping your motors? If not, you could just use a single resistor in the +V supply line to them; one for each motor. Putting it under the source terminal isn't a good idea, as that will affect the Vgs of the MOSFETs. Remember that the gate voltage always needs to be referenced to the source terminal.

    Did you know that you can specify the resistance in the coil itself, rather than using a separate resistor? If you right-click on the coil in the original simulation I posted, you'll see that.

    The rise times will be too fast, since there is no longer a resistor in series with the gate, and in the actual circuit you'll see ringing.

    Why, sure. :)

    This is an excellent candidate for a chopper driver.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If you're going to be using IRF530 MOSFETs, the Rds(on) is about .16 Ohms; so you'll need a 1 Ohm 10W power resistor.

    Mouser stocks these: http://ca.mouser.com/ProductDetail/...GAEpiMZZMuQ5/sBR7SoAsttSH5K/MhG7%2bs8Czk39og=

    Digikey does not have anything suitable in stock.

    I modified your modification a bit; added back in the 10 Ohm resistor (trust me, it's important) and added a 0.1uF cap on the emitter of Q2. You really do need that cap there; it will ensure that in the real world there will be a ready source of voltage to produce a charge in the gate. Realize that in simulations, all of the wiring is perfect - zero Ohms, no parasitic inductance or capacitance. Unless you add it to the simulation, you'll see something different in the real world.

    If you want to do the chopper driver thing, you'll either need to use something closer to the original circuit I supplied, or integrated gate drivers.

    Note that the 1.23 Ohms of Rload1 has been incorporated in L2; so Rload1 was eliminated.
     
  8. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    This does the same thing though, correct?

    About the chopper drive... I tried designing one of these before but it did not work properly. I have the schematic around here somewhere and I'll draw it in LT Spice soon and simulate it. Is it possible to add MOSFET models to LTSpice? I choose the IRF530 arbitrarily. The actual MOSFETS I'm using are MTP3055V (See attached data sheet).

    Thank you, by the way, for introducing me to LT Spice. Previously I had to actually build circuits to get an idea of what was happening, and this got confusing pretty quickly. I was actually turned off to the chopper drive idea for a long time because I had such trouble implementing it, but I'm excited to build my schematic on the computer and figure out what went wrong. It did use PIC, comparators, sense resistor, and MOSFET drivers.

    I think for my unipolar stepper motor circuits, I can use these drivers:
    TC4469CPD
    http://mouser.com/ProductDetail/Mic...GAEpiMZZMtOXy69nW9rMxg/fx9hftK8PYTqCD%2bNeYI=

    how does this look?

    If I draw a chopper schematic in LT Spice and troubleshoot/improve it with you, do you think we can be confident enough in the design as to only make one order from Mouser? I'd like to be efficient if at all possible.

    I think my plan of attack will be to order from Mouser right now:

    4x TC4469CPD Quad MOSFET Driver (One spare)
    3x 1ohm 10W non-inductive resistor (The link you gave me was for a .1 ohm resistor, I'm having trouble finding a 1 ohm non-inductive resistor. My MOSFETs have a Rds(on) of .160 ohms...close enough I think)

    and then build my Step Genie circuit so that my PCB mill will be operational. Then, using this simple stepper motor circuit, we can mill out a new PCB for a chopper drive (maybe w/microstepping?). I think I'd like this board to have all the components for 3-axis on it. It may also be nice to build a simple power supply (transformer, rectifier, and a big cap, right?). I was experimenting with some simple designs in LTSpice, doesn't seem too difficult, although I'll also need a linear regulator to regulate the voltage for the logic level stuff. Then I can put all this stuff into a nice box :).

    One more question: When looking at the Datasheets for MOSFETs, how do you determine the Vgs(On)? I think for my MOSFETs it's 10V, which seems to be common for a lot of MOSFETs, but I'm not sure how I would know if a particular power mosfet is logic level compatible or not.

    Thanks SgtWookie!
    Matt
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It's actually better, because the resistance is IN the inductor, rather than in series with it - and you eliminate the external resistor, so less clutter in the schematic.

    Yes, it is possible to add components to LTSpice.
    There is a Yahoo group dedicated to LTSpice, here:
    http://tech.groups.yahoo.com/group/LTspice/
    Lots of models and help. Sign up for a free account, and request membership.
    Keep in mind that the MTP3055V is an obsolete component. If you go to the ONsemi website and download the most current datasheet, you will confirm this. It is always a good idea to obtain the latest datasheet directly from the manufacturer when building new designs; it's generally a good idea to avoid starting with obsolete components, or those planned for obsolescence.

    SPICE isn't perfect, and the results need some interpretation - however, you can get a pretty good idea how an actual circuit will perform by simulating it.

    There is only a single supply; Vdd. You have to use Vdd=5v because you're using logic level for the input - but that limits you to 5v at the output, and your MOSFETs require Vgs=10v to be turned fully ON. It would work fine with logic-level power MOSFETs.

    Shipping costs certainly add up quickly - and it's annoying to have to order more stuff. You can't plan for every contingency, but you can pretty much cover your bases. The more time you spend in the planning stage, the less time you'll have to spend in the re-engineering stage.

    OK, if you're going to use microstepping, you'll run into a problem; the two coils in parallel will increase the current through the resistor (thus it's power dissipation) as the voltage across the resistor will increase.

    Step Genie? Unfamiliar with that.

    You'll want to stay away from linear if you can avoid it. Lots of power dissipated in the regulation.

    It will be specified for logic level operation.

    Those that are, will have Rds(on) given at Vgs=10v and Vgs=4.5v (or whatever the logic level is; some go below 3.3v)

    If you're looking at International Rectifier or Vishay offerings, the part number prefix is generally different for standard vs logic level.
    For example:
    IRF540 - Standard level MOSFET
    IRL540 - Logic level MOSFET
    See the 3rd character? The standard level is F, logic level is L.
    This is not true for all of them, but it helps to narrow them down quickly.

    LTSpice tip:
    You can quickly plot the power dissipation in a device by running the simulation, and then holding down the ALT key while hovering the cursor over various devices; you will see that the cursor is replaced by a thermometer. Clicking on the device will then plot the power dissipation.
     
  10. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    If I do make a microstepping controller with chopper current limiting, then it won't be necessary to have a power resistor, right? Since the current will be controlled by the chopper electronics?

    Matt
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    That is correct! :)
     
  12. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    I've made a simple 1-coil chopper circuit in LTSpice. I know that it's very ideal, but I'm not sure what steps I must take to make it work in real life.

    Also, another thing that confuses me. I know it's best to increase the voltage over the inductor to reduce rise time (di/dt=V/L, if I remember correctly), but what I don't understand is how to adjust my current.

    The power dissipation specified for my steppers is 2.538V*2.1A=5.4W.

    Now, if I use a 40V power supply:
    5.4W/40V = 135mA

    The problem I have with this is that I thought the magnetic force of a coil is proportional to the current flowing through it. If this is true, won't I be loosing a lot of torque by going from 2.1A to 135mA? ::confused::

    Also, I arbitrarily chose this IRL transistor because I couldn't find a MOSFET Gate driver in LTSpice, and didn't want to add one yet. I understand that the AND gate is idealized, and in real life I'll need to use a MOSFET driver or something to get fast rise times since the AND gate would not be able to charge the MOSFET that quickly.

    When I built something similar to this it did not work well at all... no idea why.

    Let me know what you think. Thanks, by the way, for teaching me about electronics. I've had lab courses on electronics, and took a linear circuits course, none of which have prepared me to deal with transistors. I feel like mechanical engineers need to have a stronger education in these things since more and more interdisciplinary design is required :).

    Thanks,
    Matt
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Want a surprise? :)
    Run your simulation.
    Click on the schematic portion, and then on the menu bar,click Window -> Tile Horizontally.
    Then click on View -> Zoom to fit.
    Then hold down the ALT key, hover over M1 (the MOSFET) until you see a thermometer, and then click on M1.
    Presto - a plot comes up! But what are those numbers on the left?

    The initial power dissipation of the MOSFET will be 80KW! :eek: I think the smoke would make a very hasty exit from that MOSFET, along with a bright flash and loud bang.
    Did you really mean to put in 80KV for VMotors? :confused:

    You're using an N-channel MOSFET without a high-side driver. When Vg goes to 5v referenced from ground, Vs follows Vg right along until the threshold is reached - then the MOSFET is turned off!

    You either have to use a high-side driver, or a P-channel MOSFET with some transistors, resistors and a Zener to pull the gate down.
    Yep, V/L = dI/dT.

    You set the threshold to trip when V(Rsense) = DesiredCurrent * R(Rsense).

    No. Don't forget that the chopper driver will sense the actual current flowing through the coil by V(Rsense); when the threshold is exceeded, the chopper turns off the MOSFET. The current then starts decaying (you forgot a return path for the coil current, BTW) and when V(Rsense) falls below the threshold, the driver turns the MOSFET back on. You need to add some hysteresis to keep the driver from trying to drive the gate too fast.

    There are a few in LTSpice already, but they're for logic level MOSFETs.

    Yep.

    N-ch MOSFET, no high-side driver, no flywheel diode.

    I think I've given you some things to munch on.
    That's what AAC's all about; sharing some knowledge

    Interdisciplinary knowledge is certainly important nowadays. I don't consider myself a specialist in anything anymore. I came on here a couple years ago because my electronic skills had gotten pretty rusty from disuse. It's helped a lot to help others; you learn best when you're trying to teach something to someone ;).
     
  14. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    I'm still confused about the torque of a stepper motor.

    If I increase the supply voltage over the inductor, the rise time is faster, but since P=IV, I need to decrease the current to keep the power constant, right?

    But then magnetic force in the coil is proportional to only current, correct? So if I reduce the current by 10X, but increase the voltage by 10X, I decrease my torque by 10X but I can run the motors faster?

    ::confused::

    Matt
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The idea of the chopper driver is to allow a much higher initial voltage across the coil, to get the current flowing through the coil more quickly. Once the current flow has been established, the current source is cut off, and the stored energy in the coil is sent through Rsense and a "flywheel diode" to recirculate the current, until the current falls below the threshold level.

    Yep.
    No.
    The desired (optimal) current is established far more quickly, because the inductance (electrical inertia) is more easily overcome by the higher voltage (more pressure).

    The same amount of current will flow. It's a question of how quickly the desired current flow will be established.

    Stepper motors are rather low-speed devices compared to other types of electric motors, and have some unique characteristics. Steppers have their greatest torque at zero RPM; their "holding torque", generally specified in inch-pounds. As their RPM increases, torque decreases, mainly due to the time it takes to establish current flow through the windings (coils).

    Using chopper drivers can double (or more) the top speed of a stepper motor. However, there are other factors that come into play; resonance is one of them.
     
  16. dksoba

    Thread Starter New Member

    Jan 8, 2010
    25
    0
    So if my motor is rated for 2.538V, and 2.1A... I still want V(sense)=2.1*R(sense)? Even if I'm running at 80V, this still isn't dissipating more power because I'm not constantly at 80V. In a way, my average voltage is still ~2.538V, right?

    Thanks,
    Matt
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I really didn't mean to oversimplify things.

    In an idealized environment, such as a simulator, you might get results that would lead you to think that you could hold up the Golden Gate Bridge with a single class 12 1" bolt and nut under the right conditions. That is, unless you knew what you were looking at, and realized that there is no way that combination could hold up that bridge.

    You don't want to try to run your steppers at that high of a voltage, trying to depend on the choppers to average the current. The amount of error will be too high, as well as switching time requirements. You'd likely blast your switching transistors/MOSFETs right off the face of the planet.

    You might run them at 2 to 4 times their rated voltage, and get a decent compromise between switching speeds and average current. If you try to push it too far, you'll wind up with lots of fried components. :(

    It's possible to push the voltages higher, but not from a hobbyist perspective. We like to keep things under 45v or so around here, so our hobbyists survive their experiments. ;)

    One big thing that will bite you is ground references. MOSFETs only "know" Vgs, which is the voltage at the gate referenced to the source. If your MOSFET Vgs exceeds 20v in either direction, it will be dead.
     
  18. 3ldon

    Active Member

    Jan 9, 2010
    82
    3
    Only if you limit the duty cycle accordingly.
    Are you still intending to switch those fets with only 5 volts? 10 or 12 is a lot better, and will give you the flexibility to run a bigger motor off the same driver later.
    You have to consider the iron loss created by exposing the rotor to 40 times the voltage, at 1/40th the time. sure the average current is the same but losses will be some square root40 times higher, its entirely possible that you would lose more heat in the iron than you would in the copper.
     
    Last edited: Jan 11, 2010
Loading...