Good afternoon,
I'm a newbie and have been working on a hobby project to control a model railroad turntable using a stepper motor. So far things have gone well but I've now run into an issue which I can't seem to resolve.
I have 13 buttons (simple push to make momentary switches) on my panel which are encoded by means of a diode matrix into a 4-bit value. I feed these lines into the Arduino inputs 8 - 11 and use port manipulation to create a Byte variable which reflects the button pressed. With a test lash-up this works fine and I've developed and refined the sketch so it does what I want.
Now I'm building it out - I want to use the switch output to also fire a CMOS D-Type flip-flop (CD4013) so that an LED lights while the turntable is in motion. The switch output is taken to the 'S' pin on the chip and the 'Q' output switches on a transistor that lights the LED.
I've also added a rather crude de-bounce circuit which uses a 1K resistor charging a 1uF capacitor to create a 1mS delay. However, when I take the output from this through the diode matrix to the Arduino, it doesn't raise the I/P line. If I disconnect the Arduino, I can observe the diode matrix O/P going high when I press the button (using a logic probe). If I connect the Arduino, it's as if the arduino is 'sitting on' the voltage and it doesn't go high - so the sketch never reads the input.
Can anyone explain why this is and what I need to do please to get this to work correctly? Do I need a 1k resistor in series with the Arduino feed? Should I remove the 10k pull-downs on the inputs and use the internal ones instead? Anyother useful suggestions will be welcome.
I've attached circuit diagrams of both working and non-working versions.
Thank you very much