P-Channel MOSFET woes - anyone know how to drive one of these things with Arduino?

Hi all, I’m a hobbyist trying to build a digital controller / power monitor for a green power generator project built from an auto alternator. Hoping to use an arduino microprocessor & some simple transistor circuits to power an alternator’s field coil which at 13v can draw up to 10amps of power. From what I’ve read I think I need high side PWM switching because the alternator shares a common ground with its other electrical connections preventing me from using my usual novice NPN based bag-of-tricks. From my reading I assume some sort of PNP or P-Channel MOSFET is in order (components I sadly have no prior experience with). Alternativly I've read about using fancy high side controller ICs to drive regular NPNs but don't want to go that route.

So far everything seems to work except I clearly can’t figure this P-channel MOSFET out (IRF6540)!  No matter what I try I always get a high voltage at the drain pin (full-on condition) regardless of what I do to the gate pin. I uploaded a portion of my schematic as a test circuit I think should work from my limited understanding and online tutorials: http://www.curtismasonjohnson.com/sandbox/ProblemCircuit.JPG
  - The NPN driver in the drawing (2N3904) by itself works when tested with a voltmeter and toggling the input
  - If I replace the p-channel mosfet with a PNP transistor it work as expected. Shouldn’t this mosfet work pretty much the same? My puny TIP127 PNP can't handle the current if I were to hook up the load.
  - I’ve tried several IRF6540 components
  - I’ve tried connecting the MOSFET’s ground pin via a current limiting resistor directly to ground. Also via the resistor to 13v. No voltage change on the drain pin in either case.

Clearly I’m missing something embarrassing and fundamental. I mentioned I’m a hobbiest, right - my day job is managing global marketing programs for fortune 500s and don't know anyone that knows anything about electronics! After years of electronics & robotics projects I’ve yet to be stumped to the point of needing help til now - amazing how much you can self-teach via google and such. This one has me beat – hope someone can help as I have no idea what to do next! Truely appreciated...

ProblemCircuit.JPG
Full curcuit so far - work in progress.JPG
17 answers
sort by: active | newest | oldest
Jan 12, 2013. 3:04 AMsteveastrouk says:
The NPN transistor is wired backwards !

I'd like to see a resistor in the base of the NPN too, to stop you punching a hole in it

Connect the emitter to ground. put the resistor from +12 to the collector, connect the collector to the gate of the MOSFET. Field wiring is JUST like a solenoid, you HAVE to put a diode across it to freewheel the current when the mosfet's off.

Put a 10K resistor from 12V to the gate.

Jan 12, 2013. 4:07 AMsteveastrouk says:
...on reflection, make that 10K 100K.
Jan 12, 2013. 12:09 PMsteveastrouk says:
I think you are confused (and confusing.....) about emitters etc. Only bipolar transistors have emitters and collectors and bases. Fets have drains, sources and gates.

I wouldn't trust the body diode for the field of a motor, and besides, that energy has to go somewhere. You don't want it pumped onto your supply rails, or you could blow everything. Put the flywheel diode in.
Jan 14, 2013. 2:44 AMsteveastrouk says:
You've got to remember FETS are different working principles from BJTS, they have three wires, and control currents and voltages, but there the similarities end.

YES. the diode MUST be in parallel with the load. Yes, it provides better protection, and protection in the right way.

Steve
Jan 12, 2013. 1:23 PMiceng says:
Your still mixing names
Bipolar-Transistors.jpg
Jan 12, 2013. 12:03 PMsteveastrouk says:
Got a load on it ? No load - no voltage drop.
Jan 14, 2013. 2:49 AMsteveastrouk says:
Keep the gate tied to the source with a high value resistor. Use a more realistic load, like 200 Ohm. 6 mA isn't realistic !

Jan 16, 2013. 12:07 AMsteveastrouk says:
Does it start "off" and turns on once ?
Jan 17, 2013. 3:09 PMsteveastrouk says:
Measure Vgs directly, on the pins of the mosfet.
Feb 28, 2013. 4:58 PMsteveastrouk says:
Weird one that. Not impossible that the devices were stocked faulty

Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!