Automotive PWM control of p-channel MOSFET (IRF4905) as high side switch

Hi, I'm sure a long way back in this thread I asked why you aren't using dedicated Automotive High Side Switches. They are purpose built for your application.

With your - and others' - help and patience, we wound up with a 5 component, 12 pin solution (the other stuff would have to be there anyway). I could not have hoped for anything simpler, and I suspect could not have come up with a much better, generalized solution using a driver chip.

Tom... :)

TomGeorge: Hi, I'm sure a long way back in this thread I asked why you aren't using dedicated Automotive High Side Switches. They are purpose built for your application.Tom... :)

My initial take on them was that they are a bit slow for PWM. This appeared to have been corroborated by other contributors.

I would be ecstatic if you find me something like that that can manage 10A per channel at PWM rates north of 980Hz! :D

Cheers! Dirk

You don't actually need to run at 1KHz or so. 100 Hz is plenty for incandescent lamps. I dim LED lamps using PWM at 250Hz. It just relies on persistence of vision just the same as you TV does.

NOSUM: You don't actually need to run at 1KHz or so. 100 Hz is plenty for incandescent lamps. I dim LED lamps using PWM at 250Hz. It just relies on persistence of vision just the same as you TV does.

Thank you for your take on this, NOSUM. You're absolutely right about persistence of vision. There are other, more subtle reasons for going with a higher "flicker" rate; mostly this relates to how LEDs actually turn completely on and off (vs partial dimming for other types of light), and the effect that can have on people. Also, and to me primarily, this project is more about learning - i.e. the goal was to minimize the heat produced by minimizing the time taken to switch PMOSFETs on and off. It was nearly incidental that it wound up in a circuit likely capable of PWM rates in the 10s of kHz - perhaps significantly faster than the Arduino is comfortable producing. ;D

Cheers! Dirk

Hi again. I don't know what country you are doing this in. I'm in the UK and if as it seems you are planning to dim headlights on a car it would be illegal here.

NOSUM: Hi again. I don't know what country you are doing this in. I'm in the UK and if as it seems you are planning to dim headlights on a car it would be illegal here.

I'm in Canada, and, as far as I know, dimming headlights is illegal here as well. ...at least the way this circuit might allow, that is.

This project's first implementation will be as a turn signal flasher replacement. Entirely unnecessary, but I'm enamored with the idea of emulating the behaviour of incandescents with LEDs. :sunglasses: The Arduino sketch will employ fading effects while turning LEDs on and off to emulate the slow turn-on/off times of incandescents. I also have ideas for combining existing switches to generate other turn signal light flashing effects.

The other possible applications for this project include managing other lights, but that would be strictly for "off-road" use (i.e. leading parades, car shows, etc.)

My passion is driving, and I've been thinking of learning more about electronics for a number of years. This project has finally motivated me to engage in that more fully. :D

Cheers! Dirk

PS Your support in this topic has been utterly amazing, NOSUM. It is unlikely I would have made it to the end here without your - and others' - help. I'm now engaging in challenges with this project's power management at Automotive Human switching and power management. I'd be happy to see you and your contributions there. :)

Brief re-visit:

I’m in the process of finalizing some other stuff and when I reviewed the bits this topic contributes to my project, I noticed that it uses a “regular” diode (1N4001) at D1.

05_switchtest_11_schem.gif

I now understand most of what this circuit does, but there was talk about specifically why a diode was used here instead of PNP BJT; I believe it was related to how a diode behaves, but cannot determine if this was specific to the type of diode.

So, my question is: Is there any functional reason D1 can’t be replaced by a Schottky (1N5819)? Like:

05_switchtest_12.gif

From what I’ve been able to figure out, the main differences between these two diodes is that the 1N5819 is faster in recovery and has a lower Vf. (I would tend to think that this would help here. …but I’ve been wrong before. :confused: )

NB As I’d hoped, I was able to make D2 unnecessary.

Cheers!
Dirk

Hi,
05_switchtest_12.gif
When Q2 is OFF, there will be no current flow through D1 or Q1.
So they will be OPEN, this leaves the gate of Q3 floating.
Not a good thing as Q3 will stay ON after Q2 has been ON and Turned Q3 ON.

In fact not sure why you have Q1 and not just a resistor to keep Q3 Gate at Q3 Source potential when Q2 is OFF.

D1 as a Schottky is OK.

Tom… :slight_smile:

