Login Join Maker Pro

# Multiplexing an A/D convertor

D

#### Dennis Dunn

Jan 1, 1970
0
Hello,

I would like to connect 1 of n sensors to an A/D convertor. The idea is
to have a microcontroller select one of the n sensors and then have the
A/D do it's thing and then move onto the next sensor. The thing that I'm
not sure of ... rather make that "one of the things" ... is how do I
switch the input of the A/D chip to the ouput of the various sensors?

If the sensors provided digital signals it would be a simple matter but
the output of the sensors are voltages that vary from 0V to 5V. The two
devices I am using are an absolute barometric pressure sensor and an
accelerometer, in the future I would like to add two more accelerometers.

I would appreciate any clues as to what I need to look into next.

Thanks for your time.

--dennis

C

#### CFoley1064

Jan 1, 1970
0
Subject: Multiplexing an A/D convertor
From: Dennis Dunn [email protected]
Date: 4/13/2004 7:54 PM Central Standard Time
Message-id: <AZ%ec.8400$B%[email protected]> Hello, I would like to connect 1 of n sensors to an A/D convertor. The idea is to have a microcontroller select one of the n sensors and then have the A/D do it's thing and then move onto the next sensor. The thing that I'm not sure of ... rather make that "one of the things" ... is how do I switch the input of the A/D chip to the ouput of the various sensors? If the sensors provided digital signals it would be a simple matter but the output of the sensors are voltages that vary from 0V to 5V. The two devices I am using are an absolute barometric pressure sensor and an accelerometer, in the future I would like to add two more accelerometers. I would appreciate any clues as to what I need to look into next. Thanks for your time. --dennis Look into the 4066 CMOS quad analog switch. It gives you four bilateral switches, and you can set it up quite easily so it will switch one of the four sensors to your A to D input (view in fixed font, or M$ Notepad):

Analog Multiplexing With a 4066
.-------.
| |
Ain(1)o---------o 4066 o-------o-------------o uC A-D Input
| | |
| | |
'---o---' |
| |
'-----------|-------------o Sel 1
.-------. |
| | |
Ain(2)o---------o 4066 o-------o
| | |
| | |
'---o---' |
| |
'-----------|-------------o Sel 2
.-------. |
| | |
Ain(3)o---------o 4066 o-------o
| | |
| | |
'---o---' |
|-----------|-------------o Sel 3
.-------. |
| | |
Ain(4)o---------o 4066 o-------'
| |
| |
'---o---'
|
'-------------------------o Sel 4

created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

This setup's a bit of an I/O hog, because you need 4 uC pins to select one of
the four switches, but you can do it with one chip. There are other ICs that
will do the job, too. Some have 1-of-n decoders built in, and other features.
Look around -- you'll be amazed how many different ways there are to skin this
particular cat.

http://www.onsemi.com/pub/Collateral/MC14066B-D.PDF

Good luck
Chris

K

#### Kevin Aylward

Jan 1, 1970
0
CFoley1064 said:
Look into the 4066 CMOS quad analog switch. It gives you four
bilateral switches, and you can set it up quite easily so it will
switch one of the four sensors to your A to D input (view in fixed
font, or M$Notepad): This setup's a bit of an I/O hog, because you need 4 uC pins to select one of the four switches, but you can do it with one chip. There are other ICs that will do the job, too. Some have 1-of-n decoders built in, and other features. Look around -- you'll be amazed how many different ways there are to skin this particular cat. Thats correct, so why not suggest the analogue multiplexer right of the bat, say the 4051? Kevin Aylward [email protected] http://www.anasoft.co.uk SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design. G #### Gareth Jan 1, 1970 0 Dennis said: Hello, I would like to connect 1 of n sensors to an A/D convertor. The idea is to have a microcontroller select one of the n sensors and then have the A/D do it's thing and then move onto the next sensor. The thing that I'm not sure of ... rather make that "one of the things" ... is how do I switch the input of the A/D chip to the ouput of the various sensors? If the sensors provided digital signals it would be a simple matter but the output of the sensors are voltages that vary from 0V to 5V. The two devices I am using are an absolute barometric pressure sensor and an accelerometer, in the future I would like to add two more accelerometers. If you want to use one ADC with four sensors why not use a four (or more) channel ADC. There are lots of these available from the usual ADC manufacturers: www.analog.com www.maxim-ic.com www.ti.com www.linear.com You can also get microcontrollers with multichannel ADCs built in, though possibly not the one you want to use. Gareth -- R #### Rich Grise Jan 1, 1970 0 Kevin Aylward said: .... Thats correct, so why not suggest the analogue multiplexer right of the bat, say the 4051? Probably the same reason I didn't - we were waiting for somebody who remembered the part number to chime in. Cheers! Rich D #### Dennis Dunn Jan 1, 1970 0 Hello again! Thanks for all of your suggestions, next stop is the Digi-Key catalog! I didn't know there was such a thing as a quad-analog switch although it doesn't surprise me. This is the 21st century, after all. I was going to start learning about uC programming using Microchips PIC starter kit. I figured that$40 was a cheap investment to help ensure
success in the beginning. Do you have any comments or suggestions?

Thanks again.

--dennis

F

#### Fritz Oppliger

Jan 1, 1970
0
Hello again!

Thanks for all of your suggestions, next stop is the Digi-Key catalog! I
didn't know there was such a thing as a quad-analog switch although it
doesn't surprise me. This is the 21st century, after all.

I was going to start learning about uC programming using Microchips PIC
starter kit. I figured that \$40 was a cheap investment to help ensure
success in the beginning. Do you have any comments or suggestions?

Thanks again.

--dennis

I use the 4051. With 3 digital lines you can select 8 analog channels.
going into a CS5501 type 16bit ADC .
Downside, you have to let the port settle between reads but that may be
true for multi channel ADCs too.

Replies
4
Views
1K
Replies
3
Views
535
Replies
2
Views
666
Replies
2
Views
996
Replies
3
Views
1K