# How to interface RPi 3 to 12V solenoid?

**URL:** <https://forum.core-electronics.com.au/t/how-to-interface-rpi-3-to-12v-solenoid/2369>\
**Category:** Uncategorized\
**Created:** [23 March 2018 04:39 UTC](https://forum.core-electronics.com.au/t/how-to-interface-rpi-3-to-12v-solenoid/2369 "2018-03-23T04:39:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bikash57329](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@Bikash57329](https://forum.core-electronics.com.au/u/Bikash57329)\
**Post date:** [23 March 2018 04:39 UTC](https://forum.core-electronics.com.au/t/how-to-interface-rpi-3-to-12v-solenoid/2369/1 "2018-03-23T04:39:18Z")

</div>

I need help to find out a driver circuit or a component to interface my raspberry pi 3 to 12V solenoid valve.

As I tried to take the output from GPIO 18 thereby using a NPN transistor, 1N4148 diode and a 220 ohm resistor. but I was not able to get the output.

So, now I’m in search of finding a readymade switching circuit block to control a 12V solenoid using RPi 3.

Thanks,  
Bikash

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/stephen/32/1599_2.png) [@Stephen](https://forum.core-electronics.com.au/u/Stephen)\
**Post date:** [1 May 2018 00:56 UTC](https://forum.core-electronics.com.au/t/how-to-interface-rpi-3-to-12v-solenoid/2369/2 "2018-05-01T00:56:30Z")

</div>

Hi Bikash,

Why are you driving a solenoid with a raspberry pi? It would be much easier to control something like a solenoid from an Arduino. If the raspberry pi is needed, then control the Arduino from the raspberry pi.

Let us know how it works out!

---

<div class="post-metadata">

**Author:** ![Bikash57329](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@Bikash57329](https://forum.core-electronics.com.au/u/Bikash57329)\
**Post date:** [30 May 2018 12:08 UTC](https://forum.core-electronics.com.au/t/how-to-interface-rpi-3-to-12v-solenoid/2369/3 "2018-05-30T12:08:26Z")

</div>

Thanks Stephen for your concern… It worked out after using relay module in between of RPi3. To cover the mismatch on power, I used one 12V step up voltage regulator.
