More is better: I need LOTS of sensors --> Multiplexer? AD Conversion?

Hi there

I am working on a project, where I need as many datapoints as possible. I currently am using 36 sensors but I would like to eventually double that number.

I can set up the sensors to give me either an analog or digital reading. For analog readings I use regular voltage dividers, for digital readings I place a capacitor before my sensor - I then send out a signal and measure how long it takes for the capacitor to discharge. So basically both methods work fine, however the digital one is slightly slower. (A binary reading is not usefull, thats why I measure discharge time.)

My application is time sensitive, thats why I would prefer to use analog inputs. However, if I use multiplexers, I am afraid that this will slow down the system, once the ratio of sensors to "actual" analog inputs becomes higher.

I am using the arduino purely as an interface. The arduino simply reads the sensors and passes them on to the computer.

  • I feel like an arduino might not be the right tool here - can you think of anything more appropreate?
  • Does anyone have any experience on whether this shield: http://www.sparkfun.com/products/9832 would slow down the data readings? and if so, how strongly?
    (with slowing down my reasoning is this: if I would read 48 signals [or more, with additional multiplexers] , I will read them on at a time. I need to wait until I have logged 47 signals, before I can measure signal 1 a second time. If this effect is too strong, it may mess up my application.)
  • Are there an AD conversion shields floating around? I have never seen any, and google pointed me to some code examples for IC's which looked like setting them up would be a lot more work than I am able to put into it...
  • Could daisy chaining (well, vie hardware serial) a couple of arduino Megas do the trick?

Any generall thoughts on how to tackle this?

Thanks

p.

There is only one A/D converter on an arduino and on most other processors for that matter. There is an internal multiplexer. An external multiplexer is not going to slow things down any more than an internal one.
You can get external A/D chips that digitise faster but you will still need to multiplex on the inputs.

so you would go with the mux shield?

I'm gonna order some today - but if there are any other solutions I might want to consider, I would like to hear them.

Well personally I would just buy the chips and wire them up myself, but I suppose you can get a shield.

Have you evaluated Dallas 1-Wire? Your requirements are essentially that technology's principal use case (lots of discrete sensors on a single bus, low latency, etc.). You may want to look at the HA7S serial interface SIP from EDS as well for ease of integration, it's basically a turnkey solution for uC 1-Wire implementations. Hit me up for more details if interested, I've done a lot of work with these.

Yes I think these are too slow for what he wants. It is not the quickest of buses.

There are a lot of ADCs around with SPI/I2C interfaces. If you get say 6 octal ADCs you can read 6 inputs at a time to increase the reading speed. So reading 48 inputs is done in the time it takes to read 6 (plus overheads).


Rob

http://www.analog.com/static/imported-files/data_sheets/AD7656_7657_7658.pdf

6 ADCs in one package, do 6 readings at a time in 3.1uS, read data in via SPI

Put a 16:1 4051 mux in front of each ADC, be all set to quickly take 96 readings.

ooooh 96 readings sounds lovely :slight_smile:

looking at the parts right now.

Here's an Arduino page on the 4051:

http://www.arduino.cc/playground/Learning/4051

At about 60 cents each, that's 8 cents per input...

Ok, I may have said 4051, but the part I was really thinking of was DG406, which is a 16:1 analog switch.
http://datasheets.maxim-ic.com/en/ds/DG406-DG407.pdf

CrossRoads:
...thinking of was DG406, which is a 16:1 analog switch.

On ebay the DG406 is about $20, while the 4051 is about 60 cents - does it provide that much more benefit?

And yet just $2.71 at Mouser.com
http://www.mouser.com/ProductDetail/Vishay-Siliconix/DG406DJ-E3/?qs=sGAEpiMZZMtxrAS98ir%252bs6MEv0rHv5%2FwsTV%2F%252bN1hakY%3D

ebay not always a deal over the real distributors

Choice is up to the designer - 5 parts vs 10 parts, another level of muxing needed to get the 8:1 down to 2:1 to go into the ADC, different method needed to have more control lines, etc.
If building a one-off design or prototype, have that many more power ground connections, more decoupling caps, etc.

4051B is 68 cents Canadian here, with inexpensive shipping to boot.

The below uses the 4067 chip which mifht be of interest. Using multiple chips in various configurations, one can have hundreds of inputs available if desired. Bottom is a thought from the past.

TI's 4067 chip also available in a "non-breakout board needed" DIP (for protyping) for $1.39

Review switching times, on-resistance, etc, lots of ways to get to a final solution.

So is the difference (analog input-wise) between the ATmega328 and the ATmega1280 is simply that ATmega1280 does more multiplexing?

I guess I am going with the 4067 for the time beeing (as I did here: http://arduino.cc/forum/index.php/topic,66649.0.html).

If its too slow, I can allways look into hooking them up to additional A/D converters...

is simply that ATmega1280 does more multiplexing?

Yes

The discussion before this involved running these 16:1 muxes into a 6-channel ADC that wasn't muxed, so 6 conversions are done at one time and then read via SPI.

yeah, i got that. basically I will just do the 16 x 6 thing with the regular anaolg inputs, and then if I have trouble connect them to the A/D converter you suggested instead.