Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Trying to figure out IRF4905 Mosfet & a PIC

Status
Not open for further replies.

dbachman

New Member
Hi,

I am connecting the PWM output of a PIC to the gate of an IRF4905 Mosfet.
On the drain side is connected to ground thru a 100 ohm resistor. The source side is connected to +5vdc with the same ground reference as the pic. Everything works great. But, if I change the source voltage to +12vdc with the same ground reference I just see the 12 vdc on the scope and no pwm.
Has anyone got any ideas what I am doing wrong?

Thanks, Don
 
To turn a MOSFET off, the gate to source voltage has to be zero volts. When you connect the source to +12V, you still have 7V Vgs, when you want it to be off.
To turn it on, you need the gate to be at least 10V more negative than the source. With 5V on the source, you cannot satisfy that condition.
If you need a high-side switch on +12V, you will need a level translator. What you can use depends on how fast the load needs to switch.
Can you use an N-channel MOSFET, and switch the low side of the load? Logic-level MOSFETs in N- and P-channel are available. They will switch with only 5V Vgs.
 
Last edited:
Hi Ron,

Thats exactly what I was seeing on the scope (I was varying the +12vdc on the source)
I will try a N channel logic level. Do you happen to know of one off hand? I think an IRF510 is one but I will Google it and find out. Thanks for your help.

Don
 
An old IRF510 needs 10V on its gate to turn on completely and its on-resistance is high.
An IRF3711Z and many more turn on completely with a gate voltage of 4.5V or more.

It has a pretty high gate capacitance so a PIC's max allowed output current of only 25mA can't charge and discharge it quick enough for high frequency switching.
 
The datasheet will generally say if the part is a logic level MOSFET, but if in doubt, look at the Rds (drain-source resistance) spec and see what Vgs voltage it is spec'ed at. The IRF510 is spec'ed at 10V Vgs, so it is not a logic-level MOSFET.
I don't have any part numbers at my fingertips, but you can find them by Googling "logic level MOSFET". Be sure you one you pick can handle your load current and voltage. What are you driving?
 
Hi Don,

If you decide to use a low side switch the PWM output will be
the opposite of what you want to achieve, the wider the pulse
the lower the power supplied to the load.
In case you have a transistor and two resistors on hand you
could give this a try.

on1aag.
 

Attachments

  • High side mosfet driver.PNG
    High side mosfet driver.PNG
    15.8 KB · Views: 1,069
  • High side graph.PNG
    High side graph.PNG
    15.6 KB · Views: 451
Hi on1agg,

Is there a reason why this circuit(which maintains the PWM pulse duty cycle) can't work satisfactorily?
 

Attachments

  • PWMls.gif
    PWMls.gif
    21.6 KB · Views: 682
Hi EBLC1388,

Your circuit should work equally well, although the base current
of the 2N2369 is a little bit high. (I would increase the value
of R4 to 2k7.) But I already uploaded circuits similar to yours:

https://www.electro-tech-online.com/threads/adding-a-component-to-a-simple-2n7000-circuit.42489/

And . . . I noticed that Rube Goldberg was sniffing around so I
gave it a little twist. :D

on1aag.
You would need to invert the input, relative to the circuit you posted. I believe this could be done quite simply with 13 NPNs, 2 PNPs, a unijunction transistor, a couple of varicaps, and a beam power pentode. Oh, yeah, and a hand full of resistors and capacitors and zeners and LEDs and...

EDIT: I forgot the ball of twine, some pulleys, a BB gun, and a water balloon.
 
Last edited:
Hi Ron,

You're right, the inversion of the signal was the reason for
the twist in the circuit. It was already 4.27 a.m. when I
posted the reply.
I had gone to bed already but I had forgotten to take
my blue pill so I fell out of bed and landed on the floor.

on1aag.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top