enter image description here

I am not of an expert and just beginning in electronics, I have tried to design this circuit. The schematic is for the 12VDC-4.5W solenoid valve to act like a gate valve to pass and stop the flow of air depending on the time I have set it to do so.

Q1. The BCP55 transistor appropriate for my design, and is the resistor value of 10k appropriate? This is the only NPN transistor I have, so I chose this one.

What parameters to tell that this is okay to use. What should be considered in calculations of voltage and current consumption should I look for given the power supply and solenoid valve I have.

Q2. I have seen that it is recommended to use 1N4001 for the flyback diode, but what I have is only the 1N4150, can I use 1N4150? How to understand whether one diode is a suitable replacement for another.

Here are the links to the parts list:

12VDC-4.5W-N.C Solenoid Valve - https://docs.rs-online.com/b218/0900766b815dd865.pdf

BCP55 datasheet - https://www.mouser.ph/datasheet/2/916/BCP55_SER-3081565.pdf


1 Answer 1


Here are some thoughts to your design:


You should debounce the buttons, either in soft- or hardware. Since debouncing multiple buttons in software might be tricky, I would suggest implementing a RC circuit in parallel to each button. I would recommend a 10nF Capacitor and a 330 Ohm Resistor, it worked well in my designs.

Power your arduino with the 5V pin directly from the MC7805. Arduinos have a intern voltage regulator, but if you already have 5 Volt on your setup why not use it?

Connecting both GND pins would also not hurt.


The transistor looks good to me, however the base resistor seems to be to small.

Therefore, a 220-ohm base resistor is chosen to ensure the base current is limited to 19.5 mA, which is safely below the 20 mA limit set by the Nano port pin.

First of all, 19.5 mA is NOT SAFELY below 20 mA!

Vbe can vary depending on temperature, also note that resistors can have tolerances of 10%.

I would recommend 330 Ohm so that in the worst case you could expect 15.2 mA flowing through your arduino pin. with a hfe of 30 you can drive up to 390mA of Ic.


Generally you should use power diodes like the 1N400x which can easily handle up to 1 Ampere. My go to is the 1N4007. Further reading:

Is a flyback diode necessary with a relay module for operating a Solenoid valve?

What kind of diode for a solenoid?


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.