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?
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).
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.
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?
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):
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. 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.
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.