Universal Model M Controller

User avatar
phosphorglow

04 Feb 2015, 11:49

Hi ya'll! I'm like a cat when it comes to forums - I come around when I want attention or I have something I want to leave in your shoe. So here's a little something and it isn't dead. ^_^

I'm still working out small details and would like some input/ideas/see if anyone catches a silly mistake I've made. I know there have been other similar projects but they seem to have fizzled out or didn't have what I was wanting. Anyhoo, here's what we have: AT90USB1286 (Soarer's Controller/TMK/homebrew firmware), FFC connector pins for the various revisions (early with separate LED connector, later Lexmark era with LED traces integrated into the circuit membrane, SSK, 122 key, etc.), reset button next to USB connector (it will be a right angle button even though the picture shows a flat one), access to unused I/O ports and a little breadboard area for fiddling/expansion, and a right angle ground terminal for the plate. Since I enjoy soldering by hand I went with 1206 SMD's and the TQFP64.

I still need to add in the drill holes for mounting to the steel plate, and when used in those applications the ribbon connectors can be soldered to the other side. Also need a drill hole to accommodate the later M's with the smaller controller (there's the little foot-nub in the case that would interfere with its size). I'm thinking about putting in pads for a Mini USB connector since there seems to be space for the sake of personal preference. I prefer the sturdy USB-B, but I know other people like the mini. I don't have a Wheelwriter board, but since IBM was pretty consistent, it probably fits as well.

The exception at this point is the M13. Yes it would fit, but no Trackpoint provisions. Which leads me to a side question: can TMK firmware as a converter (not controller) handle PS/2 inputs for keyboard and mouse simultaneously? I remember reading it was problematic but haven't looked into it much since then.

When it's finalized I'll make available the design files. This is my first time designing a PCB and I'm using Fritzing to do so.

Ideas/suggestions/requests?
Attachments
controller.jpeg
controller.jpeg (122.29 KiB) Viewed 31467 times

User avatar
scottc

04 Feb 2015, 12:06

Hi Phosphorglow! Glad to see you back, except this time you're giving us some food. :D

I think I know a question that many of us (hello Muirium) are thinking: do you think it would be possible to add Bluetooth support to the controller?

User avatar
phosphorglow

04 Feb 2015, 12:15

scottc wrote: Hi Phosphorglow! Glad to see you back, except this time you're giving us some food. :D

I think I know a question that many of us (hello Muirium) are thinking: do you think it would be possible to add Bluetooth support to the controller?
Thanks! :)

I don't know enough about hasu's firmware, but I think there's support for it somewhere? That was the idea behind having the extra I/O ports being accessible - someone more clever than myself can find applications for them. :P

If someone can direct me to some info I'd love to be able to include provisions for a module in the free space on the board!

User avatar
Halvar

04 Feb 2015, 12:44

YES! That is a very interesting project, I'd be interested in buying a PCB and helping with the software.

I'm bluetoothing my SSK at the moment based on a Teensy++ (same AVR chip you are using) controller with TMK software, a Bluefruit EZkey and a little LiPo loader circuit. What I'm doing is partly quite similar to this, but I didn't think of making a custom PCB for that yet. That would be most welcome though!

Fortunately, this Atmel chip has LOTS of pins... To speak to a bluetooth chip (or other interesting peripherals on the breadboard part) it would be nice if D2 and D3 (AVR UART RX and TX) would be free and available on the breadboard area, as well as maybe one or two free ADC pins and a few digital SPIO pins. In my experimenting at the moment, I'm using D2 and D3 for UART RX/TX, three outputs for bluetooth pairing, bluetooth reset and a battery on/off LED respectively, and 2 digital inputs for sensing status of a battery on/off switch and Bluetooth, and an analog input for sensing battery voltage. So 8 pins all in all, in addition to voltage and ground.

