Step 2: Building the circuit - power connections

USB powers the arduino, the batteries power the solenoid. A jumper grounds the two together.

<p>Nice project..! Do you have any code of solenoid lock or Unlock? please....!</p>
<p>I want to use the pneumatic cylinder at slightly higher switching speeds. Can I use the IN4148 diode? The solenoid valve that I am using works at 24V DC. </p>
Did you minded, if i see your schematic?
Hello - we are currently using your instructions as a reference tool for a project and are confused at the discrepancy of the Arduino board vs the Arduino One board.
<p>i need coding for this above video</p>
<p>Hello, the solenoid i'm trying to control has 3 pins. where should i connect these pins? thanks!</p>
<p>I'd be interested to know as well. I've you figured out how to wire it?</p>
<p>*Have you? (late night typing)</p>
<p>I know this question is a month old, but it might be usefull for other people.</p><p>In valves like these, you have 2 parallel and 1 perpendicular pins. The parallel ones need to be connected to your output driver. It doesnt matter which pin gets the positive/negative or live/neutral. The perpendicular pin is for grounding.</p>
Thanks for the reply :)
I believe that is a solenoid valve for water.
<p>Thank you, this is very helpful to us newbies. </p>
<p>How do you modify the code in order to run twice a day?</p><p>Every 12hrs for exaple for watering plants needs to stay open for 2 mins and repeat?</p><p>What is the difference if i use a relay instead a transistor?</p><p>Thank for sharing</p>
<p>I've used this circuit many times now to control solenoids but also to control motors via pwm. Good Stuff - Thanks for Sharing!</p>
<p>Can this be accomplished without usb power?</p>
<p>when the solenoid is active, it tends to heat a lot, what do you do with yours?</p><p>thanks!</p><p>marC:)</p>
<p>when the solenoid is active, it tends to heat a lot, what do you do with yours?</p><p>thanks!</p><p>marC:)</p>
Could an arduino control nine solenoids (though only one would be in use at any time)? I was thinking how much work it would be to make an automated whack-a-mole out of http://www.thinkgeek.com/product/1270/
<p>See this link, maybe can helpyou.</p><p>sonidiario.tumblr.com/post/35689237364</p>
<p>how many solenoid valves can i trigger using ardunio......i am using it to make programmable fountain.</p><p>plzz rply soon</p>
<p>Maybe this link can help you.</p><p>sonidiario.tumblr.com/post/35689237364</p>
<p>I have done all the steps, but with a TIP126 transistor and a IN4007 diode... when I connect the batteries to the breadboard, the solenoid opens, but nothing related with the Arduino seems to work... what can I do? Is it because of the different diode or transistor?</p>
<p>Hi Kvnn,<br>I have the same problem, have you found a solution?</p><p>Thanks<br>Mike</p>
<p>I had the same problem because I had connected the diode to the GND rails rather than the SOLENOID V+ rail. </p>
<p>This was very helpful! Thanks!!</p>
<p>Nice tutorial, thanks for sharing it.</p>
<p>hello..i aldy connect all the components correctly..but when i turn on my power supply..my arduino suddenly give error..i am using 24V solenoid..and using labview interface with arduino..is it happened because the power supply is unstable?when i measure the power supply it gives 32V instead of 24V..</p>
<p>TIP122 will also work ??</p><p>thanks!<br>marC:)</p>
<p>how many solenoid valves can i trigger using ardunio......i am using it to make programmable fountain.</p><p>plzz rply soon</p>
<p>Great tutorial. If I want to control two solenoid a do I need two of everything here?</p>
yes, two of everything (transistor, diode, resistor...). then just use another output pin on the arduino.
Thanks for the reply! Can I use the same breadboard for both or do I need two of them?
<p>You can use one breadboard, just use two different rows.</p>
<p>Nice little tut.. Would be nice to have a little schematic though :)</p>
Hi, <br>I have a question. I am trying to create a self watering cabinet. I have bought brass solenoid valve which requires 12V DC to open. Now I would like to control this with my Raspberry Pi. Could I use the same method for my 12V brass solenoid? <br> <br>This is the valve: http://www.voc-electronics.com/a-29507043/home/brass-liquid-solenoid-valve-12v-1-2-npt/
Hi , <br>i have the same project,, but my solenoid only push and is difficult to get back .. <br>could you please post here the program code that u write to control the solenoid .. <br>thanks in advance
That does not sound like it is an issue with your code. You need a spring or some other mechanism to pull the solenoid back. The solenoid can only pull in one direction so you'll need something mechanical to pull it back in the other direction. In this example I used a coiled up piece of wire to function as a spring pulling the shaft back out.
Hi <br> <br> I purchased a solenoid valve . i want to control it from my arduino. I did not get <br>TIP 120/102 transistor. I got TIP 122 only. Can that be an alternative yo TIP 120? If yes is there any change i need to make with the above circuit? Please reply asap. <br> <br>Regards
Which pin is the 1K resistor in. Is that pin 13?
Is there any difference between any of the three GND plugs on the Arduino?
would you be so kind to point out exactly the type of insulated wire for the springs? im having the same problem, i need to fabricate springs for my solenoids...
How do you control how long the solenoid stays open? Thanks!
He is using the basic sketch for a blinking light. Usually this sketch comes with the arduino software for free. The blinker sketch basically flips pin 13 from HIGH to LOW at an interval to blink an LED. In this case pin 13 goes to the solenoid so just modify the delay in the code to make it stay open longer, etc. <br> <br>If you are looking at the sample code the line you need is: <br>digitalWrite(ledPin, HIGH); <br>delay(1000); <br> <br>changing that delay (in miliseconds) will make it stay open longer. <br> <br>If you need info on uploading or getting the sketch you can check a great tutorial here http://www.ladyada.net/learn/arduino/lesson1.html
I always thought transistors were universally Emitter-Base-Collector.
i'm not sure what's most common, but the TIP120 is definitely BCE - http://www.fairchildsemi.com/ds/TI/TIP120.pdf
It might be because this transistor is in a voltage regulator style package instead of the normal half-cylinder. But I swear that to92 transistors are ebc.
You can just simply jump the grounds of different power supplies like that?
Yes you can. <br> <br>This is only because it is the ground, which creates as he mentions a &quot;common ground&quot; which is needed when running to different power supplies on one system. <br> <br>If you know anything about PCB design its essential the representation of having a ground plane and everything one the board being grounded to that plane while there could be more than one power supply input throughout the design.
Is the reason it pulses because of your code? (ie. does the arduino alternate high and low?) <br> <br>I want to implement this with a push button on/off. <br> <br>Lastly, does it matter the mAh? I'd like to avoid using 9v batteries and instead use an AC adapter that outputs 12V natively

About This Instructable


224 favorites


More by jts3k: Controlling solenoids with arduino Superterrific Tub Bass
Add instructable to: