0

Sprinkler project
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Sprinkler project

by stevenelson on Wed Sep 29, 2010 11:19 am

I'm still very new to using the arduino. Now that I know which leads to use on the sprinkler valve, do I need to connect the leads to the digital outputs or analog?
stevenelson
 
Posts: 12
Joined: Sun Sep 26, 2010 5:00 pm

Re: Sprinkler project

by richms on Wed Sep 29, 2010 11:33 am

stevenelson wrote:I'm still very new to using the arduino. Now that I know which leads to use on the sprinkler valve, do I need to connect the leads to the digital outputs or analog?


You are in the same situation as the guy who posted the hand drawn schematic here, and this is my answer which if you do need to swap the wires to change open and close you will need the same thing - see this here viewtopic.php?f=40&t=16444&p=88957#p88957 and ask again, but I suspect buying a motor shield would be the easiest way for you to get a H bridge to allow both polarities to go into the sprinkler valve.

Are you certain that you understand how the valve works tho, because getting the motorshield when you dont need it would be a waste of $$$..

richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am
Location: New Zealand

Re: Sprinkler project

by oPossum on Wed Sep 29, 2010 12:14 pm

Take a look inside the controller for some idea of what it takes to drive that valve.

I thought the solenoid would have two windings so a half bridge driver (ULN2003) could be used, but your resistance measurements don't support that theory.
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: Sprinkler project

by stevenelson on Wed Sep 29, 2010 1:52 pm

It's possible there are two windings since there are three wires and I have to touch one pair to open the valve and another to close it.

Seems like a strange design though. Why didn't they just reverse the polarity on the coil of wires?

I actually have the adafruit motor shield, but I haven't assembled it. I must be missing something, I'm not sure how that would help. I figured the program I'd write would simply send a 5v burst of current using one pin on the arduino connected to the green and copper wires on the valve to open the valve. Then use another pin on the arduino connected to the green and red wires on the valve to close it.

Then to make it the coolest sprinkler ever, i'll add in internet access and tie it into an HTTP get script to my server which will return an "open" or "close" value depending on weather conditions and when the last time it was turned on etc. I figure I'll have the majority of the decision making done on the server side.
stevenelson
 
Posts: 12
Joined: Sun Sep 26, 2010 5:00 pm

Re: Sprinkler project

by adafruit_support_bill on Wed Sep 29, 2010 2:04 pm

The arduino digital pins don't have nearly enough current to drive a solenoid. They don't have any protection against the nasty voltage spikes solenoids put out either. You need a combination of transistors and diodes to do this safely. http://www.arduino.cc/playground/Learning/SolenoidTutorial

The H-bridges on the motor shield are made up of similar circuits (with diode protection against spikes) arranged to switch high current loads in both directions. They can also be used to drive solenoids.

adafruit_support_bill
 
Posts: 76236
Joined: Sat Feb 07, 2009 10:11 am

Re: Sprinkler project

by stevenelson on Wed Sep 29, 2010 2:32 pm

OOOH! Tell me if this makes any sense...

The timer uses 3 AAA batteries so that's roughly 4.5V

The green-copper inductor has a resistance of roughly 3.4ohms

V=IR

So... 4.5V/3.4ohms=1.3A

That seems CRAZY high, but it supports what you're saying. Am I on the right track? I'll read up on the solenoids.
stevenelson
 
Posts: 12
Joined: Sun Sep 26, 2010 5:00 pm

Re: Sprinkler project

by oPossum on Wed Sep 29, 2010 4:07 pm

Yes, that's correct. A solenoid is quite inductive, so the details are more complicated, but ohms law is a reasonable estimate of solenoid current draw.

copper-red: 3.8ohms
green-copper: 3.4 ohms
green-red: 0.3 ohms

Then I tried holding the metal part of the valve down while touching the green and copper leads like you suggested and viola! It stayed down. Then if I touched the green and red. POP! it popped up. Exactly what I was expecting.


The resistance measurement of green to red (0.3) doesn't make sense.

4.5 / 0.3 = 15 amps
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: Sprinkler project

by richms on Thu Sep 30, 2010 1:28 am

Greento red is probably to sense if it has moved or similar, so could either be a switch or another coil that the inductance of changes or something once the valve have moved so that the origional timer can cut power or know if it has not activated.

richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am
Location: New Zealand

Re: Sprinkler project

by stevenelson on Thu Sep 30, 2010 9:32 am

I just assembled ladyada's motor controller last night. I'll play around with it a bit. Eventually I'm going to use the yellowjacket wifi arduino so I want to use a controller that's as small as possible. I just came across this H-bridge tutorial that powers a single DC motor. It seems perfect.

http://itp.nyu.edu/physcomp/Labs/DCMotorControl

If I were to simply substitute the solenoid valve for the DC Motor in that tutorial will it work and not fry my board?
stevenelson
 
Posts: 12
Joined: Sun Sep 26, 2010 5:00 pm

Re: Sprinkler project

by adafruit_support_bill on Thu Sep 30, 2010 9:41 am

An H-bridge can control a solenoid, but it is not necessarily the best way to do it. On the one hand, solenoids are not directional like motors. You don't need the reversability that an H-bridge provides, you just need simple switching of high current loads. On the other hand, the L293 is a rather small H-bridge that is only rated for 600mA with peaks up to 1A. If your load exceeds 1A for more than a few milliseconds, you may well fry the L293.

Something like this would be more appropriate. With heat sinking, the TIP-120 will handle 3A.
http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads

adafruit_support_bill
 
Posts: 76236
Joined: Sat Feb 07, 2009 10:11 am

Re: Sprinkler project

by stevenelson on Thu Sep 30, 2010 9:53 am

You all are a wealth of knowledge. I am utterly beside myself.
stevenelson
 
Posts: 12
Joined: Sun Sep 26, 2010 5:00 pm

Re: Sprinkler project

by oPossum on Thu Sep 30, 2010 10:09 am

Right now there is not enough known about the characteristics of the solenoid to make any recommendation about what to drive it with.

- Make sure the red to green resistance measurement is correct. If you have another one of the valves, then measure the resistance at the 3.5 mm plug (ring to tip, ring to sleeve, tip to sleeve).
- Open up the controller and look at what is used to drive the valves

It is currently unclear if a half bridge or full bridge is needed and how much current is required.
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: Sprinkler project

by cstratton on Fri Oct 01, 2010 8:13 pm

arduwino wrote:An H-bridge can control a solenoid, but it is not necessarily the best way to do it. On the one hand, solenoids are not directional like motors. You don't need the reversability that an H-bridge provides, you just need simple switching of high current loads. On the other hand, the L293 is a rather small H-bridge that is only rated for 600mA with peaks up to 1A. If your load exceeds 1A for more than a few milliseconds, you may well fry the L293.


One thing that can be done is to stack two L293's on top of each other - this is probably easier than breadboarding something else if an L293 PCB is already on hand.

It might also be possible to modify the pcb to double up the bridges in the chip.

I might be tempted to take a 5v wall wart rated for about an amp, and a meter set on the 10 amp current range, and try to hold the wires together to manually activate the valve and see what kind of current is required. A dual-metered bunch supply with current limit would of course be even better.

cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: Sprinkler project

by noseeum on Wed Nov 24, 2010 10:56 pm

I'm working on a similar project with an orbit valve and came across this site

Looks like you need 24V to operate the valve.
noseeum
 
Posts: 1
Joined: Fri Oct 08, 2010 6:17 pm

Re: Sprinkler project

by stinkbutt on Thu Nov 25, 2010 4:02 pm

arduwino wrote:This is common for automatic valves. They are designed so that the fluid pressure assists in the actuation of the valve.


I guess these valves essentially act like DC triacs.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Please be positive and constructive with your questions and comments.