How do you wire a transistor as a switch?
Explanation:
The diagram below shows how to configure a transistor to act as a switch:
Hence, the output of the component that will turn on the transistor is connected to the base of the transistor when it is used as a switch in a circuit. The emitter should be connected to the circuit's ground. The load that the transistor will turn on as well as the circuit's supply voltage must be connected to the transistor's collector.