Optical system controllers
November 11, 2010 5:01 PM   Subscribe

I am currently in the process of designing an optical system for my lab and I am looking into different controller options. I'm trying to figure out how to wire different motors, voltage sources, and detectors into a computer.

I've been looking at National Instruments' modular PXI system and LabView software, but the hardware is quite pricey. I'd be open to cheaper alternatives (< $10k) so long as I can easily interface different components together. What is the best way to connect many different hardware components into one machine and control them with a computer? Also, are there any beginners' guides to setting up a simple setup with a few different motors, detectors, etc.?
posted by Aanidaani to Science & Nature (7 answers total) 1 user marked this as a favorite
Depending on how complicated your system is, you may want to look at the Arduino world. It's a hobbyist system, and you'll probably have to write code for the microcontroller, but it's very cheap ($30) and if you're not concerned about speed or extremely high precision, it's pretty handy. There's a lot of information about interfacing to Arduino controllers out there, so you're likely to find guides to setting up motors and various detectors. I know people who've used them in lab for simple projects with great success.
posted by pombe at 5:06 PM on November 11, 2010

Echoing pombe the amount of money you will be able to save is proportional to the amount of programming you want to do. I don't know if an mcu is appropriate for this situation, if you do go that route, as you're going to be bandwidth constrained. If you could be more specific on what those hardware components are and the data you intend to collect we could provide a more concise answer. If you just need to turn something on and off and read a voltage from a sensor 100 times a second you could do it for $30.
For learning the arduino is a good suggestion, even if it isn't appropriate doing some simple projects would serve as a good introduction to hardware interfacing with a computer.
posted by EsotericAlgorithm at 5:45 PM on November 11, 2010

Measurement Computing, Inc. is a company I have used quite a bit for lower cost test instrumentation. Much is USB or PCI based, and the hardware is pretty cheap. $10K is a liberal budget for a system and personally, I'd steer you away from Arduino stuff. It's hobbyist level and while good for simple stuff, it functions better for those few things that need to be highly customized and that don't fit into more professional hardware suites.

(This company used to be called "Computer Boards, Inc." and I think they have all the old Metrabyte hardware, too, or at least functional equivalents. I've done about a dozen medium to large test systems with this hardware or similar.

memail if you have specific questions and/or want to discuss your application in more detail.
posted by FauxScot at 7:27 PM on November 11, 2010

PXI chassis are painfully expensive, and NI products basically trade money for time.

Without knowing more about your system, it's difficult to recommend, but... There *are* some lower cost NI alternatives, depending on the things you're trying to do. Bottom end for NI are things like the USB-6008, at around US$169. Watch that 12-bit resolution, though.

Next up would be the PCI line, something like a PCI-6221 is common for general purpose DAQ. With a cable and breakout boxm this ends up running US$1000.

LabVIEW licenses are spendy, too, with the full dev package in the US$4000 range. If you have a site license, that makes life easier.

As for beginner's guides, if you use NI's products, their website is pretty awesome. Even without them, some of the white papers can be very useful.

More generally, I started in undergrad (a while ago) with Building Scientific Apparatus.

Sidenote on preview: NI owns Measurement Computing. Hopefully, the LabVIEW support for MC products is good!
posted by underflow at 7:54 PM on November 11, 2010

Edmund Scientific; call them up, and desribe what you want to build; they'll help you spec out a setup.
posted by at at 10:59 AM on November 13, 2010

It would be good if you could tell a bit more about the equipment you want to interface with. Are the motors all interfaced in the same way and, if so, how? Do you have any particular requirements on measurement speed or accuracy? How flexible does the hardware setup need to be, and do you have to accommodate legacy equipment? Are you going to do the same type of measurement over and over, or do you expect to use the setup for many different things?

I think I can give you some good advice, but it would help a lot if you could elaborate a bit on what you want to do first.
posted by springload at 1:53 PM on November 15, 2010

Ok, now I have some more time, so here is some general advice:

Whatever you do, don't try anything based on custom microcontrollers. This isn't effective in terms of either time or money. The less you have to rely on custom electronics, the better. Save those efforts for special amplifiers and other things that you just can't get off the shelf.

Given the optics lab setting, the "physics" tag and your level of experience, I assume that you're at an academic institution. Then you probably have site licenses for several software packages, and you can choose what fits you best. You may also have discount and support agreements with big instrument manufacturers such as NI. I think we get 20% off their list prices.

I used to run a small consultant business, developing custom test and measurement software for other companies in LabVIEW. Now I'm a PhD student, working in a university physics lab, in an environment where the measurements change all the time and instruments of all kinds get swapped in and out. In spite of having worked such a lot with LabVIEW, I don't use it at all anymore. Rather, I write my software in Matlab or Python.

LabVIEW works best for an intermediate level of software development, when you want a monolithic program with a fairly constant feature set, but you don't to customize the details of e.g. user interfaces to the extent that you run into the limitations of the environment. In a lab where things change a lot, I find it much more useful to use an object oriented script language, where I can quickly piece together the software I need for any particular experiment.

If you decide to use LabVIEW (and that may very well be the best choice for you - especially if you value a not-too-steep learning curve), make an effort to look into good programming techniques, both general and LabVIEW specific. NI has a good style guide, read that and follow it. Learn to use the object orientation tools - that way of designing software really shines when you have a modular hardware setup to mimic. Get the book "A software engineering approach to LabVIEW". It's came out before LabVIEW got native OO, but I think many concepts and techniques still apply. LabVIEW code done poorly looks like is nightmarish to maintain and extend, so do yourself the favor of using good style from the start.

When it comes to hardware, it sounds like PXI may be too much for you, but that's hard to say without knowing in what directions your setup may expand. If you need a variety of modules that would otherwise come as discrete instruments (like function generators and RF equipment), PXI may be the cheapest option. It sounds like you could do fine with one or two DAQ cards in PCI slots or on USB ports though, and compared to that, PXI is expensive. General-purpose DAQ cards are very cheap and versatile these days. If you find that you need the capacity a PXI chassis provides, use it with an external computer and an MXI link. The rack-mounted control computers are way too expensive, both to buy and to upgrade, and don't offer any advantages.
posted by springload at 3:26 AM on November 16, 2010

« Older What Would Jesus Do?   |   armstrong bio Newer »
This thread is closed to new comments.