11 years, 5 months ago.

Transform in analogIn pin

Hello all,

I have 7 sensors. I need to take its mesures always. But there 're only 6 analogIn. How can I transform an other pin to an analogIn ? (for exemple the P14)

Thank you for your answers.

3 Answers

11 years, 5 months ago.

You can't, there is no hardware behind the other pins which can do an AD conversion.

You can use an analog multiplexer to use several sensors on one ADC input, but then you probably might just as well use an external AD converter. Or use sensors with onboard AD converter, you can get pretty much every sensor like that. Generally that is a superior solution compared to using the ADC of a microcontroller.

Accepted Answer
11 years, 5 months ago.

Yes, completely agree with Erik, an external ADC using say SPI will give superior results and are easy to drive. You can also select one to match more closely your interface requirements.

11 years, 5 months ago.

You can use a multiplexer for an existing analogIn pin. I think that a multiplexer is much cheaper than a ADC. It depends on what you have to measure.

for me i have 8 sensor thermistor but i can't converts them because the mBEd has only 6 alanog in hox I can use the multiplexer please ? have you any suposition ? thanks

posted by temam rabah 09 Apr 2013

you can use cd4051 or other multiplexer for your "8 sensor thermistor". Use 3 digital pins for selecting one of the sensors and 1 analog pin (ADC) for reading the sensor.

posted by Titi Tix 11 Apr 2013