In the process of building a cocktail robot, I found myself in need of a servo controlled valve. I played around with a simple arm linkage, but the geometry didn't work out very well. It was hard to get leverage at both end of the stroke, and I was wasting most of the servo's range of motion anyway. I decided that it would be much better to go with a geared system -- except gears are annoyingly expensive. I'd been experimenting with laser-cut gears, which are far cheaper, but there was no way they'd stand up to the kind of torque needed here. The plywood teeth would chip under the strain. So I decided to try something new, chain drive using laser-cut sprockets. Using a chain would spread the load over many teeth, making it much stronger. And chain drive is more tolerant of misalignment, making the mounting of the parts easier.
Because the servo turns 180 degrees while the valve only turns 90, I could use a 2:1 reduction. That is, however far the servo rotates, the other side will only rotate half as far. This has the lovely added benefit of doubling the torque on the output side. We do this by making sure the servo sprocket has half as many teeth as the valve sprocket does. In my case I used 12 and 24, but the exact number doesn't matter.
The only other thing you need to know is which size of roller chain you'll be using. You can order whatever you want from eBay or an industrial supplier, but chances are you'll want to use ANSI #35 or ANSI #40. #35 is commonly used in go carts, so it's fairly easy to find. #40 has the important property of having the same pitch as standard bike chain. Bike chain is narrower than real #40 chain, so it won't fit on #40 sprockets. But #40 roller chain will fit on bike sprockets, something that can be very convenient!
Step 1: Design
In order to laser cut the sprockets, you will need to get their profile shape in the vector drawing program of your choice. I use Inkscape. Originally this was a very convoluted process for me, starting with a freeware package which would draw sprockets as a DXF files, and them clumsily importing those into Inkscape. It was so annoying, in fact, that I wrote a custom Inkscape extension for drawing sprockets. (It can also do much better gears than the stock Inkscape plugin.)
The great thing about getting gears and sprockets laser cut (beyond the price) is that you can have the hub mounting points cut at the same time. It's very easy to do a custom mounting pattern, such as I did for the valve side. And this way you know that the holes are perfectly centred!
You might as well make a mounting plate for the valve and servo at the same time. I've attached an example file showing a simple arrangement. This may or may not work for you, given your specific valve and servo models. I used polypropylene 1/4" valves from the hardware store, and a standard body, high torque RC servo.
Step 2: Assembly
Get your file cut out of plywood at your local Makerspace (or however you normally do laser cutting). Be careful of what thickness of plywood you use! It has to fit between the links of the bike chain your are using. I've found 3mm combined with 1/8" wide BMX chain works well. The most common bike chain is 3/32" wide, but plywood that thin just isn't strong enough. The 1/8" chain is still easy to find, even in the recycling bin of bike stores.
Assembly is quite easy. Glue the two reinforcement plates around the valve hole. These serve to built up a collar that the valve can sit in, preventing it from twisting. The little slots on either side allow for a cable tie to pass through, holding it all in place. Glue the large sprocket onto the valve head, and screw the servo horn onto the small sprocket. Bolt the servo in place.
The last thing you need to do is make the chain, which needs to be 23 links in length for this setup. You'll need a chain tool to do this, though I've made it work with just a driving pin and a special anvil I made with holes drilled at the right spacing for the rivet heads to sit in. You could also get most bike stores to make you one for a nominal fee.
To attach the chain, wrap it around the large sprocket which is attached to the valve, then insert the small sprocket which is still lose. You can the wiggle it around so that the servo horn can be mounted onto the servo. Make sure to then screw the horn down, the center of the sprocket has a hole cut into it for this purpose.
Step 3: Control
The nice thing about RC servos is the number of different ways to control them, all fairly easy. You could attach an RC receiver and use a standard remote control, such as one used for RC planes. You can attach an Arduino or other microcontroller, they all have very well documented ways to interface with servos. And you can also create a simple 555 timer circuit, which I'll detail here.
RC servos take commands in the form of pulse width modulation. Basically, it counts how many pulses it sees on the control signal over a short period of time, and then number of pulses determines the angle it rotates to. So in order to control it, we need to generate a series of pulses. The 555 is a perfect component for doing this, and you can find many examples of its use on the web. The example given here is a version that I designed. Depending on the configuration, it can either allow fine control of the servo angle, or provide a binary input to send the servo to either extreme of its motion. In this Instructable I'll just be using the later mode, as we only want the valve open or closed.
C1: 1 uF
T1: 2N3904 transistor
R1: 1 K ohm
R2: 82 K ohm
R3: 10 K ohm
R4: 1 K ohm
R5: 24 K ohm
R6: 1 ohm
By shorting across X1, the R6 resistor is added in parallel to R5. This drops the combined resistance to basically nothing. The end result is that the pulse chain being created by the 555 changes radically, and the servo swings from one extreme of its motion to the other.
Step 4: Result
And that's it!
This system has proven itself highly reliable. My Cocktail Engine uses 16 individual valve assemblies of this design, and I've put upwards of 1000 cycles on them by now. If you're looking to quickly and easily control the flow of a liquid, and do it in a fairly stylish fashion, I think this is a great way to go.