I would appreciate help with the following problem:

Get 12V PWM-modulated from a microcontroller-generated 5V PWM.

• IRLML2502, n-channel FET - Datasheet
• Resistors R1 (56 Ohm) and R2 (6K8 Ohm)

Reduced schematics:

reduced schematic

Drain is always around 12V (100% duty cycle) - independent of gate duty-cycle.
All my IRLML2502 show the same behaviour.

What I checked:
• Scope shows correct duty cycle(s) on gate.
• Gate voltage either 0V or 5V.
• Source voltage is 12V as expected.
• Checked pin-correctness various times.

My Request:
Please tell me, if you see any obvious problems.
Please point me in a direction to perform further checks.
Please be kind, i am no native electronics guy :)

Thank you very much for your help!

Best regards,

  • \$\begingroup\$ I think you have your circuit backwards (and it's drawn upside down, which is really confusing, and please, use real component symbols not drawings of the component package) \$\endgroup\$ – Majenko Dec 13 '14 at 22:26
  • \$\begingroup\$ Hint: There's a reason why CMOS circuits have the positive supply on "Vdd" and the negative supply on "Vss". \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 13 '14 at 22:28
  • \$\begingroup\$ @Majenko Schematics will improve as soon is a understand Eagle better, promise! Could you elaborate on "you have your circuit backwards"? I know this might sound silly, but i am really no electronics guy... \$\endgroup\$ – R2D2 Dec 13 '14 at 22:33
  • \$\begingroup\$ @R2D2 My answer explains all. \$\endgroup\$ – Majenko Dec 13 '14 at 22:35

You are using your MOSFET backwards. your circuit, re-drawn the right way up, with proper symbols, is this:


simulate this circuit – Schematic created using CircuitLab

Note: I have added the body diode specifically to highlight the problem.

An N-channel MOSFET should be used as a low side switch, not a high side switch. That specific MOSFET, the gate has to be at least 1.2V higher than the source for it to switch on. Since your source is 12V that means your PWM signal would have to reach as high as 13.2V to turn the MOSFET on. Not that it'd make much difference, since the diode bypasses the MOSFET anyway.

So, either turn the MOSFET over and use it to switch the GND wire of whatever you're switching, or use a P-channel MOSFET to switch the 12V.

For low side switching the circuit would be:


simulate this circuit

| improve this answer | |
  • 1
    \$\begingroup\$ Just a minor correction: N-channel MOSFETs ARE sometimes used as high-side drivers, although the drain goes to the positive supply and the source goes to the load. Special gate drivers are used to bring the gate voltage above the supply voltage to turn it on (as you noted). \$\endgroup\$ – Tut Dec 13 '14 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.