Problem with querying buttons via multiplexer

Hello folks ,
I hope someone can help me. I connected 12 buttons to a multiplexer. This also works except for 2 buttons that are read twice or I press button 8: output 0 and 8. I press button 0: output 0 and 4. I have software debounce. I even did this twice and when I realized it didn't make a difference, I threw it out of the code again. The whole thing worked without any problems, but after I installed a few shift registers to control the LEDs, the problem returned.

Hardware is a CD74HC4067 16 channel multiplexer connected to an ESP32 mini D1 via pins (2, 4, 12, 27); s0 s1 s2 s3 SIG pin =36. 100 kilo-ohm resistor SIG->ground. The buttons each have a 10 kilo-ohm resistor->ground. As I said, buttons 8 and 0 do not work as desired.

Another problem I have is that from a point in the program (shortly after initializing an RTC and the DFPlayer module) my serial communication no longer produces proper output and only shows boxes. Which of course really annoys me because it makes bug fixing very difficult.

Interesting project and nice pictures. Sorry I cannot follow your word problem, please post an annotated schematic. Be sure to show all connections including power, ground and power sources.

thats will be a day work :stuck_out_tongue: :slight_smile: but i can tell you it will be the tcd out of back to the futur and if that will be the last thing to do for me :smiley:

It was a voltage problem.. after connecting an external power supply it works perfectly :wink: hope this helps others in the future.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.