Page 1 of 1

Connect 10 buttons. How ?

Posted: Tue Apr 12, 2016 9:49 pm
by SFR75
Hello,

I have an old touchphone with keys 0 to 10, which I need to connect to raspberry at certain distance.

So it's as if there are 10 pushbuttons. However I don't want to use a 10-wire cable, but would rather use 4 (or 2.. serial?)

I wonder what kind of circuit can combile 10 bits and pack them into single digital value, which I can
then send to Raspberry IO ?

BCD encoder?

10 bit Analog-to-Digtal converter ?
(http://www.ti.com/lit/ds/symlink/tlc1543.pdf)

or maybe use some old USB keyboard circuit ?

Thanks,
M

Re: Connect 10 buttons. How ?

Posted: Tue Apr 12, 2016 10:09 pm
by mikronauts
See http://www.mikronauts.com/raspberry-pi/ ... nd-python/

Only uses 2 pins, SDA&SCL, the shared I2C bus.
SFR75 wrote:Hello,

I have an old touchphone with keys 0 to 10, which I need to connect to raspberry at certain distance.

So it's as if there are 10 pushbuttons. However I don't want to use a 10-wire cable, but would rather use 4 (or 2.. serial?)

I wonder what kind of circuit can combile 10 bits and pack them into single digital value, which I can
then send to Raspberry IO ?

BCD encoder?

10 bit Analog-to-Digtal converter ?
(http://www.ti.com/lit/ds/symlink/tlc1543.pdf)

or maybe use some old USB keyboard circuit ?

Thanks,
M

Re: Connect 10 buttons. How ?

Posted: Tue Apr 12, 2016 10:34 pm
by SFR75
Ah! Very nice - thanks.

So I just need MCP23017 and that's it....

Re: Connect 10 buttons. How ?

Posted: Tue Apr 12, 2016 10:45 pm
by mikronauts
You are welcome!

You will also need some kind of prototyping board to mount the MCP23017 on.
SFR75 wrote:Ah! Very nice - thanks.

So I just need MCP23017 and that's it....

Re: Connect 10 buttons. How ?

Posted: Sun Apr 17, 2016 4:06 am
by Richard-TX
SFR75 wrote:Ah! Very nice - thanks.

So I just need MCP23017 and that's it....
Yup. That is it as far as hardware is concerned. Since you are going to be using pushbuttons, there is a little bit more to interfacing them to the MCP23017. You will likely have to add some debounce components to the input lines and some software debounce will likely be needed as well.

Re: Connect 10 buttons. How ?

Posted: Sun Apr 17, 2016 1:25 pm
by mikronauts
I normally de-bounce in software

Re: Connect 10 buttons. How ?

Posted: Sun Apr 17, 2016 7:17 pm
by Richard-TX
I have found that a two pronged approach (software and hardware) is superior to any single approach when mitigating bounce issues.