I have a setup with 12 buttons. 10 of them connected to the arduino pins 0, 1, 6, 7, 8, 9 and analog 0, 1, 2, and 3 (these are all configured with pinMode as inputs in the setup-part of the sketch). button 11 and 12 are connected to an I/O expander (mcp23016) which I read from through the i2c bus on analog pin 4 and 5.

Each button is connected as this: side 1: directly to 5v side 2: to GND through a 10k resistor AND also to an input-pin (one pin for each button)

The first issue I had was with pin 0 (the RX pin). It was acting as though it wasn't connected, although it was indeed connected. So I ended up replacing its 10kohm resistor (to GND) with a 220ohm, and then it worked fine.

I don't know why this specific pin would need a smaller resistor in order to get connection, but everything seemed to work fine now.

When I had put all my components inside my casing, suddenly the same issue started happening with other buttons as well.

So my question to you is: what possible reasons could there be for this issue? Is it my 10k resistors that are too much resistance, thus leaving the input pins as not-connected? And if so; how can I measure impedance of my buttons, wires etc, and how would I find out which resistor would work? Is this a plausible reason or is it more likely that it's a soldering somewhere? I'm using screw connectors which are screw very tide together - but could this have anything to say?

I must admit I'm quite stranded on this one.

When I measure with my multimeter on the input pin that stays high, it gives me just below 5v reading. I tried momentarily connecting the faulty input pin directly to GND (without any effect) and also tried connecting it to GND through a 1k and a 220ohm.. no luck. So my best guess would be that there's a broke connection somewhere, but I really have a hard time finding it. All looks fine.

Any advise is very much appreciated.

  • \$\begingroup\$ Schematic of how you have things set up? \$\endgroup\$ – Passerby Jul 21 '13 at 22:08
  • \$\begingroup\$ The RX pin is probably being driven by the USB-serial chip on your Arduino. If you want to use it as an input to read another driven signal, you will have to figure out how to disable or disconnect the USB-serial chip from it first - but that may make reloading your sketch difficult, so it's best to avoid using that and the TX pin until you have used all the others. \$\endgroup\$ – Chris Stratton Jul 22 '13 at 5:48
  • \$\begingroup\$ The thing is I'm already using all my pins on the UNO board. The ones that aren't inputs, are related to the wave shield that I have on it. I'll try to make a schematic today. \$\endgroup\$ – Søren Jul 22 '13 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.