Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Analog multiplexing

Status
Not open for further replies.

sandeepa

New Member
Hello all

Does using analog multiplexing require any particular considertaions to be taken care of?
I have a circuit with a 12 bit ADC,ADS1286.The input is in mV(steady inputs right now), which is fed to the ADC through an amplifier(gain=100).Using 16f877a.
Now all was fine(variation of +/-1 LSB) when the input was directly connected to the amplifier.
Sometime back,I put a multiplexer (cd4097),to make it multi channel.(change of channel every second).After which,the readings have been going beserk(variation of around 20,no specific pattern).
Tried keeping the multiplexer channel steady,.i.e.gave the input to just 1 channel,read once per second.No effect.
This is the code I am using to slect the multiplexer channel

Code:
;PORTE connected to channel select pins A,B,C of 4097 
;spi_interface_port=PORTC
;RC0 connected to INH of 4097
	clrf	PORTE
	banksel	TRISE
	clrf	TRISE  ;set PORTE as output
	clrf	STATUS
	bcf		spi_interface_port,bit0;get the INH pin low to enable the chip
	nop     ;settling time                   
	nop
	movlw	b'00000001';select channel 1
	movwf	PORTE
	nop;settling time
	nop

So,I would like to know whether there are any particular issues regarding analog multiplexing,taht ahould be considered,and I have missed??

Thanks.
 
Are you multiplexing before the x100 opamp, or after?.

If it's before, I wouldn't be surprised at your variations!, try doing it after the amplification (one for each channel).
 
Multiplexing is before the amplifier.
Is multiplexing used after the amplification,generally?

And why does the multiplexer make so much of a difference?I mean,how come without the mux,I am getting pretty much stable readings?

Thanks.
 
It sounds like this might be a settling time issue. If you change the MUX it takes a certain amount of time fo the new voltage to pass through the MUX. If you start your ADC conversion before the voltage has stabilized you will get weird readings. Look on the datasheet for the settling time after changing channels and make sure you don't start the conversion before the settling time is over.
 
sandeepa said:
Multiplexing is before the amplifier.
Is multiplexing used after the amplification,generally?

And why does the multiplexer make so much of a difference?I mean,how come without the mux,I am getting pretty much stable readings?

You are amplifying any noise from the multiplexer 100 times, along with the signal - they aren't designed to be used at such low signal levels. Far better to use the multiplexer at a high signal level, where any noise will be insignificant.

Do you really need 12 bit resolution?, and what are you using as a reference for that accuracy?, for that matter what tolerance resistors are you using around the opamp?. Considering the 16F877 has internal 10 bit A2D (with an internal multiplexer), why not use that?.
 
It sounds like this might be a settling time issue.

The datasheet gives the propagation delay times in ns,I have used 2 nops in between,which should give a delay of 1 us(8MHz crystal).Also,the same variations are still there when I select just 1 channel.

Do you really need 12 bit resolution?, and what are you using as a reference for that accuracy?, for that matter what tolerance resistors are you using around the opamp?.

I am intending to use this with thermocouples.So,12 bit resolution with a 3V reference gives me a resolution of around .2C,which is required.As of now I ahve used the usual 5% tolerance resistors.

I have used the multiplexer before amplification,for the obvious reason of reducing component count and board space.Are low voltage input signals generally NOT multiplexed before amplification?

Have read about the use of anti aliasing filters to reduce noise,when using 12 bit resolution.Thats the only thing I havent done so far.(All other things like seperate grounds,bypass caps etc are all there).
Will using this filter reduce the variations due to the mux?

Thanks.
 
sandeepa said:
I have used the multiplexer before amplification,for the obvious reason of reducing component count and board space.Are low voltage input signals generally NOT multiplexed before amplification?

Anything you do before the amplification will have any noise amplified as well, so it's usual to do the multiplexing AFTER amplification.

Have read about the use of anti aliasing filters to reduce noise,when using 12 bit resolution.Thats the only thing I havent done so far.(All other things like seperate grounds,bypass caps etc are all there).
Will using this filter reduce the variations due to the mux?

You may be able to reduce it, but it's not a cure for bad design - use your multiplexer at higher signal levels.
 
The datasheet gives the propagation delay times in ns,I have used 2 nops in between,which should give a delay of 1 us(8MHz crystal).Also,the same variations are still there when I select just 1 channel.
Sorry. I guess I misunderstood your first post.

Nigels right about the MUX. Putting it before your amplifier will increace its noise contribution.

Another place you might be adding noise is your reference voltage. Make sure you have a lot of decoupling on this pin. Also make sure you decouple the supplies for all your analog chips.

With thermocouples an agressive low-pass filter will cut down on your noise without too much negative effect - the temperature of your system can only change so fast. You still shouldn't be seeing that much noise.

If you are really trying to reduce your component count you might be better off finding a controller that has a built in MUX, gain stage, and 12 bit ADC. Silicon Labs' C8051f350 would be perfect for this application. Cypress PSoC uC would also be a good fit. I don't know how much trouble it is to get these chips in India though.
 
I don't know how much trouble it is to get these chips in India though.

Thats the first thing to consider,I suppose while designing out here.Its quite frustrating at times to read about all the good chips,only to find that none of them are easily available.

Looks like amplification-->multiplexing is the right way of going about doing things,instead of the other way round.

Anything else you guys suggest I should lookout for?

Thanks.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top