0
\$\begingroup\$

I have two pieces of hardware I'd like to interface with via USB. The first are 2002 Series Actuated Valves and the second is a Mass-Flo Controller for regulating gas exchange. To my (admittedly limited) knowledge of hardware interfacing, I imagine for example, as stated on page 38 of the MKS manual, I simply need to "apply a TTL low to pin 4" of the 15-pin connector to open the valve. I've purchased the following USB-DB25/DB15 cables, however am unsure of exactly how to apply this signal voltage through USB. The manufacturers sell their own cables like a DB15 to HD15/VGA but their prices seem a tad outrageous and the shipping times won't work. How can I achieve this task through USB?

\$\endgroup\$
  • \$\begingroup\$ If these devices aren't themselves USB devices, then you need a USB device that can talk to them via TTL type signals. If you only need to do a little bit occasionally, something like the modem status/control pins on a USB serial chip might work, but if you need to do a lot of interactive operations USB latency means you'll likely need to push the low level algorithm out the USB and run it in an MCU with USB, or in a complex programmable USB interface like an FT2232H (if that turns out to have compatible functionality). \$\endgroup\$ – Chris Stratton Mar 15 at 19:17
  • \$\begingroup\$ As for your valves, they have a holding current of 32 mA at 24VDC. You'll need some driver circuitry in addition to the com interface. In other words, it's probably more complicated than you hoped. And valve coils can be particularly nasty to turn on/off, depending. I have built solutions for this (via Ethernet), but not sure how to share that with you. However, for your Flow-Controller, it may be possible to use a USB-to-Serial converter (they're cheap) to toggle the two valve-control bits on off. This can be done with a simple Python program (or even Excel). Comment for more details. \$\endgroup\$ – Chris Knudsen Mar 15 at 19:45
  • \$\begingroup\$ Hi Chris, thanks so much for your comments. Yes, this is indeed turning out to be a bit more ambitious than I intended but I'm still committed. If my goal is occasional communication, how could I use the status/control pins to supply the necessary voltage? Alternatively, if I find I'd like more interaction and supposing the FT2232H interface fails me, where else might I find a compatible interface? As for supplying power to the valves, can you point to any examples that use a similar driver circuitry? Thanks again for your help! \$\endgroup\$ – BbJug Mar 18 at 15:07
  • \$\begingroup\$ Valve driver: something like a ULN2803 should work. Low-level input, higher-current open-collector output, built-in suppression. Old workhorse. DIO: twiddling dio from modern computers has become a bit cumbersome. I'd recommend (2.) of @Jack 's answer below. Otherwise, I'd spin my own Ethernet interface (or buy one). My favorite OTS Ethernet widget comes from a company in Lakewood, Colorado. Search there for "data acquisition". They also have high-current valve driver add-on accessories. \$\endgroup\$ – Chris Knudsen Mar 19 at 18:34
  • \$\begingroup\$ Thanks for your response Chris. I'll investigate these drivers and widgets. And interestingly enough, I'm actually living in Lakewood! Hopefully this speeds up the shipping process. :) \$\endgroup\$ – BbJug Mar 20 at 15:19
1
\$\begingroup\$

The first thing to understand is that there is NO universal interface via USB. All USB interfaces need to load applicable drivers and you need to define what sort of programming interface you want to support. You can:

  1. Write your own USB driver. I don't think you want to go there.
  2. Use a supported USB interface such as those that present as a Virtual serial interface (FTDI FT232R).
  3. Use a supported USB interface such as those that present as a parallel interface (FTDI FT245R).

Your Actuated valves are like a solenoid valve (see page 20 on the datasheet), so you will need:

  1. An external power supply (they cannot be driven from your USB connection) of 12 or 24 VDC.
  2. A USB digital IO with either open collector (transistor) or open Drain (FET) driver.

Your Mass Flo valve is a TTL interface, so you could drive this directly from a logic output.

Only one of 'USB cables' you have bought could conceivably be used to drive the solenoid valves or the Mass Flo device.
The USB to Parallel port adapter has 8 TTL output bits available (LPT interface). You can drive these from all development languages, or can use simple pre-packaged applications to test.
Notice here you are not driving a USB interface, but a virtual LPT port in the PC. This hides all the complexity from your application environment, but may be more challenging depending on the HOST OS you are using (you might have to specifically load a driver).

In the case of the solenoid valves you would also need to construct a driver for the solenoids along with the external power supply.
Her you could on the simplest end of the scale use an interface such as this:

enter image description here

They are called Arduino FET switches and will support the voltage and current you need.

The USB-Parallel port can directly drive the signals on your Mas-Flo device. If you need more than 8 bits of signal level then you could use a second USB-Parallel adapter.

If you need more than 16 bits of IO or are building a more professional setup you would be well advised to choose a professional solution such as the NI USB-6525. This provides 8 outputs and 8 inputs per module, but you can use multiple units. You would still need an external power supply to wire up your solenoid valves.

\$\endgroup\$
  • \$\begingroup\$ Thank you for your insightful answer, Jack. The LPT interface application looks like a great way to dive into port communication; I'll see if I can interface through my current cable this way. And can you recommend a specific 12/24 VDC power supply for this application? Or would any general external PSU work? And I will look into the FET switches, they seem to be what was logically missing from understanding of this interface. \$\endgroup\$ – BbJug Mar 18 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.