Electronic – arduino – How to extend the number of analog (input) pins available to me

analogarduinohardwareinputmultiplexer

I already know how to extend the number of digital pins on an Arduino using a multiplexer.

I want to increase the number of analog input channels that I have. One solution is to add another Arduino as a slave.

How would I increase the number of analog input channels? (I assume some MUXing and ADCs are involved). If it's too complicated to write in an answer, a general outline of circuit/code would be fine as well.

I am also open to shield suggestions, though I'd prefer it if there was a not-too-hard hardware solution.

Best Answer

If you're already familiar with digital multiplexer chips, good news! They can be used for analog signals as well.

http://playground.arduino.cc/Learning/4051

The basic premise is exactly like with digital signal multiplexing. You use the 4051 chip as a "lane changer" and read the signal of whatever lane you tell the chip to switch to. the 4051 uses 3 digital pins and 1 additional analog (or digital) pin on the arduino to create up to 8 lanes of input. Some multiplexers are chainable, so you can fairly easily add 8 more signals without needing to keep taking them away from the arduino itself.

It is exactly like the technique you already know for digital signals, just hook up the channel you read from to an analog pin instead of a digital one, then cycle through the binary states and read the analog values.

I made an animated gif for you.

enter image description here