Author Options:

help with 3 wire Arduino keypad Answered

Hello all ,
I have read the this post "Arduino 3 wire Matrix Keypad by XenonJohn"
and try to do as he said
but something doesn't work
I have the same resistors ,and the same connections - but it doesn't work
when I press 1 I get "3"
when I press 5 I get "0"
when I press 6 I get "5"
when I press 8 I get "0"
when I press 9 I get "4"
when I press * I get "9"
when I press 2,3,4,8,0,# I get nothing

what could be the problem ?
I have build the circuit 3 times now - and always get the same result - what am I missing ?

Thanks  .


The forums are retiring in 2021 and are now closed for new topics and comments.

6 years ago

The instructable your talking about doesn't really work. The technique used tries to put different voltages into the analog pins using voltage dividers. Unfortunately you need a vary stable reference voltage to make this work universally. The 5V you get from your Arduino may be slightly off what he was getting on his. So with the same voltage divider you will get a different result on the analog pin. Also the larger the load you have on the arduino the further off you'll be from the 5V reference voltage. SO the sketch has to account for a wide range of readings on the analog pins to register the button has been pressed. With 10 buttons you will have overlapping readings. Also if this project is ran on batteries you'll get different results from the same button press as the batteries get drained.


6 years ago

never mind

I have found my problem

my keypad pins was wrong ...

now it's working

Thanks !