USB-Based Controller

Disclaimer

This information is provided “as-is” without any explicit or implied warranties as to its accuracy, safety, and applicability to any specific purpose. The authors and Lawrence Berkeley National Laboratory should not bear any responsibility for any use given by third parties to this information, and to the devices herein described. The user of this information and the devices herein described shall assume all risks and full responsibility for all aspects of their assembly and use.

Anybody building this controller must observe all standard laboratory/workshop safety practices, such as wearing adequate personal protective equipment, and must be conscious of all electrical hazards present. The equipment described here can pose risks of electric shocks, arcs, and fires if it is not properly assembled and operated. Electrical connections (especially those involving voltages higher than 50V) should always be done by persons qualified to do so, and knowledgeable about safe practices, such as proper grounding, proper isolation of potential shock sources, the use of fuses or circuit breakers to protect against short circuits and over-currents, etc.

License and Attribution

Creative Commons License

All the information regarding the design and construction of this USB-based controller, including the software/code you can download on this web site, are licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

By using this information and/or downloading the software/code, you agree to cite/acknowledge Rafael Gómez-Sjöberg, Microfluidics Lab, Lawrence Berkeley National Laboratory, Berkeley, CA 94720, in all publications that describe any work that used or was made possible by the information on this web-site.

Introduction

This page briefly describes the assembly of a USB-based controller for 24 solenoid pneumatic valves. As many of these controller boxes can be simultaneously connected to a computer to drive any desired number of solenoid valves. This type of controller was developed when I was in the Quake Lab at Stanford, and the information on how to build it used to be posted on the Stanford Microfluidics Foundry website. That old information was for a device that used 12V solenoids, and only covered the construction of a regular speed controller. This page contains information on a new circuit that operates at 24V, and includes instructions on how to build the high speed version of the controller (see below for an explanation of the two speed versions).

Building this controller needs basic familiarity with soldering of electronic components and very simple machining/drilling (for the plastic enclosure). Please follow all the basic safety procedures when soldering and machining or drilling. If you are not sure of these, please find somebody that knows to help you.

Each 24-channel controller box can drive up to 24 solenoid valves, usually arranged as three valve manifolds, each with 8 solenoids each, as shown in the picture below. Note: The specific valve manifolds shown in this picture are now obsolete so they will look slightly different from the ones in the latest parts lists and in subsequent pictures.

Two Types of Controllers

There are two versions of the controller that you can build, depending on the valve actuation speed you desired.

Note: The valve actuation times quoted below are very approximate, and assume a short tygon tube (no more than 6 inches) from the solenoid to the chip, a short channel (no more than ~1cm) from the chip input to the on-chip valve, and using water as the fluid inside the control lines (instead of air).

Regular speed

This controller provides valve switching times of 50ms or more, when used with most solenoid valves. This version should suit most people’s needs, and is the simplest and cheapest to build. If you are thinking of doing very fast on-chip peristaltic pumping you should consider building the high speed version.

The regular speed controller uses solenoid valves that come with an integrated flywheel diode, an LED (that shows you when the solenoid is energized) and a connector. The integrated diode saves you the (relatively small) expense and work of putting diodes in the controller board. The printed circuit board (PCB) has space for two diodes in each channel, which are not installed for this version of the controller (the places for the diodes are left empty). The LED is obviously nice for making sure that the solenoid is receiving power from the controller when you are debugging the system. And the integrated connector saves you the expense and work of putting your own connector on each solenoid.

Warning: Do not connect to this controller solenoid valves without an integrated diode. Actuating diode-less solenoids is very likely to damage the transistors in the controller box.

High speed

This controller can achieve valves switching times around 15-20ms, when used with the proper solenoid valves. Such speeds are necessary if you want to do fast on-chip peristaltic pumping, for example. This version has more components, and is thus a little bit more expensive and takes longer to build (but the difference with the low speed version is not very large). Keep reading to see if you are willing to go the extra mile and build the high speed version.

The high speed controller is designed to drive solenoid valves that do not have built-in flywheel diodes. The two diodes in each channel on the PCB make it possible to switch diode-less solenoids faster than solenoid with diodes. Unfortunately, solenoid valves that come without and integrated diode also lack an LED and a connector. Since the solenoids do not have diodes, you must install all the diodes onto the printed circuit board (PCB). Additionally, if you buy the solenoids from Pneumadyne you have to install a connector on each valve, and on each cable that goes from the controller to the valves. However, you can buy solenoids from Festo Corp. which already have the connector.

What you gain form this extra work is being able to switch the valves in about 15-20ms. This speed is necessary for fast on-chip peristaltic pumping. The Festo solenoids are likely to switch even faster (the data sheet claims 4ms), but I have not measured the speed myself. See the Solenoid Valves page for more information.

Note: This controller can drive solenoids with integrated diodes, but the actuation speed will be significantly lower than that of diode-less solenoids.

Controller Design

The controller box is comprised of a commercial USB-based digital input/output (I/O) card connected to a custom-designed PCB with 24 amplifiers that translate the 0-5V low power outputs form the USB card to high-current signals needed to drive the solenoid valves.

The following are electrical diagrams of the amplifier circuitry that goes on the custom PCB (click on each diagram to see a larger version). All 24 amplification channels are identical, and are composed of a resistor, a darlington transistor, and two diodes. The two diodes are used only for the high speed configuration. For the regular speed version the diode placeholders are left empty. The capacitors attached to each channel (C1 through C24) are not really needed for either of the two configurations (but I recommend putting C1, C9, and C17 on the circuit). C26 is important and should be put onto the circuit.

