Power requirements for 16 switches connected to CD74HC4067

Hi I am creating a project that connects 16 switched to a CD74HC4067 to minimize the pins used on my arduino mega with a Ethernet shield attached.

I am taking the 5volt power output from the from the arduino to power the CD74HC4067 and provide the power for the switches.

Each of the inputs tests ok on the CD74HC4067.

However when I have the first 3 switches in the on position the arduino freezes after a few moments and my laptop makes the sound of a device been connected/disconnected. Also I notice the LED's on the Arduino dim a more with each switch in the on position.

I am certain this means it's a power issue and should I use another power source for the switches and can anyone recommend something suitable.

thanks
jasemilly

Disconnect it immediately, you're shorting something out, risking serious damage.

jasemilly:
and provide the power for the switches.

Switches don't require power. They do need a pull-up resistor. You only need one for the entire multiplexer, and it's probably best to use the internal one.

The switches should be connected to ground in that case.

There's nothing we can do without you posting a detailed schematic.

Pieter

I am certain this means it's a power issue and should I use another power source for the switches and can anyone recommend something suitable.

I am certain it is a power issue and that your wiring is causing a short circuit. A more powerful supply will only melt tracks.

Post a schematic and a photo of your wiring if you want to know where you made your error.

Hi here is the schematic I have the switch between the 5volt on the right and the connectors along the bottom.

the left hand side connects to ground and the top connectors to the CD74HC4067

I have disconnected, everything too avoid damage

thanks
jasemilly

Too complicated.

Just connect the switches between the multiplexer inputs and ground, NO resistors.

Connect multiplexer output to a digital pin with pull up enabled in pinMode.

pinMode(muxoutPin, INPUT_PULLUP);

Reverse logic now.
Inputs are normally HIGH, and a pressed button is LOW.

The 74HC4067 runs on fumes. If the supply shuts down, then you must have made a wiring mistake.
Post a 'real' picture of your project.
Leo..

Hi,
Please show a diagram with your components in it, not just wires, connectors and resistors.
Where is your power supply , 4067, switches?
LABEL your components and pins.


May I make a suggestion and you get out a pen and paper and draw the schematic showing the switches, as switch symbols not boxes, your 4067 including pin names and how you have them connected together, along with labelled 5V and gnd wires.

Can you show a picture of your project so you we can see your component layout.

Thanks... Tom... :slight_smile:

Grumpy_Mike:
Post a schematic and a photo of your wiring if you want to know where you made your error.

Wawa:
Post a 'real' picture of your project.

TomGeorge:
Can you show a picture of your project so you we can see your component layout.

Do you get the picture, because we are not getting one?

HI i have taken some pictures and added some labels. I labelled the main one of the PCB and included the reverse side so you could see the tracks.

Sorry I thought the schematic would be ok.

Thanks for all help.
Jasemilly

The image with the labels on didn't upload will try again

jasemilly:
The image with the labels on didn't upload will try again

No that is just the same as the last image in the previous post.

Sorry but I can’t imagine a more useless set of photos. You can not see any components and any resistors.

We wanted a photograph of your wiring, which generally means a single photo showing where things are connected to each other not odd corners of Solderless bread board. And not a switch in sight.

sorry

resistors and switches on this one tried to show reverse side of pcb and couldnt fit all one picture so tried to show different parts.

:confused:

Are those really 1k resistors? They sort of look like brown-black-Black, which would be 10 ohms, which might cause the symptoms you’re seeing.

Yes I quite agree what ever they are they are not 1K which should be brown black red.

I notice three look burned out, something you did not mention before, why not?

You need to replace them all with 10K resistors brown black orange.

Why do you have a resistor on every mux input? You can only read one input at a time, so you only need one resistor at the output of the mux. If your wires are short, you can even use the internal pull-up resistor.

I notice three look burned out, something you did not mention before, why not?

Yes they are burnt out. I already had the problem and tried an external power supply. I was very unsure if this was the correct thing so I disconnected the Arduino before applying power. It burnt those 3 out.

I purchased off ebay as 10k resistors I will check the colour bands.

thank you all.

you only need one resistor at the output of the mux

the example I followed showed a resistor on every button on the breadboard. I just copied.

The multiple resistors would be needed for a digital multiplexor, but with an analog mux you’d only need one on the output.

jasemilly:
I purchased off eBay as 10k resistors I will check the colour bands.


You cannot burn a 10k resistor with 12 V. 120 V yes, not 12.

Hi,
Can you post a complete circuit diagram please?

Tom.. :slight_smile: