100+ channel data acquisition

Discussion in 'General Electronics Chat' started by rrenslow, Mar 8, 2011.

  1. rrenslow

    Thread Starter New Member

    Mar 8, 2011
    3
    0
    Ultimately my goal to measure potentials (0 to 2 V range) of hundreds of small fuel cell electrodes. I am a chemical engineer and need help due to lack of electrical engineering knowledge.

    I have a Measurement Computing USB-1608FS and Matlab to control it. It has 8 analogue channels and 8 digital IO channels.
    Specs are here.

    How can I use this to measure 100+ potentials? The measurements do not need to be simultaneous. Is there any way to have each analogue channel read several potentials consecutively? I was thinking there is a way to use the digital IO channels to control a switch of some sort. I really have no idea about circuits, but I think I have heard that it is possible to use a digital signal to control a switch.

    Just to be clear, I know how to control the USB-1608FS, and I know how to use Matlab to access all the channels. My question is regarding essentially multiplying the number of channels so I can take more readings than just 8.
    Thank you for any help, it is much appreciated! Cheers.
     
  2. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    There are different ways to do this, but you need to specify some constraints first. Some of the most important are:

    1. What kind of voltage resolution do you need?
    2. How fast does each measurement need to be made?
    3. How much time can you allow for switching to the next channel to be measured?
    4. Is this a one-off situation or will you need to replicate it in multiple systems?
    5. Do you have access to anyone who can do some EE design work for you?
    6. What's your budget?
    The first three questions are the most important. Think carefully before answering because costs can rise dramatically with increased resolution or faster speeds. Or let us know if you absolutely have to use the stuff you already have on hand (there might be other choices that are better).

    A good thing to do is to pretend you already have the system and write down an example of the data you want from it and show what decisions you want to make from the data. In other words, focus on the objectives and let them drive the tactics.

    An off-the-cuff answer would be to take a look at the specs of an IC like the classic 4066, a quad bilateral switch. A number of those might be able to do what you need to do; the digital I/O channels would be used to select which input channels were connected to which cells in groups of 8. You might need to use some auxiliary CMOS logic chips, but these are cheap and available.

    Alternatively, if your voltage resolution can be down around 8 or 9 bits, I'd consider using some PIC processors, as they're cheap (a 16F690 has 12 analog channels and goes for 3 or 4 bucks). They could be tied together with a common serial communication bus or some serial EEPROM could be used with each processor to log the data at a desired rate; it could be read out later.

    Another approach (which I haven't used in 25+ years) is to use a general purpose scanner, such as the HP 3488, 3495, or 3497. These were HPIB (now called GPIB) instruments that let you switch between signals; the signals were typically routed to a digital voltmeter (the 3497 could be had with a built-in digital multimeter). Agilent and others sell similar stuff today, but I'm not familiar with their offerings.

    There are also lots of practical things that you might run into, like noise problems, cross-talk, switching transients, etc.
     
  3. rrenslow

    Thread Starter New Member

    Mar 8, 2011
    3
    0
    Thank you for your reply. First, here are answers to your questions:

    1. What kind of voltage resolution do you need?
      1 mV resolution is fine. A reading such as 802 mV +/- 1 mV would be just fine. To clarify the range, generally the data will fall between -1000 to +1000 mV.
    2. How fast does each measurement need to be made?
      Not fast at all. Measuring each channel once every 3 hours is fine. And again, the measurements do not need to be simultaneous, they could all be evenly distributed over the entire 3 hour duration if necessary. Speed is a low priority as the potential will change very slowly.
    3. How much time can you allow for switching to the next channel to be measured?
      The time constraints are minimal. I just need to measure all channels within a 3 hour period. Switching between channels could take over a minute or more, no problem.
    4. Is this a one-off situation or will you need to replicate it in multiple systems?
      It will need to be replicated eventually, probably with fewer channels though.
    5. Do you have access to anyone who can do some EE design work for you?
      Yes, I have access to someone who can do EE design work for me. However, if possible I would like a simple solution that I can implement myself, I think I just need to be pointed in the right direction.
    6. What's your budget?
      Max around $1000 unless there was an incredibly convincing reason to go over that. So it is a little flexible.

    I do not necessarily have to use the equipment that I have, however, my ability to control the USB-1608FS and use Matlab to collect/analyze my data is very appealing to me. I already have those skills, and using Matlab makes my life very easy.

    You mention that I should pretend I already have the system, and write down an example of the data that I want. Here is my example:
    3/8/11 8:00 PM Ch1 -512 mV
    3/8/11 8:01 PM Ch2 -489 mV
    3/8/11 8:02 PM Ch3 -668 mV
    ...
    3/8/11 9:39 PM Ch100 -654 mV
    3/8/11 9:40 PM Ch1 -513 mV
    ...

    The time between readings could be less or more, of course less is better. Also, 100 channels is just an estimate. If there could be more channels, that would also be better. Hopefully that helps make sense for what I am trying to do.

    I looked into IC 4066, PIC processors, and HPIBs. Hopefully with the expanded information you can point me to the best option. What about multiplexers? These seem cheap and easy to control, and my EE friend thought they may work, but he told me to ask here to make sure. What if I used multiplexers in series? This would be possible because the USB-1608FS has 8 I/O digital channels. Thanks again for your help. Let me know if I can clarify anything else.
     
  4. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Four ADG732 muxes may do the job:

    http://www.analog.com/en/switchesmultiplexers/multiplexers-muxes/adg732/products/product.html

    That gives you 128 channels to switch between. They take in a binary input, plus a chip select will allow you to multiplex between four. You could use a DIP switch to control the channels. (No idea how it handles invalid inputs, so you'll need to test this.) If you want to automatically switch between channels, you could use some digital outputs on a PIC to do it.

    Note the chip is surface mount, it is also $5/each in low quantities. You'll need to either get a breakout board or make your own PCB.
     
    Last edited: Mar 9, 2011
  5. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    Typically this would be done with a data acquisition switch unit and some multiplexer cards. You could probably pick something up on Ebay as there are tons of old test equipment floating around not.
    An Agilent 34970A with 3 x 34908A 40 channel multiplexer cards would work perfect but is a little over your price range.
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    1 mv over a range of 2 volts means a minimum of 12 bits in the A to D conversion. That is more than PIC's A to D converters can resolve, not to mention the negative voltage range.

    You might need something more like this device - http://www.analog.com/en/analog-to-digital-converters/ad-converters/ad7895/products/product.html

    Or this - http://www.analog.com/en/analog-to-digital-converters/ad-converters/ad7658/products/product.html

    In both cases, a buffer/s with gain after the analog switching will give the resolution you need.
     
  7. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    I'd agree that the higher input count would make overall application easier. The digital outputs of your aquisition card act as your mux address lines. You could reduce your input count and proportionately increase your device count if physical placement dictates.

    Your 16bit aquisition card is ample for resolution.
     
  8. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
  9. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    1 mV resolution out of 1 volt is 1 part in 1000 or about 10 bits. Since you're including the negative chunk also, that means 11 bits of resolution needed. You didn't give an overview of how you wanted to use the data to make decisions, so I can't critique what you're doing. I've found through decades of experience that examining the experimental objectives, learning what the person knows about experimental design & statistics, doing a blue-sky of the design alternatives, etc., all help towards using resources effectively and making better decisions (and most experiments are done to help make good decisions). My first question would be what in the physics of what you're doing demands that resolution? I'm not asking that to be antagonistic, but rather to get you to examine the experiment's needs to see that they justify that resolution. If I was e.g. your boss in an industrial setting, I'd ask you to prove to me why you can't do this work with 8 bits of resolution. Again, not to be a PITA, but to demonstrate that you really know what you're doing so we'd feel good about spending the company's resources on this. Similarly, I'd ask you to show me your experimental design (e.g., are you using a screening design or a fractional/full factorial?) and ask if you had consulted with the company statistician. I'd also want to know your null hypothesis, alternative hypothesis, ask you to demonstrate what you know about your experiment's type 1 and type 2 errors, and then show me how you plan to analyze your data. I'd want to see your calculations showing you understand how your measurement uncertainties will propagate into your conclusions. These are all aspects of good experimental design before you ever get near designing any hardware.

    The 11 bits of required resolution rules out using the PIC processors as they only have 10 bit resolution. Since you have an A/D card, I'll assume you'll use that. Your 8 bit digital IO can control the multiplexing (i.e., selecting the channels that input into the A/D channels).

    Because your required reading rate is so slow, I don't seen any problems in that area. If you run into noise issues, you can do some averaging that can help.

    I like Tom's find of the 32 channel multiplexer. I think that's the approach I would take if it were me, but it does mean you'll have to build some hardware. I think I'd buy 8 chips and put one chip on each channel of your A/D card. Then you can handle up to 256 channels.

    The other approach is to use a scanner such as the HPIB ones I mentioned or more recent ones. Buying these new is out of the question as they are out of your price range, but you can find older ones reasonably priced on ebay. You'd also need a GPIB adapter and those go from, say, $100 to used to $600 new. This is probably not the right approach for you. However, there is one aspect of using these that makes them attractive: they typically have nice hardware to help you connect signal lines. This can be a PITA; I don't know if you've fully realized what a mess 100 or 200 lines is going to be.

    I suspect you'll blow much of your remaining budget on getting the hardware designed and built. To control the complexity of all those signal lines, you may want to e.g. run ribbon cable to the units under test. If it was me, I'd want to use twisted pair ribbon cable and make differential measurements. That would cut your analog channels down to four if you insist on using the existing hardware, but that shouldn't be a problem at your A/D card end nor with reading rates. Your EE can help you decide whether to use single-ended or differential measurements in the environment you'll be testing in. I doubt you'll be able to get anywhere near that 16 bit resolution your card said it can do with its chest all puffed out.
     
    Last edited: Mar 9, 2011
  10. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Are the batteries in series? How do you plan to isolate the ground so the inputs on whatever you use don't see voltage outside their range?
     
  11. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
    More hardware! A 12 channel, 12bit adc, battery monitor chip LTC6802-1.
     
  12. rrenslow

    Thread Starter New Member

    Mar 8, 2011
    3
    0
    Thank you everyone for your help.

    tom66: I was looking at the ADG732, they look like a good option. Also, since that mux only takes 5 digital inputs, the USB-1608FS will have 3 left over. Maybe I could use those three to control 8-channel muxes that are in series with the ADG732, if I needed even more channels.

    mcgyvr: For most of our experiments we have been using Agilent 34970A data acquisition units, however I thought that I could use the USB-1608FS and save a lot of money. Also it would have the ability to have more channels. I am now thinking that I want to shoot for 1024 channels instead of 100. From my research on muxes in series, it seems possible and very cheap.

    beenthere: Thank you for this information. What benefit would the AD7658 and AD7895 have over my USB-1608FS. I am not sure how to use the AD7658/AD7895, so I will ask my EE friend for more help.

    getdeviceinfo: Yeah, I think this is the best idea so far. At least I understand it. Thank you for your input.

    t06afre: The long measurement cables should not be a problem. I think all fuel cells that I will measure will be within 3-4 feet of the USB-1608FS. They are very small. I looked at the ADAM-5017, but I think I do want 1 central data acquisition board that will have 100-1000s of channels. Thus the USB-1608FS with muxes seems like it should work.

    someonesdad: I appreciate your help immensely, and I appreciate your questions. The main goal of my experiment is to compare electrode potentials which are run under different conditions. I am coupling my experiments with mathematical modeling. From previous experiments and modeling requirements, small changes in running conditions can shift the electrode potentials in the mV range. Measuring to an precision of 0.1 V would generally only distinguish the difference between our anode and cathode. A precision of 0.01 V would allow us to detect large differences between cathodes. But a precision of 0.001 V (1 mV), would allow us to detect small changes between running conditions that can then be used to calculate concentrations using the Nernst equation. Due to the logarithm, a change of 1 mV can change the concentration of reduced and oxidized species by ~10%, depending on which chemical species we are looking at. If I could only measure 10 mV changes, the calculated concentration could change by as much as 100%. Also, mV resolution is also what is typical and acceptable in the peer-reviewed journals for our research area. If we want to publish our results, mV resolution would be the minimal that would pass the reviewers. You're not being a PITA, you ask great questions.
    The statistical requirements are great questions. This would have more to do with why I need 100-1000 channels, rather than the mV resolution. Currently I am in the experimental design phase, so I do not know the number of channels I will need in the end. A lot of this in the end will probably depend on how much money my PI can allocate for this experiment. My goal now is to determine what is possible, how much money will it take approximately, and how hard will it be to set up (can I do it, or do I need an EE). For now, let's assume that all of my experimental design is superb and I actually do need 100-1000 channels. I definitely agree that dealing with hundreds of lines is going to be a pain. I have run up to 40 lines, so I have somewhat of an idea, but the pain will be worth the results.
    So let's run with the multiplexer idea. These are my thoughts from what I have read so far. Since I have 8 digital I/O lines using my USB-1608FS, I could control two sets of 16-channel muxes. If I hook up 1 analog channel to a 16-channel mux which is hooked up to sixteen other 16-channel muxes in series, that would give me 256 channels. I could do this for all 8 analogue channels, giving me a maximum possible 2048 channels (8*16*16). Is there anything flawed with this thinking? Of course, this is overkill, but I am just making sure I understand what is possible. In the end, I could just use 4-channel muxes to give me 128 channel (8*4*4) or use 8-channel muxes to give me 512 channels (8*8*8). Or like you said, I could use eight 32-channel muxes for a total of 256 channels (8*32). If this sort of thinking is correct, than the next step would be for me to ask a few mux specific questions. From looking at costs of muxes, I should be able to keep the total cost below $200, besides the cost for wire. What would be the benefit of using twisted pair ribbon cables?

    blueroomelectronics: the electrodes are all independent, and will be compared to a reference electrode (Ag/AgCl). The potentials should never exceed 1000 mV, in fact, anything larger than +/- 500 mV would be rare, but possible.
     
  13. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The spec's on the USB device shows 8 input channels, but that they are single ended. That means they do not have the ability to convert negative voltages. And from personal experience, 16 bits is an enormous pain to work with.

    My feeling is that the switching is going to occupy a fair amount of real estate, necessitating a custom PCB. Having the buffer amps and the A to D on the same real estate can eliminate all kinds of noise and cabling issues separate from the ones you are going to have to address as is.

    Re the converters, 14 bits is a bit more than you actually need, but the conversion times are faster than 16 bits (as a rule of thumb), and I have been working with 14 bit converters for years, so it's easy for me to recommend them. If your EE knows really good analog grounding techniques, it will help.
     
  14. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    I'm glad to hear you're putting in significant effort in the design of the experiment. Many folks (including me when I was younger) just barge right in and start making measurements without careful thought. This is virtually always less efficient than doing some up-front planning. Of course, you also need to do some preliminary measurements to see if your proposed design choices make sense.

    If you're doing research with an eye to publishing, I strongly recommend using the concepts from the GUM to help you make intelligent decisions from your data. It's stuff that every scientist and engineer should know. (I can't believe how many bone-headed people there are that publish useless papers -- a thoughtful user can't use their results because the authors don't know the basics of reporting measurement uncertainty.) If you have rather complex equations that make the analytical approach hard (usually the case in real-world problems), check out the supplemental publication on Monte Carlo techniques and recommendations. Since I like using python, Eric Lebigot's uncertainties package is a tool in my toolkit. It makes uncertainty propagation trivial, including correlated stuff (I used Monte Carlo techniques for 30+ years, then found Eric's stuff).

    One thing to think about is the architecture of the multiplexing. Since your acquisition rate appears to be pretty slow, you don't need high speed stuff. Thus, consider using a serial interface for controlling the mux. This keeps the wire count down -- just 2 wires. You can get a USB to serial adapter for $10 or so and an EE can tell you how to translate the resulting voltages to TTL levels (or there are things that do this directly; I have two of these that talk to TTL serial interfaces on some test instruments). Then a single PIC chip can be on the mux board; it provides the interface to and from your controlling computer and its output pins can be used to control the mux chips. Now, I haven't done this myself since I just started fooling around with PIC stuff, but it appears to be eminently doable (and there are some very smart and experienced folks on AAC who will help you when you need it). And, no doubt, there's somebody's code out there that you can leverage (that's the nice thing about using a microcontroller). Don't get scared of doing such things yourself; if a decrepit and drooling geezer like me can figure it out, you won't have any problems. Additionally, if you choose to use PICs, your mux board can use as many of them as you need (they're cheap) and they can be connected together with a serial interface like I2C or SPI. Then it's just a SMOP (simple matter of programming). :p

    Seriously, if you think this something you want to think more about, PM me and I'll explain some of the things I've learned recently. Then, if it appears useful, we can post it here for others to laugh over...

    I worry about measurement noise causing you problems to attaining your desired 1 mV resolutions. The specs say the accuracy is about 0.7 mV and optimistic manufacturers specify such things only when their marketing engineers have been smoking some good stuff. A general rule of thumb is that if you want to report results to 1 mV, you probably should be measuring to 0.1 mV. And I've learned through hard experience that technical folks (me included) almost always underestimate measurement errors.

    Twisted pair cables can help keep down common-mode noise -- and that's easy to pick up in industrial/lab environments. You can make some experiments to simulate what things will be like in the lab. Use a scope and inspect your signals when they are run with plain pairs of wire and twisted pairs. Cut up an old CAT5 networking cable to get 4 twisted pairs. You might find that you'd be better off doing some preamplification right at the fuel cell to get the signal voltages up by e.g. a factor of 10. Of course, this increases the amount of electronics you have to build, but it might improve your signal-to-noise ratio. You should probably test such ideas out in choosing a design. I'm not an EE, so I'd certainly recommend you talk to an experienced one and get some design thoughts. At the very least, get a copy of "The Art of Electronics" and do some reading in chapter 7, "Precision circuits and low-noise techniques", especially the section on interference. You also may want to take a look at an old HP application note.
     
Loading...