keypad inputs using internal pullups only - reliable enough?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We have recently discovered problems reading a keypad (silicone keypad / carbon ink pads) connected directly to a port using internall pullups only. Usually I connect 4k7 to 10k external pullups but this time lack of space made me not to use them.
However, it seems that some of the prototypes have now problems with reading correct state of the inputs. Typically, when key in column 3 is pressed, everything is as expected. After releasing the key, all inputs read high as expected as well. But when column 2 is pressed afterwards, the input read show both columns 2 & 3 active!
I'm pretty sure that the pullups are enabled, and PUD bit in SFIOR is cleared as well. After all, it works on some prototypes with identical software flawlessly. Maybe some inputs are damaged, but they work when resistors are addes externally.
Anyone ever experienced a similar failure?
Do you use internall pullups in a commercial device?

Thanks
Mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use pullups for this purpose exclusively to save component count, soldering, complexity and board space, without a problem.

Things to check would be....

1.) Are the Keypads at fault?
2.) Ensure that the Port direction and pullup state are actually correct in code.
3.) Code up a debounce for the inputs.
4.) Are the onboard bleed resistors capable of draining the Keypads excess capacitance to ground?

//Sy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks for the input sy. I'm using a debounce routine that samples at 2ms rate and must see 50 consecutive samples of the same value before a valid input is recognized. that should be more than enough debouncing. the ports are set up correctly as far as I can tell. After all, some devices always work and some never do (well, almost never). unfortunately, I don't know whether the particular keypad that's not working might be bad or not right now as it's on the other side of the atlantic. but I can hardly imagine a keypad fault with these symptoms.
and well, huh, the capacitance: it's a input only keyboard (one column and one row contact switching to ground per key, not a scanned row output/column input matrix), so the speed does not matter. sooner or later charging of the capitance must be finished.
any othe hints?

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just a guess, but are you allowing for the one cycle input synchronization delay?
Do you have anything else connected to the keypad inputs? I've seen problems with ribbon cable capacitance, for example, slowing things down. When you're holding a hammer, everything looks like a nail.

John

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nothing to wait for. it's a simple passive read-only switch, nothing to be sync'd with. no outputs, nada. some of the internal pulups seem to be damaged... strange is, that on a forum like this, approximately every fourth user would be ranting if the chips were really THAT sensible.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gizmo wrote:
nothing to wait for. it's a simple passive read-only switch, nothing to be sync'd with. no outputs, nada. some of the internal pulups seem to be damaged... strange is, that on a forum like this, approximately every fourth user would be ranting if the chips were really THAT sensible.

Sorry, it was your use of the word "column" in the original post that lead me to believe that you were using a matrix of switches.

John Brown

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It sounds like a tough one gismo; especially with the devices far away so you cannot play mix-and-match on the bench.

A few comments:

--we do have apps that use the internal pull-ups
--depending on the app and the particular switch involved, our hardware designer may use heavier pullups to get more current through the device when switching to keep the contacts clean
--AVRs are pretty tough but...
--one good static zap through your keypad >>could<< wipe out a pin or an entire port. What protection do you have? Have you given a test setup a good workout with the stun gun on the bench?
--hopefully you can get a keypad swap between at least one "working" and "non-working" unit to verify that it isn't the keypad that is failing
--check and double-check continuity on the ground line, especially if you don't have a ground-return from the keypad.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Lee. Fortunately ESD won't be a problem here since the 5mm silicone keys go through openings in grounded metal front plate that would be hit first. Not true for the prototypes, though!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had 2 type troubles: moisture and graphite dust from keypads.
before reading keys i recommend all key inputs turn to outputs in "1" state,
this will charge parasite capacitance .