2
\$\begingroup\$

Is it possible to detect multiple analogue signals from different analogue sources onto 1 analogue input pin on a micro controller. Another way of asking this question is that we can detect multiple digital signals from a single analogue input by attaching different values of resistors to each digital input source and then when a digital source is activated the specific voltage can be detected using an analogue input, so similarly would it be possible to detect multiple analogue voltages using a single analogue input pin on a micro controller?

\$\endgroup\$
2
  • \$\begingroup\$ I think you just want an analog multiplexor (channel select, enable, etc options on the IC) feeding into your single ADC input. \$\endgroup\$
    – KyranF
    Oct 30 '15 at 23:11
  • \$\begingroup\$ If you mixed two analogue signals can they be unmixed? Generally not. \$\endgroup\$
    – Andy aka
    Oct 30 '15 at 23:29
3
\$\begingroup\$

Is it possible to detect multiple analogue signals from different analogue sources onto 1 analogue input pin on a micro controller.

It depends on the signals. If they are for example sinusoids (of different frequencies), then you can do a [fast] Fourier transform and find them. For arbitrary signals, I think the answer is no. You need to clarify what you mean by signals.

Another way of asking this question is that we can detect multiple digital signals from a single analogue input by attaching different values of resistors to each digital input source and then when a digital source is activated the specific voltage can be detected using an analogue input

This is not the same problem as in your previous question. Here you have multiple input pins via the resistors and you differentiate the signals (presumably of the same amplitude) by giving them different amplitudes using your resistors.

would it be possible to detect multiple analogue voltages using a single analogue input pin on a micro controller?

This is more or less a repeat of your 1st question. If you ask however whether an arbitrary DC sum can be detected/split: the answer is obviously no. How could you tell the difference between 1V+1V and 0.5V+1.5V by just measuring the total/sum?

\$\endgroup\$
2
  • \$\begingroup\$ The OP's second 'question' is intended as an example of how multiple digital signals can be differentiated on a single (analog) input pin. He's not asking how to do it. \$\endgroup\$ Oct 31 '15 at 10:09
  • \$\begingroup\$ @Nick Johnson: Yes, and I've explained to him how that differs from this actual/first question. \$\endgroup\$
    – Fizz
    Oct 31 '15 at 10:13
2
\$\begingroup\$

No. There would be no way to know which analog signals were contributing to the sum.

The problem is not unusual, however, and the standard solution is time-division-multiplexing. Your micro probably has one ADC (analog-digital-converter) internally and several input pins can connect to it in quick sequence, the only requirement being that the switching and conversion start are correctly synchronised. In your case, if you really have only one analog in then you will need to do the analog switching externally. Something like CMOS 4016 chips might do the trick. The analog switches will require control by output pins from the micro so it won't help your pin count.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the answer transistor. Could multiplexing analogue voltages be a solution. Say you have a matrix of LDRs and a set of analogue inputs on y and x axis, could they be used to somehow detect variations in amount of light? \$\endgroup\$ Oct 31 '15 at 23:01
  • \$\begingroup\$ Maybe. You're problem will be that current will go everywhere on the grid through every LDR that's even partially on and mix up your readings. I suggest you accept the best answer you got here and pose a new question outlining what you're trying to achieve. If you can do (even a partial) schematic with the schematic editor it will be a big help. Also have a look at keyboard and LED matrces to see how they work. It does sound as though you're designing an LDR-based camera sensor. \$\endgroup\$
    – Transistor
    Oct 31 '15 at 23:53
0
\$\begingroup\$

No. Your digital analogy works only in digital domain since the inputs have just two possible voltage values (ideally). What you described is basically a D/A followed by your A/D.

If you make a weighted sum of two analog signals, one with weight 1 and other with weight 10, how could you tell the difference from a 10 mV variation in the first from a 1 mV variation in the second?

But if you elaborate more on your signals (amplitude, required measurement precision, bandwidth) and your A/D capabilities, there might be a way to mix them (no just adding). But it is very likely that this solution would not have good performance and cost more than replacing your micro-controler.

\$\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.