I got a shift register which I use to PWM LEDs. Since I multiplex this toggling I noticed some "afterglowing" if the next LED is not active of the same color. (RGB cathode) Multiplexing by the MOSFET and PWMing by the PNP.

I already found out, that it is not the MOSFET which is too slow. So I tried increasing the toggling speed of the PNP but I was not sure how to do so. I thought of pulling it up, so I tried it with some high resistors around 1-5k but this does nothing. After this I used smaller till I used the 20Ohms and noticed that the glowing is extremely minimal now.

So my question is, how do I do this right? Sure it does work now but I'd like to understand how to increase the speed to some kind of maximum. Is there a better solution which I can do even after soldering the 510? I can't change the 510 Ohm and 120 Ohm in front of the PNP and MOSFET since I already soldered them but I can add a line to pull them all up for example.

Down here some example how it looks:


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ 20 ohms on the output of the74HC595 renders it unusable. \$\endgroup\$ – Andy aka Nov 12 '14 at 13:03
  • \$\begingroup\$ But it works as it's drawn here. I know that the I should be to high i guess. ~25mA and the 74hc595 can handle 20mA. But if i use the next higher (47 Ohm) i still do have the gloweffect. \$\endgroup\$ – BennX Nov 12 '14 at 13:04
  • 1
    \$\begingroup\$ Show a circuit that works (but with afterglow) then ask the question. At the moment you are confusing the issue with a "possible" solution that cannot work correctly. \$\endgroup\$ – Andy aka Nov 12 '14 at 13:17
  • 1
    \$\begingroup\$ updated the circuit. This seems to be to slow. If i reduce my multiplexing frequency it gets less afterglow. \$\endgroup\$ – BennX Nov 12 '14 at 13:20
  • 1
    \$\begingroup\$ I guess it's still not clear to me how the "next" LED interfaces with the circuit you have drawn. \$\endgroup\$ – Andy aka Nov 12 '14 at 13:34

Human eyes have a log response, so losing a bit of brightness is a lot less undesirable than some brightness where it doesn't belong.

The "right" way to do this, in my opinion, is to insert some dead time so that the drivers have a chance to settle out. IOW, turn off the one driver, wait and wait and wait (that's 3 microseconds perhaps) and then turn the (updated) drivers back on.

How fast are you multiplexing? Don't go excessively fast, there's no advantage. The 74HC595 is a push-pull output and it will suck the charge out of the base of the PNP pretty fast as it is. You could try ~100pF across R2 or (!) a Schottky clamp diode from the collector to base, but we're talking a visual display here, presumably, so that's a bit silly.

Edit: The 100pF is called a "speed-up" capacitor. It allows the 74HC595 p-MOS transistor to remove the base charge more quickly. Ideally it has a a value to give a rectangular waveform as shown below- 0.1uF is too large, you should need no more than a couple hundred pF. This page is well worth reading, and below image is taken from there. See also this answer.

enter image description here

You need one per transistor, same as the resistors. If it's SMT you could retrofit by putting a small cap literally on top of the resistors.

  • \$\begingroup\$ Yey you are right its for some visualisation. A 0,1uF did it! It has a slightly glow of all now but hard to see. Can i use one 0,1uF for 25 PNP resistoers or do all need "their" own? (got 75PNP and 5Mosfets in total to pwm 125 leds at the time) Could you shortly explain why this works i have a guess but i am not sure? \$\endgroup\$ – BennX Nov 12 '14 at 13:53
  • 1
    \$\begingroup\$ See edit please. \$\endgroup\$ – Spehro Pefhany Nov 12 '14 at 14:39
  • 1
    \$\begingroup\$ Yes, it would work for a MOSFET. The "cap inside" is the combination of the gate capacitance and Miller (drain-to-gate) capacitance, and it is what you are fighting to get it to switch quickly. What would be more effective would be to parallel R4 with a diode (so it conducts when the MOSFET is turning off), and you could actually increase R4 to make it turn on more slowly and off more quickly. \$\endgroup\$ – Spehro Pefhany Nov 13 '14 at 15:47
  • 1
    \$\begingroup\$ Humor me and try the slow on/fast off idea. \$\endgroup\$ – Spehro Pefhany Nov 13 '14 at 17:48
  • 1
    \$\begingroup\$ Well i am sure you are way better/you know way more about electronics than me so sure i trust you but i dont got diods by hand. Somehow i forgot to order them when i created my basket for the cube. Got hell alot of resistors and so on but no diods... Who could know that i need them. laugh What effect does it have if i slow down the "ON" of the mosfet? I dont get the reason not to "push the leds up" \$\endgroup\$ – BennX Nov 13 '14 at 17:53

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.