I'm experiencing some ghosting on my 4x4x4 led cube caused by transistors (bc547/bd139/tip122) not "shutting down" fast enough after turning the arduino pin off.
I've come to the conclusion that a bc547 "shuts down" about twice as fast as the the other mentioned transistors, but i still have to use a 1504ns* delay in order to cancel the ghosting out. *(turning a random arduino pin on and off 4 times)
I haven't got a clue how transistors work other than ''base current x gain = collector current".
Can anyone give me some more information on transistor fall (and rise) times, and whether base current, or something else, could help me reduce this fall time?
What's the datasheet say?
There is some delay from the base changing to the collector-emitter channel closing, and depending on how much capacitance is on the output, the output may change slowly, adding a pullup to the collector to bring the non-driven output to the off level would help with that, altho it would raise the load on the NPN some.
Alternately, add a PNP to drive the output to the off state when the NPN is not active. Maybe limit the PNP current so that it is not sourcing too much as it turns off and the NPN turns on.
(use the same control signal - high = NPN on, low = PNP on).
Yes. The base current affects the turn off time. The TIP122 takes about 3us to turn off if you give a negative base voltage to turn it off. See the data sheet Fig 14 :
Figure 14 shows the 3us turn off graph when the base is driven to -5 volts. The negative base voltage extracts a fraction of the base stored charge, the rest of the stored charge must spend a "Lifetime" to recombine the electrons with the holes.
Since most hobbyists do not provide a negative base current during turn-off, your turn off time will be more like 15us. Simply grounding the base resistor will cause slow turn off because the bipolar transistor has electrons and holes stored in the silicon and those carriers must "Recombine" with each other during a "Lifetime".
MOSFETs do not suffer from slow turn off, but bipolar transistors are known for slow turn off. Some bipolar transistors are gold doped to make them turn off faster by the process of recombination near gold atoms which poison the purity of the silicon, reducing "mobility".
One trick to prevent charge storage is to use a schottky clamp diode between base and collector
(this is what TTL logic families "74S" and "74LS" do), which prevents saturation by stealing base
current if the collector voltage drops too low - this minimizes minority carrier density (charge
storage) and speeds switch-off time. The only penalty is that "saturation" voltage is more like
0.4V than 0.1V, probably not an issue for LEDs.
Of course choosing a good high-speed switching transistor in the first place will help. There may
already be some devices available with integrated schottky diode?