I'm trying to control a bank of lights with an external 12V battery. My plan was to use PWM and an NPN in a basic setup such as this: http://yfrog.com/jmledschematicp
. I've put this circuit together but I don't quite understand how transistors behave when one uses PWM at the base of the NPN. if I do this: analogWrite(NPNbase, 128), does the transistor act as if it has 2.5V applied to its base or as if it's being switched on and off rapidly? The reason I'm asking is because I'm concerned about exceeding the max power dissipation of the transistor. When I read the voltage accross the collector and emitter, I get a high voltage as if 2.5V is being applied, not 5V.