Shop OBEX P1 Docs P2 Docs Learn Events
Mosfet driver stuff — Parallax Forums

Mosfet driver stuff

steprogsteprog Posts: 227
edited 2010-10-31 16:46 in Propeller 1
Help,
I'm trying to drive a mosfet with an open drain configuration. To do this I understand that I place a pullup resistor to the prop pin that pulls up the mosfet (n-chan). Then to do open-drain you need to set the outa:= 0 and dira:= 1 which basically makes the pin an output with a value of 0. This should drain the pullup resistor and set the mosfet input to ground.

Okay so far, however to allow the voltage to go to the pullup voltage, you need to let the input pin be "open". So basically you turn the output pin to an input. dira:= 0

Pulling down works fine, however the voltage doesn't float up to pullup voltage, when I set the pin to an input. My pullup voltage is 11 volts. The best it does is 4 volts.

Anyone out there know what Im doing wrong?
Thanks,
Greg

Comments

  • Heater.Heater. Posts: 21,230
    edited 2010-10-31 12:34
    Ouch, don't do that!

    Sounds like you have, if I understand correctly:
    1) A Prop pin as input.
    2) A pull up from Prop pin to 11 volts.
    3) You are expecting the voltage on the Prop pin to get pulled up to 11 volts.

    The Prop pins should not be exposed to more that 3.3 volts!

    If your pull up was strong enough it would surely blow the Prop.

    If you are lucky the internal protection diodes on the Props pins are clamping the voltage to 4 volts (as you say) and saving your Prop from certain death.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-31 12:42
    To turn the MOSFET "on", you need to drive the gate voltage high: OUTA == DIRA == 1. Here's the correct schematic:
    attachment.php?attachmentid=74873&stc=1&d=1288553621

    The MOSFET has to be one that's characterized for low gate drive voltages (e.g. IRF3708). For MOSFETs requiring a higher gate drive, you will need to use a MOSFET driver, such as an MIC4469 (for high-speed switching), or an open-collector NPN (for low-speed switching).

    -Phil
    387 x 253 - 2K
  • steprogsteprog Posts: 227
    edited 2010-10-31 12:47
    Hi Phil,
    I was hoping I could drive this to 10volts. This configuration would only allow 3.3 max is that right?
  • steprogsteprog Posts: 227
    edited 2010-10-31 12:49
    I understand that the input would allow to be pulled up. I guess I don't know the internal circuit very well.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-31 12:49
    steprog wrote:
    This configuration would only allow 3.3 max is that right?
    That's correct. See my added comments in the post above.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-31 12:51
    steprog wrote: »
    I understand that the input would allow to be pulled up. I guess I don't know the internal circuit very well.
    The input can be pulled up no higher than about 3.9V, after which the input protection diodes start to conduct to Vdd.

    -Phil
  • steprogsteprog Posts: 227
    edited 2010-10-31 12:53
    This really bytes,
    I already built the board. The funny thing is that the circuit I was driving turned on the mosfet just fine, however when I turned it off it went in the linear region I guess and fried the mosfet.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-31 12:57
    steprog wrote: »
    This really bytes, I already built the board...
    Looking at the plus side, they're these kinds of lessons that we remember the longest! :)

    Can you unsolder the pull-up and replace your MOSFET with an IRF3708? You should still cobble in a pull-down to Vss to prevent conduction when the Prop is in reset.

    -Phil
  • steprogsteprog Posts: 227
    edited 2010-10-31 13:06
    Hi Phil,
    I'm sure I can get this to work with a little rework as you suggest. Even the mosfet I'm using seems to be happy turned on. However what bothers me is I got 2 H bridges that are both p-channel and n-channel ZXMHC3F381N8 that look to be beautiful chips, but will probably hate those diodes in the input. I don't know why I thought the prop had true open-collector on the pins. I must be getting old.
    Greg
  • tdlivingstdlivings Posts: 437
    edited 2010-10-31 14:58
    @Phil
    Off the topic but I am curious as to what you use to make the circuit drawings in all the great posts you do.
    Thank's
    Tom
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-31 15:24
    Thanks, Tom. I use DesignWorks Lite. It's been discontinued, though, and replaced (sort of) with LogicWorks. (See details here).

    -Phil
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-10-31 16:46
    Thanks for the diagram Phil. I'll add it to my box of tricks for the future.
Sign In or Register to comment.