Tutorial: How to design a transistor circuit that controls low-power devices
Why Electrical Engineering Stack Exchange recommends it
Electronics Stack Exchange users link it when someone needs to switch a relay, motor or other load from an Arduino or similar microcontroller pin with a transistor.
Recommended by 2 people across 2 different months, 2015 to 2020.
What it is
A 2011 Applied Science tutorial by Ben Krasnow on designing a simple transistor switching circuit so a microcontroller or other small signal source can drive low-power loads such as solenoid valves and motors. It is a hands-on walkthrough of the design reasoning rather than just a finished schematic.
What people said
Strong rec Aaron · 2017-01 · Electrical Engineering Stack Exchange · on “Arduino MKR1000 relay transistor”
I'd use a transistor circuit for switching in that case.. I'm a big fan of Ben Krasnow [LINK] He has an excellent youtube page and in particular a video [this video] on designing transistor switching circuits for microcontroller applications
Recommends raek · 2015-07 · Electrical Engineering Stack Exchange · on “How to modify existing circuit to additionally control it from outside by raspberry?”
The purpose of the 4017 IC in this circuit is to "remember" whether the relay should be on or off. If you control the relay using software in a microcontroller (an Arduino, Raspberry Pi, etc), then you can simply store that state in a variable in the program instead. The 4017 IC is used here as a one-bit toggle-able memory and can be replaced by the microcontroller. That way, you also don't need to "send the light status" to the microcontroller, since the microcontroller is the device that gets to decide the on/off state, and thus already "knows" the state. The only parts of the circuit you need to keep are: The relay, of course. The snubber diode connected in parallel to the relay (importan
Cites Jon Angliss · 2020-03 · Electrical Engineering Stack Exchange · on “2N2222 as a switch”
I'm looking to drive a relay on a 5V rail from an Arduino 3.3V pin. Obviously the Arduino I'm using doesn't have the voltage to drive the 5V relay, so that's where the 2N2222 comes in. To test out the circuit, I figured I'd substitute an LED for the time being. My circuit looks like this. simulate this circuit [LINK] – Schematic created using CircuitLab [LINK] Using a standard, run of the mill, red LED, we say the voltage drop is 2V, and requires 20mA. Using Ohm's law, that gives us a resistor of 150 ohms, correct so far? For the sake of easy math, we'll say h fe is 100. My understanding is that I c is I b x h fe . So we have 20mA = I b * 100. Giving us I b of 0.2mA. Using Ohm's law again, a