Shop OBEX P1 Docs P2 Docs Learn Events
ULN2003 Circuit question — Parallax Forums

ULN2003 Circuit question

bennettdanbennettdan Posts: 614
edited 2007-06-28 10:33 in General Discussion
I have a need to drive 7 mosfets off of the SX48 but would like to isolate them would it be better to use a optoisolator or can I just use the ULN2003 with a pullup 5k resistor to trigger my N-Channel Mosfets?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-26 19:16
    N-Channel MOSFETS will be on by default in the configuration you propose. You could just drive the MOSFETS directly from the I/O pins if they accept a gate voltage of 5V. MOSFETS generally require a pull-down resistor to ensure they switch off if the I/O pin is floating. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • kjennejohnkjennejohn Posts: 171
    edited 2007-06-26 20:26
    Hello.
    The optoisolator will give you maximum isolation.

    kenjj
  • bennettdanbennettdan Posts: 614
    edited 2007-06-26 21:00
    Thnaks for the comments guys.
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-06-27 09:36
    One issue I ran into with a motor controller I built was that although I could technically turn on the MOSFETs, my gate driver (using a 1K pull up to 12 volts) was not producing much current. This isn't a problem if you only turn the mosfets on and off occaisionally, but if you turn them on and off quickly (like for PWM) then the time the mosfet is transitioning can add up and make it overheat.

    What I did for my new controller, is I use a 754410 motor driver chip to actually drive the MOSFET gates, so that it can source more gate drive current than a pull-up resistor if I gate the MOSFETs on and off quickly.
  • bennettdanbennettdan Posts: 614
    edited 2007-06-27 23:13
    Dennis,
    Thanks for your reply I actually ordered some TC 4469 mosfet drivers they have a totempole output and its a quad driver also. I might order some of the 754410 drivers to try out they state in the datasheet they are used in solenoid drive circuits and that is what I am using mine for.

    I have a P channel mosfet I need to drive also, I know the datasheet states you can use it for a H bridge but have you test it with one?
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-06-28 10:33
    If the TC 4469 is the one I'm thinking of, it's probably actually designed to drive MOSFETs. The 754410 isn't really for this purpose, but I believe it will work just fine. Recently, a professor of mine needed to drive up to 1000 serial devices all on the same bus (every device receives the same data), leading to 1 amp or more logic drive current!! He was trying to do it with a 74240 but kept burning them up; I had never heard of using a motor controller chip to drive serial logic lines, but it seemed like a good way to do it and I suggested it - and it worked great for him. So the chips are capable of being put to more kinds of uses than they were designed for.

    I did in fact use P-channel mosfets in the original prototype of my robot motor controller. I thought that they would be a convenience for driving the high side of the h-bridge, but they turned out to be not as worthwhile as I thought. For one thing, P-channel mosfets have higher rds on resistance and can't drive as much current as their N-channel counterparts. The reason why is that with N-channel you are moving electrons, but for P channel you are moving holes. In order to move the holes in the P channel, you are actually moving the electrons around the holes - but many more of them than with the N channel, so it is "more work" and the P channel therefore has more resistance.

    You can in fact drive both the high side and the low side of the H bridge with N-channel mosfets, as long as your high side gate voltage is high enough (possibly higher than the supply voltage!) Many mosfet driver chips will have built-in circuitry to bump up the supply voltage to drive the high side mosfet, and since you are going to need a mosfet driver *anyhow* you don't really save anything by switching to P channel for this. (The 754410 does not include a high-side mosfet driver. I'm referring to dedicated MOSFET driver chips.) Furthermore, although you can drive the low side mosfets directly from logic outputs (not recommended for high switch rates though), you cannot drive the high side P-channel mosfets from logic outputs. The reason why is that in order to turn the P-channel mosfet off, you must get within 2 volts of the supply. If you have a 12 volt supply, for instance, it takes 10 volts at least to turn off the top mosfet! Connecting that to anything but an open-collector logic output will result in a mosfet that never turns off completely.

    However, what I am doing is something completely different than all of this. After messing with H-bridges until I was sick of them (always having shoot-through problems), I now use a hybrid approach where I use a double pole, double throw relay and only a single MOSFET. The idea is that the relay changes the polarity of the output to control motor direction, while the single MOSFET regulates motor speed using PWM. It works well for me, and although the relay is bulky, it is no worse than a MOSFET with heatsink attached, and the relay is easier to drive and immune to shoot-through that plagues H-bridges. People have asked, what about the switching time for the relay? The thing is, you would never want to spontaneously reverse a motor without stopping it first! So in practice the time it takes to click the relay from forward to reverse is irrelevant, because you have to spin down the motor first anyhow. Plus, relays can withstand much more current as long as they are not clicking on and off. Since I only click the relay over with the mosfet already off, and only turn the mosfet on when the relay is closed, my relay contacts should last a long time.
Sign In or Register to comment.