I would like to use the state of an output pin to control switching of a transistor so that I can turn on/off 6 LEDs. I know that 6 leds is too much for an output, but shouldn't be for a transistor.
Using an NPN transistor, like N3904 for example (I have them on hand), how would I go about figuring out how to do it? My biggest problem is in figuring out how to stay within device limits. For instance, I'm not sure how much voltage/current is coming out of the uC output pin and going to base, and if I need a resistor between the two.
Also, from say a 9 or 12V + power source through the led's in series to collector, I'm almost certain a resistor would be required there. But then I face the problem that if an LED Vf is 2.0 volts, that means each one eating off 2 volts I'd be left with 0 volts if using 12V power supply, so can I break the LEDs up into 2 groups of 3 but still control them off of one transistor connected to 1 uC output pin?
Dealing with certain electrical characteristics confuses me, and I don't know much about the operating/wiring characteristics of transistors yet. Even after looking at the datasheet of the N3904 and reading the AAC book on bipolar transistors. Ugh!
Using an NPN transistor, like N3904 for example (I have them on hand), how would I go about figuring out how to do it? My biggest problem is in figuring out how to stay within device limits. For instance, I'm not sure how much voltage/current is coming out of the uC output pin and going to base, and if I need a resistor between the two.
Also, from say a 9 or 12V + power source through the led's in series to collector, I'm almost certain a resistor would be required there. But then I face the problem that if an LED Vf is 2.0 volts, that means each one eating off 2 volts I'd be left with 0 volts if using 12V power supply, so can I break the LEDs up into 2 groups of 3 but still control them off of one transistor connected to 1 uC output pin?
Dealing with certain electrical characteristics confuses me, and I don't know much about the operating/wiring characteristics of transistors yet. Even after looking at the datasheet of the N3904 and reading the AAC book on bipolar transistors. Ugh!