I'm fairly new at Arduino / and am trying to learn by doing. My current project is -- I am trying to build an application that reads about 20+ digital buttons. I thought I would try to get a 4051 Mux/ Demux setup working with a series of 74HCT4051N's to experiment with.

My objective is to fully understand how to read (4) four momentary switches (and identify them from each other) and armed with that I can expand on my own.

I am struggling with getting the basic understanding. I have built the attached circuit.

Trying to learn from examples below -- but they are confusing me quite a bit.

You're showing a Fritzing sketch you say you built.Did you do it exactly the way you're showing in the sketch ?So just what's in there and nothing else ?I'm asking because i see some errors in there, just watching that Fritzing sketch (so the hardware).First, in that sketch, there is no power supply to the 4051 chips.They need power.2nd. you have wired the buttons to pins 1, 2, 3, and 4 of one of those chips.I have to assume that the small PCB's the chips are mounted on, have a 1 to 1 connections from chip to PCB pins.So i took a peek and got me the NXP datasheet.That datasheet tells me pin 3 is the output of that chip.You want to connect that to your Arduino input.The first 4 inputs of the chip are on pins 13, 14, 15, and 12 respectively.Pins 11, 10 and 9 are the select pins.Those are the ones you should control by your Arduino and select the input you want to read.

I see a connection from pin 9 of the lower PCB to pin 1 of the upper PCB.I guess you want to cascade, but you can't use these pins for this.I can also see some connection from pin 1 to pin 5 on the lower PCB, but i guess that isn't really there, is it ?

Last, but certainly not least:You have put a resistor at each pushbutton.The value printed on it is 100 Ohms (brown, black, black).That is a bit low as a pull down resistor, the most likely reason for those resistors to be there.A 10 K (brown, black, orange) will do and will reduce current flow drastically.You also need to check you are connecting the switches correct.If they are by accident rotated 90 degrees (clockwise or counterclockwise), you can never see the switch switching and the resistor is permanent connected between the power rails.

This was what i can see by just looking at the hardware.I just also had a quick look at the code.You seem to scan by selecting different inputs (after you have checked your connections).But that's all you seem to do:Select inputs of the 4051, but then nothing...

If you post code, put that in code tags.And post all of it, or else you keep us guessing about what's supposed to happen.

Have a look at "blink without delay".Did you connect the grounds ?Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Expanded your schematic a little. 3 select lines will choose 1 of 8 inputs on each bank, 2 other select lines will choose one of the 3 banks.Drive the select lines, wait 300uS, read the input. Can be a digital input line, you're looking for a Low input to determine a pressed button.

Ok those last two reponses helped me a great deal -- I was confused by the logic symbol versus pin configuration and definately had a newbie confusion about the powering the chip too...

I've taken ONE STEP BACK to make sure I can read the results of just one 4051 chip. If I can get that right then I will take the next step of reading more than one value on the same chip and then expand to nesting 4051's (more than one chip)

I think I have the first 4051 chip properly wired now. See attached Fritzing sketch.

I think I've got a simple push button circuit that should be able to send one signal to the y0 on the 4051 and then I want to send that through the Z to the Arduino Uno's A0 pin