Another idea you could steal from the teensy would be the possibility to use a MCP1825 voltage regulator to let the controller run on 3.3 V. (https://www.pjrc.com/teensy/3volt.html) This saves about half of the power that the AVR chip needs (https://www.pjrc.com/teensy/low_power.html), and I don't think the Model M matrix will have a problem with that at all. You can see how they did it in the schematic: https://www.pjrc.com/teensy/schematic.html
Last edited by Halvar on 04 Feb 2015, 14:35, edited 3 times in total.

andrewjoy

04 Feb 2015, 12:47

I was thinking of something like this too, i was going to go through hole tho. Looking forward to see progress.

User avatar
clickykeyboards

04 Feb 2015, 15:02

I think a drop-in replacement controller with USB support for model M keyboards is a great idea.

If one could figure out bluetooth wireless support, that would also be of interest to model M users. We still get the same request for a "wireless model M" each and every month.

@Phosphorglow, have you thought about how to support the various different styles of model M controllers and the differences in the pin connectors?

There were alot of differences in the controllers used by IBM and Lexmark from 1987-1999.

Early model M keyboards had an a pin arrangement of 16 + 8 + 4 (LED), then later model M keyboards had 16 + 12 pin connectors.

http://www.clickeykeyboards.com/model-m ... 1987-1999/

User avatar
Muirium
µ

04 Feb 2015, 15:09

No kidding!

Image

Don't mind if I mirror this at DT, do you Clicky? It's a slow load from your page: http://www.clickeykeyboards.com/picture ... d=18524217

If there's only two different ribbon cable formats to worry about, we could simply include the sockets to support both. This includes everything from an SSK to a 122 key Model M, right?

The real advantage in a replacement controller is Bluetooth, for sure. Right now, we can simply pop a Teensy into any Model M and run Soarer's Converter on it for fully programmable USB goodness, running from the original. But Bluetooth, and the necessary power savings, are a whole other story. That's compelling!

User avatar
idollar
i$

04 Feb 2015, 15:19

I could list other advantages:

1.- Free software :-)
2.- Potential configuration tools similar to xwhatsit
3.- Fun. Lots of Fun

I would participate in this project !

User avatar
idollar
i$

04 Feb 2015, 15:23

I'm thinking about putting in pads for a Mini USB connector since there seems to be space for the sake of personal preference. I prefer the sturdy USB-B, but I know other people like the mini. I don't have a Wheelwriter board, but since IBM was pretty consistent, it probably fits as well.
Question: why don't you put in pads for Mini and USB-B and direct soldering of the cable all in parallel ? The user could decide which one to mount. The top left side of the PCB should have space for all if they are not mounted at the same time.

Just an idea ...
Last edited by idollar on 04 Feb 2015, 15:47, edited 1 time in total.

User avatar
Muirium
µ

04 Feb 2015, 15:28

Yeah, I like that too. With an option for the best (current) connector of all: micro USB. Leave a few feet free for USB C when it comes along too!

User avatar
clickykeyboards

04 Feb 2015, 15:32

@Muirium. Sure.. you can add a copy of the image to the DT wiki, but please remember to cite the original source. Working in academia, it drives me crazy when I find my photos and descriptions copy-and-pasted without attribution.

User avatar
idollar
i$

04 Feb 2015, 15:43

I did this some weeks ago, before putting together one of my Ms ...
I wanted to put the output into a matrix format. I will do it.
It may be useful. I have only seen a SSK matrix "decoded" in the DT.
DSC_9300.jpg
DSC_9300.jpg (350.93 KiB) Viewed 31334 times
DSC_9299.jpg
DSC_9299.jpg (337.18 KiB) Viewed 31334 times
DSC_9298.jpg
DSC_9298.jpg (338.73 KiB) Viewed 31334 times
I have contrasted and saturated the images.
The resolution is also reduced drastically. If needed I could post a better version of these.

andrewjoy

04 Feb 2015, 18:19

if there are multiple matrix connections , how about ether multiple connectors on the board ( prob need multi layer board for that or its going to get too big), or an adapter similar to xwhatsit display writer adapter.

