I tried to simulate (before building it) a double edge detector circuit that I found in this post.
When I simulated it, I got a decent pulse when I closed the switch but when I opened it, I got a spike more than a pulse.
Is it possible to improve the circuit to get a better pulse when I open the switch?
The pulse is sent to a 4040 binary counter.

actualswitch and not some other kind of input) is something that will firstdebouncethe switch. Otherwise all you will get is a very, very glitchy output because switches do bounce a bit. And if you get a pulse for every unwanted bounce, then you are in a heap of trouble. Once debounced, then something can be done. I'm not interested in suggesting anything (even Olin's circuit) without hearing more about what's driving this. If arealswitch, then debouncing is probably needed and can be combined. – periblepsis Aug 17 '23 at 04:44afterthings have settled down.) – periblepsis Aug 17 '23 at 07:23