SFR75
Posts: 15
Joined: Tue Dec 17, 2013 5:47 pm

Connect 10 buttons. How ?

Tue Apr 12, 2016 9:49 pm

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

User avatar
mikronauts
Posts: 2717
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Connect 10 buttons. How ?

Tue Apr 12, 2016 10:09 pm

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
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

SFR75
Posts: 15
Joined: Tue Dec 17, 2013 5:47 pm

Re: Connect 10 buttons. How ?

Tue Apr 12, 2016 10:34 pm

Ah! Very nice - thanks.

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

User avatar
mikronauts
Posts: 2717
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Connect 10 buttons. How ?

Tue Apr 12, 2016 10:45 pm

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....
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Connect 10 buttons. How ?

Sun Apr 17, 2016 4:06 am

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.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

User avatar
mikronauts
Posts: 2717
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Connect 10 buttons. How ?

Sun Apr 17, 2016 1:25 pm

I normally de-bounce in software
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Connect 10 buttons. How ?

Sun Apr 17, 2016 7:17 pm

I have found that a two pronged approach (software and hardware) is superior to any single approach when mitigating bounce issues.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “Interfacing (DSI, CSI, I2C, etc.)”