Ok, I ran out of time for this weeks PAW so I just did something shamefully easy and simple.
TripleButts are three different breadboard breakout boards each holding 12 tactile switches - they are connected differently on each of the three boards.
Board #1 is the
Full version. All the twelve switches are connected separately to their own pins on the headers. Twelve pins on the top and twelve pins at the bottom.
Board #2 is the
Matrix version. The switches are connected in a 3x4 matrix with the four rows and three columns connected to the header on the bottom. The small headers close to the top is not connected anywhere and only there for making the board sit stable to the breadboard.
Board #3 is the
Analog version. The switches are connected to a resistor voltage divider that have an analog output ranging from VCC to GND. Easy to hook up to and decode on an ADC pin on a microcontroller. The headers at the bottom is GND/Out/Vcc. The headers close to the top is connected anywhere and only there for making the board sit stable to the breadboard.
The white dots are for labeling the buttons for your own project. 0-9 and *# might not be optimal for every project you do, so I thought it would be better to just leave the labelling to the user.
[attachment=2]
[attachment=1]
As a bonus I had some space left over on another pcb so I added some dual- and triple-button pcb's there as well :)
[attachment=0]
If I never make another button breakout if would be too soon ^_^
[quote author="matseng"]Ok, I ran out of time for this weeks PAW so I just did something shamefully easy and simple.[/quote]
That is alright, I guess, it is still a lot of work to design anything.
[quote author="matseng"]Board #3 is the Analog version.[/quote]
Did you calculate the resistor values for linear, (anti-)log, and (anti-)square(-root)?
[quote author="matseng"]If I never make another button breakout if would be too soon ^_^[/quote]
While you are at it, never is a strong sentiment to express. I guess that you will use these boards massively now on your other designs ;-)
The resistors are just linear. With only 12 steps on a 10 bit ADC there's no huge benefit of doing anything better - and I had an full ammopack of 1/8w 1% 330R so that's what I used.
13 resistors as a divider chain with a switch connected to each junction. The output is simply pulled down with a 1M resistor to keep it at zero when no button is pressed.
I think the 2- and 3-button variants will come to more use than the 12-button boards...
[quote author="matseng"]13 resistors as a divider chain with a switch connected to each junction. The output is simply pulled down with a 1M resistor to keep it at zero when no button is pressed.[/quote]
So pressing the top and bottom buttons simultaneously will result in a 660Ohm load on Vcc and the output will be at 49.98% (less than one 0.2 LSB off at 10bit).
Pressing the top button will be off by ~0.4% (or 4 counts at 10bit) due to the 1M pull-down.
Ah, should be close enough.