1
\$\begingroup\$

The micro controller I am using (AVR) only has 1 ADC port, but I have 6 analog peripherals, essentially potentiometers. Since I want to use these 6 different signals on 1 pin, I thought about a design for a multiplexing circuit, but I haven't ever done any analog stuff before, so was wondering if anyone could offer some help.

I was planning on putting an NPN transistor and a diode between the potentiometer and the ADC pin of the microcontroller. I would then use 2 digital I/O pins from the microcontroller to select one of the 6 pots. I was thinking that the diode would prevent any of the current from the active pot going to another pot and thus corrupting the signal. Is that along the right lines?

If it helps, I am only dealing with voltages from +5V to +0V. These signals will not be changing that rapidly either nor do they need to be sampled all that frequently (maybe 10-100 samples per second)

\$\endgroup\$
  • 1
    \$\begingroup\$ A drawing of the circuit you are proposing would help us understand what you have in mind. \$\endgroup\$ – The Photon Feb 21 '12 at 0:22
  • \$\begingroup\$ Where can I make a drawing online? \$\endgroup\$ – samoz Feb 21 '12 at 1:09
  • 1
    \$\begingroup\$ How are you planning to select from six inputs with two digital I/O pins? \$\endgroup\$ – markrages Feb 21 '12 at 5:05
  • 2
    \$\begingroup\$ Why are you using a micro with one ADC input in an application with six input signals?] \$\endgroup\$ – markrages Feb 21 '12 at 5:14
  • \$\begingroup\$ Actually I'm dumb. There are enough ADC pins, but there is only one actual ADC unit. That's what I get for not being good at reading data sheets. \$\endgroup\$ – samoz Feb 25 '12 at 22:36
3
\$\begingroup\$

Draw on paper.
Post anywhere OR email to me and I will post. apptechnz@gmail.com.

ANY diode in the signal path will affect accuracy badly.
Probably error of about +/- 0.1V best case or 2% at 5V or 20% at 0.5V.

If you must multiplex ADC use a "real" multiplexer IC to start.
The cheap CD4051 (HEF4051 etc) 8:1 multiplexer will do well enough for playing.

Pricing here - in stock from 52 cents US in 1's.

Datasheet here

eg see below. They use an external ADC but the method is identical for onboard ADC.

enter image description here

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.