I have assembled an LED display controller using an Arduino Mega 2560. The controller runs a display sequence on an array of (25) large LED bulbs that draw about 125 mA each. It also has a smaller indicator display of simple yellow LEDs to show the operator what is flashing. The 100K pot is connected to A0 of the Arduino and outputs to PWM on pin 9. Pin 9 then drives and npn transistor that is tied to (2) PNP transistors to regulate the positive 12V and provide dimming.
The trouble I am having is that on some of the flash patterns the bulbs are sequentially turned on together and as they do so they drop in brightness with each step. This happens each time the number of lights is increased. I tried to use capacitors (C3-C5) to smooth out the voltage but it didn't have much effect. There is plenty of power to run all the lights full blast.
I am not sure, but is it possible that driving the base of all of the (16) 2N2222 transistors is too much for the Arduino to handle and causing it to send a decreasing amount of voltage to the bases? I tested the voltage to the base and it does seem to decrease as the number of lights increase by between .01V and .03V. Is that enough to cause a drastic shift in the display? Would a darlington array of transistors to drive the base of the 2N2222 transistors be needed to allow the Arduino to handle them all? I have also seen several LED circuits using inductors that seem to be smoothing out the voltage. Would that be better and how might I implement that on my circuit?
I am mulling over whether to regulate the PWM on the negative side and drive the bases with PWM. Would that require less power? It seems like it would use the same amount to drive the bases. I really appreciate the input.