Any current/voltage limiting protection for 74HC165 parallel inputs? - Page 1
Forum section: electronics / projects

author: kreyszig
author_rank: Regular Contributor
timestamp: February 10, 2023, 02:44:10 pm
content: Hi,Around the web I have seen circuit designs where people were adding ~10k resistors to 75HC165 buffer parallel inputs in order to read DIP switch positions. I do not understand the requirement for these resistors from a current limiting standpoint as the buffer inputs have very large impedance, correct? Why are they used? If they are not used for current limiting, but instead for some high transient voltage protection, then I am not sure why one resistor per input is required instead of a single resistor for all inputs. Also, if it is for ESD protection, why not using TVS diodes instead?Thanks!

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 10, 2023, 02:50:20 pm
content: Are you sure these resistors were in series, and not setup as pull up or down resistors. A dip switch mostly is either close or open and not a toggle between ground and supply.When the input of a digital circuit is left floating it could either be seen as low or high depending on system noise and needs to be pulled to the intended level.

author: kreyszig
author_rank: Regular Contributor
timestamp: February 10, 2023, 03:16:59 pm
content: Yep you must be right, sorry, I was going to do a very dumb mistake. Would it be any useful to add TVS diodes to protect the 165's inputs though since I could see how static discharge to the DIP switches could occur from the user handling them?

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 10, 2023, 04:26:53 pm
content: DIP switches have been around for a long time, and I have never heard of problems with static discharge surrounding them, so I think you are safe without additional TVS diodes.

author: kreyszig
author_rank: Regular Contributor
timestamp: February 10, 2023, 07:35:08 pm
content: Quote from: pcprogrammer on February 10, 2023, 04:26:53 pmOk thanks. Regarding the resistor array, I assume it makes sense to wire them to NSS and wire the other side of the DIP switches to VCC so the resistors act as pull-down when NSS goes low, but otherwise when NSS is high there will be no current flowing through them so they will consume no power regardless of the DIP switch positions?

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 10, 2023, 07:49:49 pm
content: You could do that, but it creates an additional load on your NSS line, which has a limited fanout. It depends on how many resistors and their value of course, and it might even draw not that much current if you just scale them right and use them in a normal way. Pull up to supply, and dip switch to ground. Very small current into the input when high, bigger current when dip switch is on.

author: kreyszig
author_rank: Regular Contributor
timestamp: February 10, 2023, 08:06:18 pm
content: Quote from: pcprogrammer on February 10, 2023, 07:49:49 pmI was going to use 20k resistors, so 4 mA for 16 of them at 5V. My MCU pins are fine up to 50 mA draw. I would be reading the DIP switches only when resetting the board, so it would be nice to only have them consume power during the initialisation stage. If current draw through the NSS line was a concern I could always tie a transistor to NSS to drive the resistor array, but for my application I don't think it is necessary.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 10, 2023, 08:18:04 pm
content: Are you running the system from a battery, that you are concerned about current draw?When using the NSS solution to reduce the current make sure to allow enough time for the signals to settle before loading them into the shift registers. I'm assuming this is for the circuit you laid outhere

author: kreyszig
author_rank: Regular Contributor
timestamp: February 10, 2023, 08:31:11 pm
content: Quote from: pcprogrammer on February 10, 2023, 08:18:04 pmNo I would not even run the circuit from a battery (the available 2W DC supply is a bit constraining for the circuit as a whole though), but I don't really see any drawback from the NSS solution, except allowing enough time for the signals to settle, but as I mentioned I would only read the DIP switch positions once at startup so waiting a few additional ms does not matter. Yes it is related to the circuit from that other thread. I would load the values into the shift registers by sending a single high bit value through pulsing MOSI low.