Button problems

Hi,

I am hoping someone could kindly help with a problem I am having with a project. I am building a simple 4 button motor speed control panel using an Arduino Duemilanove. The motor part works fine and I've followed the guides at - http://www.arduino.cc/en/Tutorial/Button & Arduino Tutorial - Lesson 5 - I believe these examples use a pull up resistor design to set the various pins to read either high or low.

The original circuit works fine. See attached image 1

I now want to change the buttons from the original design to use new buttons as I need to access them in a narrow slot - these 90 degree offset buttons ought to work much better. However when I added the new buttons to my project they didn't work at all.

see attached image 2

I had a good look at the way these new buttons work and it seems they're wired up completely differently inside.

see attached image 3

The old button - all four pins are connected when the button is pressed.
The problem button - only the parallel pins are linked.

I was wondering if anyone could help me sort my circuit design out so that I can use these 90 degree offset buttons. I should point out this is my first electronics project.

Cheers,

Saul

sidebuttoncheck.jpg

sidebutton.jpg

@KE7GKP

Thank you very much. What you suggest makes sense to me. I had a version where I had one common resistor linked to the other side of all the buttons which was giving me weird results - almost like a round robin of button presses.

I've redrawn the circuit based on your suggestion - its attached below.

I will now go and test.

Cheers,

Saul

@KE7GKP >

Just tested it and it works perfectly. Your help is really appreciated. :slight_smile:

Cheers,

Saul

Even simpler from a hardware perspective is to connect the buttons between Arduino input pins and ground, and enable the internal pullup resistors - then you don't need any external resistors. Of course, a digitalRead from the pin will then read HIGH when the button is not pressed and LOW when it is pressed, instead of the other way round.