Main Site Documentation

Doubt about the project with FEZ family


#1

I would like one advice.

I am developing a project that must be placed between 20 and 30 buttons to be pressed by the user.

What is the best microcontroller for use in this project, FEZDomino only has 13 digital outputs, is there any way to expand the digital outputs or is it better to choose another microcontroller??

Thank you.


#2

You could use a FEZ Panda II, it has 54 I/Os.
http://www.ghielectronics.com/catalog/product/256


#3

Alexander, why not use a unique resistor value for each button to create a button matrix?
You would then only need 1 analog input.


#4

Robert,

This works well?

It seems an elegant solution.

Have you ever done anything like this, I could spend an example?

Thank’s


#5

I have not done this before myself, but some arduino shields use it.
For example:

This is the schematic for the arduino “lcd and keypad shield”.
It uses 4 buttons in the way I described. Don’t know how it will work with that much buttons, but you might be able to multiplex it in some way?

And if you don’t get it to work with one analog input, this example shows how 5 buttons can be used with 1 analog input. Since most fez devices have around 6 analog inputs, this would result in 30 buttons.


#6

Robert,

Look what I found:

http://blog.makezine.com/archive/2008/12/64button-matrix-of-elegan.html


#7

I have a 25 key keypad on a 5x5 matrix on Panda. This uses 10 pins and can easily go up. I can share the matrix driver if you like.

I tried the analog way but hit some serious problems above 15 keys or so. One could use multiple analog pins but it gets overly complicated in my opinion.

You can also use a shift register or a dedicated keypad chip but I think there are plenty enough IO on the Panda.

The Domino has USB Host so you could use a PC keyboard encoder and have over 100 keys.


#8

Have you guys looked at the keypad we offer for gadgeteer and the included source code?


#9

realiser,

I wish you would share with me the driver.


#10

Hmm good idea t use a expander.
The ghi keypad is fine too, but I guess you want to use your own buttons?


#11

My point is there is drivers, free code, that you can use :slight_smile:


#12

Robert and Gus,

So I’ll use my buttons.

It will be a project for children with communication problems.

My wife works with speech therapy, so I’m doing a project to assist her and the children will be very interesting.


#13

Do you want to feed the button input to a computer? Or do you want the microcontroller to do the speech?

What quantity do you need?


#14

I want the microcontroller to do the speech, I need between 20 at 30 buttons.


#15

People,

I found two very interesting articles, both are the same author, look:

These two designs are made to arduino, detail are written in Spanish.


#16

resistor ladder designs work, as was pointed out way up the top of this thread. Whether they’re effective or not is questionable; for the scale of # buttons you have you might have an interesting time calculating the best resistor values to use and the appropriate ranges of values they will return on a Fez. (multiple presses at the same time could be troublesome on that many buttons!)

You could do this for your “prototype” and figure out if there’s a more effective solution later if you just wanted to kick on with the project.


#17

I would not use resistor ladder. Because you can not assign an interrupt on press handler.

I would use a 6x6 matrix, so you can read 36 buttons with 12 IO lines.


#18

@ Wouter and @ Gus

Have you seen this shield for Arduino?

http://www.spikenzielabs.com/Catalog/index.php?main_page=product_info&cPath=27&products_id=263

The GHI could develop a shield like this.


#19

I’ve gone down the resistor ladder route before. There’s a reason they stop at about 4x4 (16) buttons. You can maybe go up to 20, but it gets progressively less accurate and you need resistors with better than 1% tolerance… difficult.

Look at this article and the attached spreadsheet to calculate errors:

http://www.avr-asm-tutorial.net/avr_en/keypad/keyboard.html

I’d rather go with a matrix scan. I’ll try and get my Matrix scan code up on the Code site in the next day or two. Work on a physical layout for your keyboard in the meantime.


#20

Use gadgeteer and never worry about all this :slight_smile: