PDA

View Full Version : Mosfet driver stuff



steprog
10-31-2010, 07:24 PM
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

Heater.
10-31-2010, 07:34 PM
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)
10-31-2010, 07:42 PM
To turn the MOSFET "on", you need to drive the gate voltage high: OUTA == DIRA == 1. Here's the correct schematic:


http://forums.parallax.com/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

steprog
10-31-2010, 07:47 PM
Hi Phil,
I was hoping I could drive this to 10volts. This configuration would only allow 3.3 max is that right?

steprog
10-31-2010, 07:49 PM
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)
10-31-2010, 07:49 PM
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)
10-31-2010, 07:51 PM
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

steprog
10-31-2010, 07:53 PM
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)
10-31-2010, 07:57 PM
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

steprog
10-31-2010, 08:06 PM
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

tdlivings
10-31-2010, 09:58 PM
@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)
10-31-2010, 10:24 PM
Thanks, Tom. I use DesignWorks Lite. It's been discontinued, though, and replaced (sort of) with LogicWorks. (See details here (http://www.capilano.com/Discontinued%20Products)).

-Phil

Bob Lawrence (VE1RLL)
10-31-2010, 11:46 PM
Thanks for the diagram Phil. I'll add it to my box of tricks for the future.