Advice on multiplexing sensors

Hello,

I have some sensors that I need to multiplex to a single Arduino.

I just wanted to ask your opinion on what Arduino I should use (space is tight), what multiplexer and the layout? 8-bit is fine, but should I go for an 8 channel MUX? I've heard there can be some noise issues with the 4051, so will that be an issue with multiple sensors?

This question again?

ycans:
I just wanted to ask your opinion on what Arduino I should use (space is tight, so one with no headers), what multiplexer and the layout? 8-bit is fine, but should I go for an 8 or 16 channel MUX? I've heard there can be some noise issues with the 4051, so will that be an issue with 96 sensors?

There are some conflicts. You previously said you had a Mega, but that of course has headers. Why is space so tight that it matters? Your multiplexers - and the connections - are going to take a lot of space so you will have to take that into account anyway. If you use 16-channel multiplexers, a Pro Mini has exactly enough ADC ports to multiplex to 96 while with 8 bit multiplexers you are I think, going to need a Mega.

Don't know why a 4051 would have noise problems as such but the CD4051 has a higher "on" resistance - and therefore more potential noise - than a 74HC4051. Cascading multiplexers would be more of a noise problem, but you should not need to do this (other than the fact that the ATmega already contains a multiplexer, so you are actually cascading a second anyway).

I have 96 sensors that I need to multiplex to a single Arduino.

Analogue sensors or digital sensors? It matters.
Exactly what sensor? It matters.

Thanks for your comments.

Apologies, I have analogue resistive force sensors, each connected to a pull down resistor.

In terms of space, I am very limited height wise, but the multiplexers and sensors will be spread out over a large surface area.

So It looks like using 6 CD74HC4067 multiplexers is the way to go then and I'll probably use a micro without the headers.
Thanks for your help

And note that when using multiplexers - particularly the 74HC4067 with a low "on" resistance - you should need only a pull-down on the common terminal of the multiplexer, not on each sensor.

Of course as in the diagram above, you do need a pull-down for each ADC input.

Yes, thanks for pointing that out

Another option: you could set up a bank of 8-input, 12-bit ADCs and not pass the signal thru 2 layers of analog muxing before an ADC see the signal.

Thanks for that suggestion CrossRoads.

Ycans, I have a question because I have some force sensor like yours. http://www.tekscan.com/flexible-force-sensors
I thought I would need some AMP-OP to read the signal with Arduino. Isn't it?

Tell me what do you think.

Ciao

You can use the sensors with a pull down resistor, however the sensors response to force is not linear.

The quick start boards they provide (very expensive) somehow make them linear. I am conducting a mullt-point calibration for each sensor then using a look up table to read the force to get around having to buy then boards (you need a tensile/compressive test rig though). If you are just using them as a pressure switch (on/off) then you won't need the boards.

The sensors just act as a variable resistor with extremely high (>5M Ohmes) resistance unloaded, then a low resistance when force is applied. Using an appropriate pull down resistor to set your range with a 10 bit ADC works great.

File link does not look valid to me, could be a network issue on my end tho, happens a lot. You can use the "additional options" feature and Attach the drawing instead.

So you're basically connecting a bunch of pots to an analog mux.
One leg of each pot is +5, the wiper goes to an analog switch, the output of the switch goes to a resistor to Gnd and to an ADC input.
The resistance of the pot and the resistor to Gnd makes a voltage divider.
Vout then = Vin * R2/(R1 + R2) where Vin = 5V, R2 is the resistor to Gnd, and R1 is the sum of the force sensor resistance and the switch resistance (70 ohm).

Do I understand that correctly? (In which case, the resistor is not connected correctly.

What is the resistance range of your sensor, and what is the R2 resistance?
Say R2 is 5K, and the force resistor varied from 4M (no force) down to 1K (high force):

Vin R1 R1 R2
5V Rforce Rswitch Rgnd Vout ~Analog Read
5 1000 70 5000 4.118616145 843
5 2000 70 5000 3.536067893 723
5 4000 70 5000 2.756339581 564
5 8000 70 5000 1.912777353 391
5 16000 70 5000 1.18652112 243
5 32000 70 5000 0.674399784 138
5 64000 70 5000 0.361951643 74
5 128000 70 5000 0.187871045 38
5 256000 70 5000 0.095759758 20
5 512000 70 5000 0.048349353 10
5 1024000 70 5000 0.02429378 5
5 2048000 70 5000 0.012176886 2
5 4096000 70 5000 0.00609597 1

Vout = Vin * R2/(R1+R2)
R1 = Rforce + Rswitch
Vout = 5*Rgnd/(Rforce+Rswitch+Rgnd)

AnalogRead = Vout/5V * 1023

That diagram is wrong.
The pull down resistor needs to be placed between A0 and ground. There should be no ground connected to any of your force sensors.
You seem to have connected the resistor to the enable input of your multiplexer.
As it stands that circuit will always read zero, no matter what.

Thanks Mike, I've corrected the drawing so I hope it will work now. :slight_smile: CrossRoads, yes you are correct in your calculations and the sensors can just be treated as pots. When there is no load, they measure at about 5M Ohmes, but under the force I require to measure, they then read at around 25K Ohmes.

I've corrected the drawing so I hope it will work now

Sorry no.
Remove all the ground connections from your sensors, with them you are only shorting the sensors out.

Yes, no ground connections - think of the sensors as one leg and the wiper of a pot, the third leg is missing/not wired.

Of course, thanks for your support. I hope this is better.

Give it a shot, let us know what kind of readings you see.
With Resistance >10K, you may need to wait longer to let things settle (i.e. for the signal to charge the ADC Sample & Hold capacitor) for a good reading.