Pages: [1] 2   Go Down
Author Topic: More is better: I need LOTS of sensors --> Multiplexer? AD Conversion?  (Read 2812 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 3
Posts: 722
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

« Last Edit: July 14, 2011, 01:01:54 pm by fkeel » Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34602
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
God Member
*****
Karma: 3
Posts: 722
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34602
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 174
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34602
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8605
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
God Member
*****
Karma: 3
Posts: 722
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ooooh 96 readings sounds lovely :-)

looking at the parts right now.
Logged


Victoria, BC, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 222
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* DG406_16to1_switch.jpg (77.62 KB, 960x720 - viewed 29 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Victoria, BC, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 222
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

...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?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: July 16, 2011, 12:44:13 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9701
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://www.sparkfun.com/products/9056

Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Pages: [1] 2   Go Up
Jump to: