EveryCircuit
Contact
Reviews
Home
KE4CPC
modified 8 years ago

Solenoid actuation with logic output

2
3
262
05:10:58
This circuit demonstrates the use of a NPN-bipolar transistor to actuate a solenoid (the relay being an example) using the logic output from a control device such as a PIC or Arduino. A couple details to note: 1. When powering a DC solenoid it is important to add a diode in parallel with the coil, with reverse polarity to the input power. The magnetic energy stored in the solenoid when the power is removed will generate electricity as it deactivates. The diode will act as a short circuit for that energy and it will absorb it rather than allowing it to feed back into the transistor or the Logic circuit that drives it. 2. The voltage coming in to the base of the transistor can be anything logic-driven. (1.5v, 3.3v, 5v, etc.) But you will need enough amperage to drive the transistor and allow it to conduct accordingly. Most only require a few hundred micro-amps. Be sure to look up the details of your transistor first. On that same note, be sure your transistor will handle the amperage of the solenoid. Don't use a 200mA signal transistor to control a 5A solenoid!
published 8 years ago
freddyrn
8 years ago
If you are using logic ICs to drive this circuit. May I suggest the addition of an N Channel MOSFET in a common source configuration with a resistor tied up high and the output (drain/resistor) node as the input to the base of the BJT this way the logic IC doesn't actually have to supply any current to drive the circuit. ( FET leagage current excluded ) Then invert your logic signaling.
nim73
8 years ago
This is brilliant, thank you
KE4CPC
8 years ago
@freddyrn A very good suggestion indeed. I prefer a JFET or MOSFET driver in any practical application where a logic driven actuator is used. This was merely an example of theory to expand on.

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy