Help with p-channel mosfet circuit

I am considering some new alternatives for a circuit that sends a slow Arduino PWM signal to a SSR which controls an electric heating element.

Right now, the circuit consists of a low side switch with NPN transistor (2N3904). That configuration is fine for many situations, but sometimes the output is used for something besides driving a SSR. In those instances it would be more convenient if the load were tied to ground and the 5V side were switched.

So I am looking at a high side switch instead. Right now I have the replacement circuit tentatively drawn with a PNP (2N3906) and 1K current limiting resistor between the gate and Arduino pin D10 (see attachment). (Note, there are obviously two outputs shown in the figure, but I will arrange them both the same).

Would an IRLML5203 p-channel be a suitable replacement for the 2N3906? As the figure shows, it has to carry max. 200mA.

If I use a p-mosfet, I (think I) know that the current limiting resistor isn't needed between D10 and the gate. But do I need a pullup to keep the gate high until D10 is done being configured as an input? Is there any other reason to have a pullup on the gate?

Any suggestions about a more suitable mosfet, and/or circuit configurations would be really appreciated.

Jim

I guess my first question is... why so complicated?

A typical SSR (at least the kind I'm thinking off) is the equivalent of an LED... and more precisely... an LED in an OPTO-COUPLER... and in most cases... like an LED with an embedded current control resistor. You should only likely see a draw of 10-20 mA by the SSR.

Is the complicated drive circuitry there because you have a very special SSR?

Most SSR's are designed to be driven by logic level signals directly.

If you come up with a different solution than an SSR... design a custom circuit for that. Off the top of my head, I really can't think of a good general purpose case that REQUIRES high side switching with the exception of circuits in cars..

Thanks, Paul.

Of course, you are absolutely correct about the SSR current demands. The board hosting this sub-circuit supports a variety of temperature control applications, and I wanted it to have the flexibility to drive larger loads.

The extra complication is there to provide flexibility, even though most SSR's can be driven more easily. I would still like to at least be able to evaluate a mosfet-based high side switching arrangement, even if in the end it turns out to be something to just file away for a future need.

Jim

Hi Jim,

As Paul says, you can drive an SSR direct from an Arduino pin. If you want to use a p-channel mosfet as a high side switch, them that device you picked should be good for switching up to about 1.5A before it gets too hot. You do need a pullup resistor to keep the mosfet turned off until the Arduino output pin has been initialized. It's usual to connect a series resistor of between 100 and 220 ohms between the pin and the gate. This is to limit the peak current when the pin switches state, causing the mosfet gate capacitance to charge and discharge - although limiting the current in this way this is more important for high power mosfets with larger input capacitance.

Thanks for that information. Very helpful.

I have also learned recently of an IC family that looks like a good option: LMN400 or LMN200 from Diodes incorporated. These devices bundle an n-channel MOSFET (to drive the gate) and PNP to do the heavy lifting.

There are also some other similar load switches that use a p-channel MOSFET in place of the PNP.

Using one of these load switches keeps the polarity of the signal the same as my current config so I wouldn't have to rewrite any code.

Jim

JimG:
I have also learned recently of an IC family that looks like a good option: LMN400 or LMN200 from Diodes incorporated. These devices bundle an n-channel MOSFET (to drive the gate) and PNP to do the heavy lifting.

The main advantage of those devices is that you can use them to high-side switch a voltage greater than 5v.

JimG:
Using one of these load switches keeps the polarity of the signal the same as my current config so I wouldn't have to rewrite any code.

One of the main reasons to use a microcontroller is that it lets you keep the hardware simple by doing the rest in software. Changing the polarity of an output pin should be a minor change, not a rewrite.

dc42:
One of the main reasons to use a microcontroller is that it lets you keep the hardware simple by doing the rest in software. Changing the polarity of an output pin should be a minor change, not a rewrite.

The difficulty would have been modifying existing code to autodetect "old" boards that use the present NPN open collector configuration! Avoiding this complication is a nice side benefit to going with an arrangement that drives the gate with an nmosfet.

Jim