Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Using a Transistor Switch with a Raspberry Pi, Arduino and Micro:Bit

This video shows practical examples of the transistor switch in use.

The first example uses a transistor switch to control a large bright LED from a Raspberry Pi. The circuit can also be used with the Arduino and Micro:Bit especially if you increase the number of LEDs being switched.

Breadboard circuit of an transistor switch controlled by a Raspberry Pi, switching an LED

The example code provided can be used on a Raspberry Pi (using GPIO Zero) an Arduino (using the standard blink example) and the micro:bit using simple block code. The Raspberry Pi source code is available from my book page.

Darlington transistor circuit

The second example features a darlington transistor used to switch a much larger light. There are 2.5W LED lights from PoundLand

PoundLand LED bulbs used in a darlington transistor switch project with a Raspberry Pi.

These need the extra gain from the darlington pair to ensure they can be fully switched on using the small current available from a Raspberry Pi GPIO pin. The circuit diagram is shown below.

Schematic circuit diagram for a Raspberry Pi Darlington Driver Circuit.

More examples

Previous Circuit and PCB design in KiCAD
Circuit and PCB design in KiCAD
Next Disco lights
Disco lights