In: Electrical Engineering
If you want to operate an led bulb with a 12V battery as a single source using an NPN transistor as a switch and a microprocessor controller (such as Arduino), draw a circuit diagram for this setup, label all components and describe your approach.
I will give you an general approach of using NPN transistor as a switch and a microprocessor controller.
Here 12V source is connected for powering Microprocessor as well as Vcc for Transistor. Transistor acts as a switch through the base voltage control which is being supplied through the data pin of microprocessor. When the base voltage is greater than 0.7V, the transistor starts saturating and it is like a short circuit between collector and emitter. When the base voltage is less than 0.7V, the transistor is in cutoff mode and no current flows. Here it looks like an open circuit between collector and emitter. Here base current becomes zero.
Now, here resistors are basically used for limiting the current. LED bulb comes with certain power rating. So that high current does not flow and damage the LED bulb, a resistance in series with it is added. The series resistor between microprocessor and the base limits current into the base. The base-emitter junction get its Vbe of 0.7V, and the resistor can drop the remaining voltage.
Since the rating of the LED bulb and specific transistor model was model was not given, hence I have explained the general apporach.