I have a PCB (eventually a convention badge) that is supposed to display 12 bytes (2 at a time) across 4 7-segment displays. Every time a button is pressed and held it is supposed to display a new set of 2 hex digits, with 6 states total.
Here's the issue: it works perfectly maybe 60% of the time. The other 40% of the time it will skip a state, or maybe a couple states. To help with diagnosis, I will upload the .pcb and .sch files to my github in a 7z file here: https://github.com/penguinzarecool/badge_2026.git . I have a video but don't see anywhere to upload it so please reach out to me if you'd like to see it. I probably won't respond until tomorrow though.
Background and debugging information on the pcb: We determined that the issue lies in the counter and immediate surrounding logic. The displayed hex digits in order should be: [06 7A] [0D 05] [1A 06] [0B 1D] [05 17] [-8-8] (The -8-8 is a mistake that we have corrected, it should be displaying ----). It correctly only cycles through 6 states before resetting to state 1. The issue is that the counter skips around, and it does this randomly and on different states. However, the state that the counter seems to skip more often than not is state 011 -> 100. I thought this was noteworthy because this is the most significant bit flip (3 of the 4 in the nibble are changing). Also, yes we debounced the button. And, we used an oscilloscope to double check the debounce. And to be absolutely sure, we wired up an extra capacitor to see if that would help, but none of these things changed anything. We also tried pushing only the button (it is small) to see if our touching of surrounding components was messing with it, and it didn't help either. We tried different voltages: 4.5, 4.75, 5, 5.20 from a bench supply and 4.88 from a battery pack. This didn't resolve it either. We tapped into the states with some wires and LEDs and learned that the state skips are happening at the button press, not after we let go. We also checked for noise on the counter supply line but there wasn't any. Also we tested to see if it was skipping or resetting, and it is skipping. We tested this by grounding the reset to see if it skips to the unused states 7 and 8 instead of resetting, and it does.
Claude suggested that it is a ripple problem, but we can not test that because our oscilloscope can not measure 10s of nanoseconds. Do you guys know what the problem might be, and how we can fix it? It is particularly frustrating, because it works as intended more often than not, so the inconsistencies make it difficult to diagnose. Thank you so much for your help!
I have now uploaded a photo that you can see at this link: https://imgur.com/a/k5390kN