As part of my dissertation work, I mix various combinations of oxygen/nitrogen and nitrogen/hydrogen, using mass flow controllers (MFCs). I discovered one day that my oxygen MFC had a leak in it. After doing the regular trouble shooting procedures, it still leaked. I either had to send it off for repairs (at least $1,000) or put an extra valve near it to manually shut off its flow. The MFC functioned well except for the leak and I didn't want to spend lots of money to have it gone for weeks when I had use for it now. 

The problem with just adding a valve is that I can not turn off the MFC remotely then. I have done a lot of work to automate the control systems I use to minimize the number of late nights in the lab, so I wasn't satisfied with just putting a manual valve on it. How could I automate a valve?

The obvious answer was a solenoid. There are some problems with that though. First, I didn't have a solenoid on hand. My lab uses Swagelok everything. I didn't have a solenoid on hand with Swagelok fittings, I didn't have the adapters to go from Swagelok to NPT, and I also didn't have a system to run the 12 or 24V that most solenoids would use.

What if I could turn the manual valve remotely? Strap a motor on it somehow and get it to work. Swagelok sells a product like this, but for almost $500. Instead I decided to use an servo to do the moving for me and an Arduino to control it. The MFCs were controlled by a LabVIEW program and there is a toolkit to control Arduino from LabVIEW (LINX). The only challenge was getting the motor and the valve strapped together. 

First task: getting the shafts of the two parts connected. The ball valve featured a large black handle connected to the shaft by a pin. After knocking the pin out I could use the handle to design the half of the connection to the valve. The motor came with a few arms to attach to it. After some trial and error (thank you for rapid prototyping) I decided the best way to connect the shafts was to just sink the arm from the motor into a grove in an adapter connected to the valve. Hence the valve adapter piece was made.

Next, to keep the servo stationary I needed to connect it to something else. The servo had some holes meant for mounting that I decided to make use of. I could also use the piping going in and out of the valve to hold against. I just needed to design a few pieces to slot into the correct spots and leave room for the valve arm to turn. Again, after some trial and error (it is difficult to reach that spot behind the equipment), I got a functioning set of arms to hold everything in place. A few zip ties keep the parts together with enough slack so everything doesn't have to be perfectly aligned and can be slid off to take it apart if needed.

All used STL files are included along with links to Tinkercad where the parts can be used and modified. Part sizes were developed using measurements taken from the motor, valve and piping using digital calipers. Included is also an example LabVIEW program for turning the valve open and closed based on a boolean input. It is useful for determining the pulse width modulation signal needed to send the servo to get the right position.

Everything has been together and working now for almost a year. The single servo works well being powered directly off the controlling computer and the parts have held up as the system cycles the valve open and closed. Ideally the MFC will be serviced at a point, but until then, we can keep running experiments without delay.