Maker Pro
Maker Pro

74HC595 shenanigans..

I have got one doozy of a headache from some 74HC595 issues, and I was hoping you awesome people could provide some insight...

I bought about 10 of these "74HC595N,112" from digikey in two separate orders through two separate weeks in order to run tricolor LEDs with a common cathode.. they are labeled on the chips with:

"P 75HC595N
X L2L2R4 11
N UnG1310D"

The datasheet for those 74HC595 are on the digikey site linked above, the datasheet for the LEDs (the best I could manage to get) are going to be here, and the datasheet on the buttons are here.

I have hooked these chips up on several types of breadboard according to the common circuit designs that are easily found all over Google attempting to get them working after initially checking with the datasheets for my product to verify their validity.. and they will not operate correctly. I'll attach a video of one of the times they acted strangely, but other times they just randomly turn on and off connections where most of the time the outputs are all completely on, and the "Q7S" serial output is running in a High state as well..

I have tried using USB as a method of powering these, as well as a computer power supply with a Molex connector hooked up to the board. I know that the buttons I'm using are not damaged, and are not acting poorly as I've hooked up a multimeter to all of them to test. I also ordered 10 of those buttons in case some were damaged. In addition I've tested to make sure none of the lines on the breadboard were incorrectly electrically connected while there was no power on my board using a multimeter.

Did I buy some sort of bad offshoot of the 74HC595 that isn't working the way I'd expect being that they're labeled as "74HC595N"?? I had assumed this was just a manufacturers part number that differed from manufacturer to manufacturer.. are these chips all damaged despite being shipped separately? Can anyone help me?

This is a link to the video (new phone, excuse my novice upside down video).

This is a picture of my breadboard attempting to get these to work properly:
breadboard.jpg
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
google "denouncing".

