I'm looking to drive a 12v solenoid from a Raspberry Pi's GPIO. I have been looking at using a S8050 Transistor, however have been looking at the datasheet and have been struggling to determine whether it is suitable or not.

The \$ V_{cbo} \$ and \$ V_{ceo} \$ are both comfortably over the 12V required for the solenoid, however the \$ V_{ebo} \$ is 5V.

I apologise, I'm still quite new to the specifics of transistors, I'm aware of how to use them (I think!) but I'm not confident with specifying them, and assessing whether they are fit for purpose. Would anyone mind perhaps explaining whether or not this transistor would be suitable to drive this solenoid and why, and what I should be looking for when specifying a transistor please?

I have attached an image of my simplified circuit diagram below.

Circuit Diagram

The solenoid is rated at 12v, 0.6A, similar to the one listed here: https://www.ebay.co.uk/itm/193480469509 I apologise for the use of an eBay link in this case, however I am struggling to find any useful proper datasheet matching this item.

S8050 Datasheet: https://datasheet.lcsc.com/szlcsc/Changjiang-Electronics-Tech-CJ-SS8050_C2150.pdf

  • 1
    \$\begingroup\$ a darlington (or two of the above) would be better; the PI's GPIO current is pretty weak. \$\endgroup\$
    – dandavis
    Commented Feb 9, 2021 at 19:51

1 Answer 1


That transistor should be fine. Your Vebo won't get to 5 volts (it won't even get positive) the way you have it connected. I'd look into using a solenoid/relay driver though, since you're already using a SMD component. They have the appropriate base/gate resistor for logic level drive and flyback diode (which you are missing) integrated into the same size package as the transistor.

  • \$\begingroup\$ Thank you for your reply. I'm constrained unfortunately by the parts list of the PCB provider I was to have produce and partly assemble the SMD components, and they don't seem to carry solenoid/relay drivers by standard. As for including a flyback diode, would that be suitable placed in parallel to the solenoid? Would this Diode be suitable? It's the M7 variant. It seems pretty overkill, but is what the supplier have datasheet.lcsc.com/szlcsc/… \$\endgroup\$ Commented Feb 9, 2021 at 18:39
  • 1
    \$\begingroup\$ Yes, place the diode across the solenoid's terminals, cathode connected the supply, anode connected to the collector of the transistor. \$\endgroup\$
    – vir
    Commented Feb 9, 2021 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.