cbaurtx
Posts: 6
Joined: Sun Oct 30, 2011 7:49 pm

Keypad interface with ADP5589

Sun Aug 19, 2012 11:48 am

For one of my projects (Convert a broken boom box to an internet radio) I need to address several
push buttons and switches.
Using the Analog devices ADP5589 seems to be attractive for the following reasons:
1. There is a Linux driver for it
2. It connects via the i2c bus and not a single precious IO pin is lost
3. The ADP5589 can address up to 88 keys.
4 .If less than 88 keys are used unused I/O pins can be used as general IO
4. Digilent sells a reasonably priced board (PmodIOXP - I/O Expansion Module, approx euro 25)

Any comments on this or thoughts on alternatives to address 16 keys are welcome

cbaurtx

kaos
Posts: 108
Joined: Mon Mar 26, 2012 8:14 pm

Re: Keypad interface with ADP5589

Mon Aug 20, 2012 9:55 pm

If you have the pins to spare, you can set 16 buttons up in a 4x4 matrix (see http://www.dribin.org/dave/keyboard/one_html/) and read them with 8 lines of standard GPIO; no additional components needed! Indeed, you can get away with 5 lines by using charlieplexing (see http://en.wikipedia.org/wiki/Charlieplexing), though that means a diode at each switch and more complicated software. (Note that while the Wikipedia article concentrates on using charlieplexing for driving LED's, the method can also be used for scanning a set of switches, as explained at the end of the article.)

One problem with the traditional matrix setup is "ghosting", a.k.a. "phantom keypresses". This is explained in the article linked, along with the cure (use a diode at each switch, removing one advantage this setup has over charlieplexing). Note that if you have to use diodes in a 3.3V system like the Raspi, I would recommend schottky diodes above standard rectifier diodes, due to the schottky's lower forward voltage.

Another problem you might have is with "contact bouncing", see http://www.elexp.com/t_bounc.htm or more in-depth at http://www.ganssle.com/debouncing.htm. This can be solved in software, as explained in the articles.

B.t.w., I would be very interested in reading about your progress with this project; internet radio is on my to-do-with-Raspi list, along with a few other projects.

--
Best regards, Kári.

longtian006
Posts: 2
Joined: Thu Oct 11, 2012 8:06 am

Re: Keypad interface with ADP5589

Thu Oct 11, 2012 8:12 am

ah thats great :)

cheers guys will get this purchased on pay day







----------------------------------------------------------------------
obd2 scan tool |obd2 cable usb |ECU Chip Tuning

Return to “Add-ons”

Who is online

Users browsing this forum: No registered users and 3 guests