TomGeorge: When Q2 is OFF, there will be no current flow through D1 or Q1.

Um, are you sure? When Q2 is off, the current through R2 has nowhere to go but Q1's base, turning it on, which in turn provides power to Q3's gate, turning Q3 off.

TomGeorge: So they will be OPEN, this leaves the gate of Q3 floating. Not a good thing as Q3 will stay ON after Q2 has been ON and Turned Q3 ON.

At one point, I did actually have Q3's gate floating. Not good. Pretty sure it doesn't here.

TomGeorge: In fact not sure why you have Q1 and not just a resistor to keep Q3 Gate at Q3 Source potential when Q2 is OFF.

This is a part which I don't understand completely. However, I'm pretty sure this arrangement contributes to speeding up Q3's gate transitions (the main goal in this topic has been to mitigate heat production in Q3 due to switching).

TomGeorge: D1 as a Schottky is OK.

I thought so. Thanks for your corroboration. Tom. :)

Cheers! Dirk

Hi,

Um, are you sure? When Q2 is off, the current through R2 has nowhere to go but Q1’s base, turning it on, which in turn provides power to Q3’s gate, turning Q3 off.

Through Q2 base then where?
05_switchtest_12Edit.jpg
Tom… :slight_smile:

TomGeorge: Hi,Through Q2 base then where?

Current at Q1's base "turns on" Q1, allowing current to flow via CE through R3 to Q3's gate. Are you saying there's not enough current there for Q3's gate?

Note: I've breadboarded this exactly as shown and it works.

Cheers! Dirk

Hi, You must have leakage somewhere to help your circuit, probably through Q1.

Tom.... :)

Hi, [sarcasm] Did you say you were breadboarding??????? [/sarcasm]

Good stuff..

Tom.... :)

What's the problem?

As shown with Q2 off, Q1's b and c go to +ve , Q1's e and Q3's gate go to about 0.7v less, , and no current then flows.

Allan

allanhurst: What's the problem?

As shown with Q2 off, Q1's b and c go to +ve , Q1's e and Q3's gate go to about 0.7v less, , and no current then flows.

Just to confirm, you're saying "and no current flows" through Q3 when Q1 is turned on. Correct? (That is the intent in this circuit; Q3 should be off when Q2 is off.)

TomGeorge: You must have leakage somewhere to help your circuit, probably through Q1.

My previous question stands: Are you saying there's not enough current there for Q3's gate?

Rephrased: When sufficient current is applied to the base of Q1, it turns "on" - current is provided via its collector/emitter path to saturate Q3's base sufficiently to deny a current path from its source to its drain?

TomGeorge: [sarcasm] Did you say you were breadboarding??????? [/sarcasm]

Good stuff..

I can tell you, as a noob, I absolutely [u]love[/u] seeing something actually work. I should add that I still tend to ensure I understand everything first, then try to set my place on fire. :o

Cheers! Dirk

Q3 gate has a large capacitance - several nF . Hence when Q2 goes from on to off, current flows through Q1 into the gate charging that capacitance until it's voltage reaches about 0.7v less than the +ve supply.

Q3 is then off.

Then the static state is as I said - no more current flows.

Allan

allanhurst: Q3 gate has a large capacitance - several nF . Hence when Q2 goes from on to off, current flows through Q1 into the gate charging that capacitance until it's voltage reaches about 0.7v less than the +ve supply.

Q3 is then off.

Then the static state is as I said - no more current flows.

Thank you for the clarification, Allan.

Cheers! Dirk

Q1 is what's called an emitter follower whereby the emitter follows whatever the base is doing with a differential of 0.5 to 0.7V depending on load. What happens with your circuit is that Q1 is turned on by R2 when the gate of Q3 is more negative by 0.7v or so than the 12V supply. Q2 then discharges the gate of Q3. When the gate source voltage is reduced to or below the Vbe of Q1, Q1 turns off. Q3 gate may then start to charge up again due to external influence. If this happens then the emitter of Q1 will be drawn down towards 0V which will then turn Q1 on again and will discharge the gate of Q3 again. OK?

NOSUM: OK?

Yep; OK. I'm sure your description is more accurate than mine, but I see the consequences/effects as being exactly as you describe. It was TomGeorge who seemed to think there was something hinky...

PS I tend to think in more black and white terms, but I'm slowly coming around to the more analogue-y way things actually work, thanks to you and few others around here. :)

Cheers! Dirk