This mini article provides a small circuit idea to interface a 12V or 24V DC Solenoid (or relay) with a 3.3 or 5V microcontroller’s i/o pins.
Datasheets
- BD139 Power Transistor (For PINOUT refer this document)
Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.
Very nice application , probably – can be used in door lock or timer controlled water spraying for garden, but difficult part — how or where to get the solenoid or miniature valves !
regards,
Uttam Dutta
Hi Uttam Dutta,
you can get miniature valves from automobile spares shop. all LPG powered cars(not sure about petrol or diesel) have solenoid valves to control the flow of gas.
regarding solenoid you can get a piece of steel and copper wires for a motor repair shop and wind it on the steel and you will have a good solenoid
Go to any washing machine repair shop, you can buy an old but working water solenoid from them. If you ask them nicely they will even tell you where you can buy new ones from. A new washing machine solenoid costs around 250 to 300 ruppees.
can u please send me the code regarding this project..
I am going to use PWM to control my solenoid valve and was just wondering if my waveform will be distorted in any way by the transistor?
Or should I just stick to using a motor driver instead?