Hi,
I'm working on a little project where I'm switching LED's with a shift register. So far I've been running the LED's straight off the IC and it's been working ok - I haven't hit the current limit yet. However, I wanted to add the ability to dim the lights with a pot so I have to re-think my design.
My thinking is that I need to have a separate power rail for the lights and switch the lights with a transistor. The problem is further complicated because I need to have the switch on the positive side of the light because I'm using RGB leds with a common cathode and want to switch the channels individually.
I've thrown together this circuit on a breadboard with parts I had laying around:
http://jasongilholme.com/wordpress/wp-content/uploads/2016/10/led_high_side_switch.jpgThis is taken from an example on the internet and it works ok. I do have a few questions though.
1) How do the values of R1 and R2 affect this circuit?
2) With the variable VCC and either 3.3 or 5v logic level, are there any traps to look out for?
3) What common transistors would be suitable for my application? The current is only a few mA but I'd like to be switching this quickly (multiplexing application)
4) Is there anything obvious missing? or some good enhancements?
Sorry for the rather vague questions, but the theory of transistors is a bit lost on me and I'm pretty new to electronics. I need to put some time into this circuit and experiment with it some more.
Any tips for the circuit or ideas for things to try would be appreciated.
Jase