Just wondering how to approach this....obviously there's a 20mA limit on a PIC pin (not to mention a 5V limit too).
I don't want to 'feed' the LEDs from the 5V rail as that will stress the overworked (small) regulator I'm using, but rather I would like to sink the current from the raw unregulated 9V rail (a PP3 battery)....I realise this approach probably isn't optimum, as because when the battery voltage level starts dropping, so will the current through the LEDs...and therefore the brightness (I was thinking of compensating the falling battery voltage by monitoring the battery level through a potential divider into an ADC pin, then adjusting the PWM duty cycle ceiling as the battery voltage falls)
my question is, how should I approach this?
Would something like the circuit I've lashed up below suffice?
(if it's not clear - RC5 is a PWM pin that feeds the PNP transistor, which in turn sinks current from the 9V rail, through the LEDS into the PIC pins (ie set LOW to enable the LED)
Are there any specific (SMD) PNP transistors that work well in this situation?
Bookmarks