as you press the switches there are multiple transitions which, on clock lines, can cause havoc (as you've seen)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
oh, it also seems like you're not using pull up or pull down resistors on the inputs. For CMOS that's really bad juju.
 
google "denouncing".

as you press the switches there are multiple transitions which, on clock lines, can cause havoc (as you've seen)

I am aware of the bouncing issue, but this is not a bouncing issue. I don't even have to be touching the breadboard for changes to occur. When I give the board power it randomly turns on the lights, which is expected. After which merely touching the breadboard (even gently) at any place makes random, spastic changes occur. Other times I don't even have to be in the same half of the room for these things to happen. This has been the same occurrence on all 3 style of breadboard I've used. I've gone through 6 breadboards from RadioShack at this point.. :(
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
if the switch is between the input and the positive rail, connect the resistor between the input and the negative (ground) rail.

Make sure that all unused inputs are pulled or tied to a supply rail.

10k resistors are fine.
 
if the switch is between the input and the positive rail, connect the resistor between the input and the negative (ground) rail.

Make sure that all unused inputs are pulled or tied to a supply rail.

10k resistors are fine.

I'll stop by an electronics store tomorrow and pick some 10k resistors. I have none.. Thanks! I'll post back with the results. So far I only have one chip left that hasn't been connected to anything, and I'm really hoping that the rest are all still functional..
 
Hey, I wanted to thank you for being so prompt with your help! The 10k pull down resistors on the first chip's DS, STCP, and SHCP connections worked like a charm! Although, I do have the button bouncing issue I am not concerned with that, and a simple capacitor on each button will fix that issue. I am wondering if maybe a diode might also be used in place of a capacitor?

I am kinda confused as to the pull down resistors necessity though. When many chips of this type are chained no pull down resistors were necessary on the Q7S > DS serial input lines as if they have internal pull downs.. so, why couldn't they also put a pull down on the rest of the internal connections?

CAM00086.jpg


CAM00089.jpg
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
If those inputs are connected to another CMOS output, no resistor is required.

All you need do is ensure that the inputs are either high, or low, and not allowed to float or take up intermediate voltages (e.g. 2.5V).

A capacitor *might* be good enough to debounce the switches, a diode won't.

Beware that using just a capacitor will allow you to violate the rule about intermediate voltages. This is generally a poor idea on inputs, but an especially poor one on clock inputs. Keeping the capacitor small may mitigate the effect, but it may not completely eliminate the problem with bouncing.
 
If those inputs are connected to another CMOS output, no resistor is required.

All you need do is ensure that the inputs are either high, or low, and not allowed to float or take up intermediate voltages (e.g. 2.5V).

A capacitor *might* be good enough to debounce the switches, a diode won't.

Beware that using just a capacitor will allow you to violate the rule about intermediate voltages. This is generally a poor idea on inputs, but an especially poor one on clock inputs. Keeping the capacitor small may mitigate the effect, but it may not completely eliminate the problem with bouncing.

Hmmm, odd. Why is CMOS output not necessary to pull up/down? I didn't ever bother with the capacitors, or debouncing as I'm working on programming a micro-controller to deal with this setup more appropriately. In case you didn't bother really looking at the images, it's an LED matrix with 7HC595s and ULN2803s.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Hmmm, odd. Why is CMOS output not necessary to pull up/down?

My whole point is that IT IS IMPORTANT! However if you connect a CMOS input up to CMOS output then you don't need a pull up or a pull down because that's what the output is doing.
 

KrisBlueNZ

Sadly passed away in 2015
CMOS inputs will float if they're not connected to anything, and pick up noise.

If you connect a pushbutton from VDD to an input, while the pushbutton is not being pressed there is NOTHING connected to the CMOS input, so it will float. Only when you press the button will the input have a defined logic level - it will be pulled up to VDD. You need a pulldown resistor to pull the CMOS input to a defined level (i.e. low, VSS) when the button is not being pressed.

CMOS outputs pull up and down cleanly, so you can connect them to CMOS inputs without a resistor. It's only in the case of a pushbutton or switch that you need a resistor. It's because when the button is up, or the switch is OFF, it doesn't connect anything to anything, so the input can float and pick up noise.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Think of the inputs like a see-saw. Only this is a very finely balanced, very low mass see-saw with a bearing in the middle of the highest quality.

When nobody is on the see-saw, it won't sit in one place. An insect landing on it, or a random breeze will be enough to move it. You certainly can't rely on it being one way or the other.

A pull-up or a pull down is like tying a small bag of potatoes on one end. If nothing else happens, the see-saw will stay reliably on that side.

A switch is like an adult jumping on the end of the see-saw.

A CMOS output is like placing a child on the see-saw. Whichever end the child sits on will go down. If the bag of potatoes is still on one end everything will still work, but it's no longer needed.

A switch connected to the input while the input is connected to an output is like an adult jumping on the end of the see-saw while the child is on it. If the child is on the same end, nothing much happens. However if the child is on the other end, bad things will happen.

So you have the adult and the bag of potatoes (a switch and a pull-up/pull-down resistor), or a child (output to input).

You can also bolt one end of the see-saw to the ground (tie it directly to a supply rail). The analogy fails in showing why this is bad for a small child. Perhaps instead you could think of it as a pedophile priest -- i dunno.

So you need to keep all the see-saws in known (valid) positions and also keep the children safe!
 

KrisBlueNZ

Sadly passed away in 2015
Interesting, Steve. An analogy where distance == voltage, and tension/force == current. If you replace the weights of the objects with tension springs to ground, you also have stretchiness == resistance.

That will also make the model more accurate, because a frictionless see-saw with a different weight on each end will swing fully down to the ground at the end with the heavier weight, whereas a see-saw with a different spring on each end will stabilise at a point related to the relative stretchinesses of the two springs.

Did you see my DTS model explanation back when I posted it? https://www.electronicspoint.com/newbie-questions-t248766.html#post1470672

You didn't comment on it at the time. What do you think of it?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Bad analogy guy said:
Think of the inputs like a see-saw.

Interesting, Steve. An analogy where distance == voltage, and tension/force == current. If you replace the weights of the objects with tension springs to ground, you also have stretchiness == resistance.

To be honest, I was motivated by the thought of using a see-saw to launch a small child into low earth orbit. :D

Did you see my DTS model explanation back when I posted it? https://www.electronicspoint.com/newbie-questions-t248766.html#post1470672

You didn't comment on it at the time. What do you think of it?

Yeah, I saw it and thought it was an analogy. It doesn't work for me because other analogies are burned into my brain. Whilst that means I don't like it, it doesn't mean I think there's anything wrong with it.

At the time I thought that posting anything negative about it wouldn't be helpful because I realised that it seemed wrong to be because of the mental picture *I* have, not for any objective reason. I recall others had made that comment (or did so soon after) so I held back with the "me too" post.
 

KrisBlueNZ

Sadly passed away in 2015
To be honest, I was motivated by the thought of using a see-saw to launch a small child into low earth orbit. :D
LOL :) That would certainly make the analogy memorable!
Yeah, I saw it and thought it was an analogy. It doesn't work for me because other analogies are burned into my brain. Whilst that means I don't like it, it doesn't mean I think there's anything wrong with it.
At the time I thought that posting anything negative about it wouldn't be helpful because I realised that it seemed wrong to be because of the mental picture *I* have, not for any objective reason. I recall others had made that comment (or did so soon after) so I held back with the "me too" post.
Very fair comment. I shouldn't expect anything less from you Steve. Thanks for your honesty :)
 
Top