In fact thinking about it now, an audino like "shield" for each type of matrix connection.

User avatar
idollar
i$

04 Feb 2015, 18:26

In my opinion is simpler.

Software

- The software could be configured to decide the number of rows and columns in the matrix. This is not a problem.

Hardware

Option 1 - parallel connectors covering all the options. Installed or not, but ready on the pcb
Option 2 - one connector for rows and a second for columns covering the max length of each. Blank inserts to cover the unused pins. In the worst scenario two per connector blanking the right and left side.

Both options are possible if the PCB is correctly designed.

User avatar
Muirium
µ

04 Feb 2015, 19:12

My first thought on reading that: You could even go with a single, extra long, connector which auto detects what's plugged into it.

My second thought: wait a minute, aren't all the rows and columns open circuits until keys are pressed? Auto detection would need the user to start pressing keys so it can see what's plugged in, where. Which might be fun!

User avatar
idollar
i$

04 Feb 2015, 19:32

Why to autodetect if the matrix will always be the same once installed ?

User avatar
Muirium
µ

04 Feb 2015, 19:48

Imagine explaining how to install one of these to IBM newbs, or anyone who hasn't heard of a matrix. That's why!

User avatar
idollar
i$

04 Feb 2015, 20:23

A manual should do the job. There are a handset of cases to explain only.
I do not see any problem in documenting it.

andrewjoy

04 Feb 2015, 20:39

idollar wrote: A manual should do the job. There are a handset of cases to explain only.
I do not see any problem in documenting it.
You have more faith in people than i do , nobody ever RTFM ever, even when the solution is right there in black and white. :).

More simple to say plug the thing into the thing and then into the other thing.

User avatar
idollar
i$

04 Feb 2015, 21:55

andrewjoy wrote:
idollar wrote: A manual should do the job. There are a handset of cases to explain only.
I do not see any problem in documenting it.
You have more faith in people than i do , nobody ever RTFM ever, even when the solution is right there in black and white. :).
More simple to say plug the thing into the thing and then into the other thing.
I have the solution: When you first plug your USB keyboard and until you configure the membrane type the controller shall output automatically "Did't I tell you that you shall read the manual before plugging me in ? : - ) " in an endless loop.
This will do ... :-)

User avatar
Daniel Beardsmore

04 Feb 2015, 23:26

It would be funnier if it intercepted keystrokes and just typed the next letter of "Read the manual first!" each time.

*types*

"Pleas"

... wait … that's not what I typed ...

*another key*

"e"

... ???

Please what?

And so on.

User avatar
Muirium
µ

04 Feb 2015, 23:33

That's actually a lovely bit of genius. I made a macro for All work and no play makes Jack a dull boy. But when the keyboard seems to have composed it for itself, it's so much better! One. Stroke. At. A. Time.

User avatar
idollar
i$

04 Feb 2015, 23:34

Daniel, this is the right way to do it, indeed !

User avatar
beltet

05 Feb 2015, 00:01

This looks real good. Will watch the progression of this!

User avatar
phosphorglow

05 Feb 2015, 13:19

Halvar wrote: YES! That is a very interesting project, I'd be interested in buying a PCB and helping with the software.

I'm bluetoothing my SSK at the moment based on a Teensy++ (same AVR chip you are using) controller with TMK software, a Bluefruit EZkey and a little LiPo loader circuit. What I'm doing is partly quite similar to this, but I didn't think of making a custom PCB for that yet. That would be most welcome though!

Fortunately, this Atmel chip has LOTS of pins... To speak to a bluetooth chip (or other interesting peripherals on the breadboard part) it would be nice if D2 and D3 (AVR UART RX and TX) would be free and available on the breadboard area, as well as maybe one or two free ADC pins and a few digital SPIO pins. In my experimenting at the moment, I'm using D2 and D3 for UART RX/TX, three outputs for bluetooth pairing, bluetooth reset and a battery on/off LED respectively, and 2 digital inputs for sensing status of a battery on/off switch and Bluetooth, and an analog input for sensing battery voltage. So 8 pins all in all, in addition to voltage and ground.

Another idea you could steal from the teensy would be the possibility to use a MCP1825 voltage regulator to let the controller run on 3.3 V. (https://www.pjrc.com/teensy/3volt.html) This saves about half of the power that the AVR chip needs (https://www.pjrc.com/teensy/low_power.html), and I don't think the Model M matrix will have a problem with that at all. You can see how they did it in the schematic: https://www.pjrc.com/teensy/schematic.html
Excellent stuff! Thanks for the input - this is exciting! ^_^

Okie dokie, I made a few changes. D2 and D3 are now free, as well as F0-F3. It looks like I can move the crystal to where the free port jumpers are on the left side, and move most of those to the breadboard area. Question is, what should I leave where it is?

I'm curious about the LiPo circuit, can you give me some more info? I'm sure I can add in traces and pads over there...
Is it possible at that point to use it as a wired AND bluetooth keyboard? I'll work on placing the voltage regulator, shouldn't be a big deal.
Attachments
controller1.jpeg
controller1.jpeg (153.62 KiB) Viewed 31157 times

User avatar
Muirium
µ

05 Feb 2015, 13:21

I'd be very happy with just a Bluetooth only keyboard that simply uses USB to charge, by the way. But dual mode is definitely all the more awesome still!

Something wireless modules generally suck at is how you program them. You need a physical programmer module, which hooks up to them manually every time you need to alter the software. The Teensy has spoiled me with its smart simplicity: do everything over USB. That's what we want for this! Reprogrammability right over the USB cable.

User avatar
phosphorglow

05 Feb 2015, 13:28

idollar wrote:
I'm thinking about putting in pads for a Mini USB connector since there seems to be space for the sake of personal preference. I prefer the sturdy USB-B, but I know other people like the mini. I don't have a Wheelwriter board, but since IBM was pretty consistent, it probably fits as well.
Question: why don't you put in pads for Mini and USB-B and direct soldering of the cable all in parallel ? The user could decide which one to mount. The top left side of the PCB should have space for all if they are not mounted at the same time.

Just an idea ...
Parallel won't work, but it loooooks like I have enough space to put pads in for a Micro right above the holes for the USB-B. Can anyone recommend a specific high quality connector brand/model I can plan for?

User avatar
Muirium
µ

05 Feb 2015, 13:34

Could you leave a set of through holes for the 4 USB lines, for those of us who like to string up our own socket on the keyboard chassis? That'd be mighty convenient! If so, labels please!

The standard names and numbering are here:

http://pinouts.ws/usb-pinout.html

User avatar
phosphorglow

05 Feb 2015, 13:40

clickykeyboards wrote: I think a drop-in replacement controller with USB support for model M keyboards is a great idea.

If one could figure out bluetooth wireless support, that would also be of interest to model M users. We still get the same request for a "wireless model M" each and every month.

@Phosphorglow, have you thought about how to support the various different styles of model M controllers and the differences in the pin connectors?

There were alot of differences in the controllers used by IBM and Lexmark from 1987-1999.

Early model M keyboards had an a pin arrangement of 16 + 8 + 4 (LED), then later model M keyboards had 16 + 12 pin connectors.

http://www.clickeykeyboards.com/model-m ... 1987-1999/
Physically there were a lot of different styles, but luckily the matrices are all electrically similar (for example, using a later Lexmark controller in place of an early IBM works, etc.). This layout has provisions for all the different ribbon connectors, everything else boils down to small changes in mapping. Yay for consistency!

User avatar
phosphorglow

05 Feb 2015, 13:42

Muirium wrote: Could you leave a set of through holes for the 4 USB lines, for those of us who like to string up our own socket on the keyboard chassis? That'd be mighty convenient! If so, labels please!

The standard names and numbering are here:

http://pinouts.ws/usb-pinout.html
Can and will do!

Going to need this little provision for terminal boards anyhoo.

Post Reply

Return to “Workshop”