Note: These circuit diagrams are for the old, 12V version of the device. The 24V version uses different part numbers for the diodes and capacitors, while all the other components remain the same. I hope to update the diagrams in the near future. In any case, understanding these diagrams is not essential to building the operating the controller.

The USB controller can drive any type of solenoid, as long as it is rated for 24Vdc (with a 24Vdc power supply, or 12Vdc with a 12Vdc supply), consumes less than 800mA, and the total current consumed by all the connected solenoids is less than the maximum current capacity of the power supply. It is your responsibility to make sure all these conditions are met, for the safe operation of the controller. You can mix different types of solenoid valves as long as all the aforementioned conditions are met.

Parts

The following is the list of components needed for both types of controller boxes. The only component for the assembly that cannot be found commercially is the printed circuit board (PCB) where the electronic components are mounted. Please see the text below the table for instructions on how to order the PCBs. Unfortunately, the Quake Lab at Stanford no longer provides free PCBs. Click on the link below the parts list to download or print.

Solenoid valves are not included in this list and should be selected by going to the Solenoid Valves page. Make sure that you pick the right kind of valve depending on the speed of the controller you are building. For the regular speed controller I recommend Pneumadyne valves, which have built-in diodes and individual connectors. For the high-speed controller, I recommend the Festo valves.

Note 1: The old version of the controller instructions, which used to be hosted by the Stanford Microfluidics Foundry, was for 12V solenoids. The current version is designed for 24V solenoids (to use the same solenoids as the WAGO Controller), but would be able to drive 12V solenoids if a 12V power supply is used (the high speed version of the controller will slow down a bit if run at 12V). Do not connect 12V solenoids to the controller if it is powered by a 24V supply.

Note 2: Prices indicated are small volume purchases (typically between 1 to 9 pieces) valid on the date stated on the file. Prices will be lower if larger quantities are ordered. The quantities of the parts indicated below are the minimum needed. You might want to buy a bit more than what is indicated. Some parts, like contacts/terminals for connectors, should probably be bought in larger quantities than is strictly needed because these parts can be easily damaged during assembly.

USB-Valve-Controller_Parts-List_24V_030311

PCB Design

As was mentioned above, the Quake Lab at Stanford no longer provides the PCBs. The PCB was designed using free software provided by ExpressPCB, which offers PCB fabrication services if you can pay with a credit card. Unfortunately, this software uses a proprietary, non-standard file format, so it's impossible to read the file with any other program or send it for fabrication to other vendors. Contact me and I will send you the ExpressPCB files so that you can order the board directly from them.

If you want to re-create the PCB using your favorite design software and vendor, here are the mechanical and electrical drawings of the board. Left click on each image to see it in full size, or right-click over it and select "Save Link As..." to save the it to your computer. Or, you can download this PDF file with the drawings in real size.

Controller Assembly

Because I prefer to spend my time doing things other than writing instructions, this guide is mostly visual, without written step by step instructions on how to do things. You have to look at the pictures and figure out how to do it yourself. I hope the pictures are clear enough, but if they aren’t, please contact me.

The first step in the assembly is to install and solder all the electronic components onto the PCB, as shown in this image. Be very careful to install the capacitors in the right polarity. Capacitors that are connected with a reverse polarity can explode, and will make the circuit misbehave.

Note 1: Click on any of the images shown below to see a large version of it.

Note 2: The image shows the high-speed version of the circuit. The regular speed version will just be missing the diodes (D1-D24 and Z1-Z24).

Note 3: C26 is absent from the circuit shown in the image, but it is required. Capacitors C1 to C24 are not essential, but a few can be put on the board as shown in the picture.

Following this, place the PCB at the bottom of the potting box, measure the distance between the top rim of the box and the Port A/B/C connectors (at bottom of the previous figure) and mark this distance on the outside of the box. You can then use this mark to open a slot for accessing the connectors, either using a milling machine or by hand. I have done it by hand by scoring lines (a rectangle that forms the opening) on the plastic with a pointed tool, until the plastic in the scored lines is thin enough to cut with a blade.

Then you have to assemble the flat ribbon and power cables. Be mindful of the orientation of the ribbon cables. Both connectors on each ribbon cable should be mounted on the same side of the cable, and should be facing the same direction along the length of the cable. When assembling the power cable, keep in mind that the central contact of the power supply connector is the positive terminal.

The Elexol USB interface is mounted onto the lid of the box using the nylon screws, nuts, and spacers, after drilling appropriate holes in the lid. Then you have to drill holes for both the USB and power connectors on one side of the box.

You can secure the PCB onto the potting box using short sheet metal screws.

The following image shows the fully assembled controller.

Solenoid Valve Electric Connectors

Connectors are needed on the end of the solenoid valve cables to connect to the controller box. The following picture shows the way in which the solenoid cables are arranged in a connector.

The assembly of pneumatic connections for the solenoid valves is covered in the Solenoid Valves page.

Software

The software needed to operate the USB controller from Matlab (32 and 64bit) and LabView can be found inside this compressed folder. The ReadMe.pdf file inside the folder explains the basics of installing and using the software. DISCLAIMER: We do not have nor use LabView in our lab, and the LabView code provided here was developed many years ago. Consequently, we are unable to provide help with the use of the LabView code. Use it only if you are very confortable programming in LabView.

Creative Commons License