I have a keypad project that I'm working on which is currently having some voltage drop issues I need to resolve. The Tinkercad project that mirrors the actual project can be found here.
Fair warning, electrical engineering is not my strong suit. Feel free to point out any glaring mistakes in this project
It uses a couple of decade counters to reduce the number Arduino pins needed to scan the keypad. The tinkerpad project works fine, however in the actual project I'm seeing a voltage drop on the output of the AND logic gate that checks for when the counters are at the start of a scan cycle. This voltage drop only occurs when pressing '2' or '3' on the keypad. When pressing '1' on the keypad I see some noise, but no voltage drop. See the scope images below to see what I mean...
For the '2' and '3' keys it drops below the voltage where I can reliably check that the counters are in the starting position, which in turn prevents these keys from being detected a lot of the time. I'm sure I'm just missing something obvious, but it's alluding me at the moment.
The first counter is incrementing the rows. When it gets to output 5 it triggers it's own reset and increments the second counter to move to the next column.
ok, i see, first counter set one pin to HIGH and three other to LOW and if you press two buttons on same line, level will be not identical - you cause a short circuit, right ?
It requires zero more pins than @sickgrin is currently using
I agree sx1509 is also a good option. I don't know if it is easier for a beginner to use pcf8574 or sx1509, that may depend on availability of a keypad library which uses either chip.
Dug through the parts bin and found some quad AND gate ICs. Switched to a 3 x 4 keypad configuration instead of 4 x 4 (since that's the actual application) Used the 74LS08 in place of the transistors and everything is working as expected now.
If anyone is interested here's the tinkercad project with the changes: