Universal Model M Controller

User avatar
rsbseb
-Horned Rabbit-

28 Apr 2015, 04:27

phosphorglow wrote: 122 is basically just waiting on me to map out the matrix for the firmware config, which I expect to do this week.

Excellent, no rush, just wanted to make sure it was still in the works. Sounds like your effort is paying off.
Looking forward to driving my "M" someday soon.

User avatar
phosphorglow

28 Apr 2015, 08:43

Well, decided to take a break from other things and at least translate the 122 matrix into a chart. Now to plug it into the config...

Here's something off-topic yet related to the degree that it would be usable with this controller, a silly little project that was bugging me so I had to take some measurements and see if it would be feasible. Red lines are cutouts for the separating layer and second layer.
17.jpeg
17.jpeg (19.62 KiB) Viewed 4946 times
Think 1206 SMT and ~.75mm thick diode.

(Don't expect it any time soon, but prototype will definitely happen eventually. Electric cutter/plotter + mylar + silver trace pen = dangerous.)

User avatar
Madhias
BS TORPE

28 Apr 2015, 20:23

Dropped PM regarding a controller!

User avatar
vsev

30 Apr 2015, 15:47

Madhias wrote: Dropped PM regarding a controller!
+1 !

User avatar
lavernus

30 Apr 2015, 17:11

+1

User avatar
phosphorglow

30 Apr 2015, 20:19

I always thought 122's looked really cool, but never got around to actually converting one until now. Now that I'm using one, I really like it! So many extra keys that can do... I don't know. A lot of stuff I'll occasionally maybe use. Whatever, it looks cool.

Anyhoo! I'll be getting back to everyone later this evening to get orders sorted out. :)

User avatar
phosphorglow

01 May 2015, 17:01

Well, they're up for order in USB-only variation.

At this point I feel orihalcon's wonderful little Soarer's Converter adapters deserve mention here as well.

Basically boils down to how creative you want to get (LEDs, etc.), and whether or not you need or want to replace the stock controller (bad controllers rarely happen, but deteriorated attached cables do).

(...then there's the whole custom membrane with diodes idea...)
Last edited by phosphorglow on 01 May 2015, 17:49, edited 1 time in total.

User avatar
vivalarevolución
formerly prdlm2009

01 May 2015, 17:49

phosphorglow wrote: Well, they're up for order in USB-only variation.

At this point I feel orihalcon's wonderful little Soarer's Converter adapters deserve mention here as well.

Basically boils down to how creative you want to get (LEDs, etc.), and whether or not you need or want to replace the stock controller (bad controllers rarely happen, but deteriorated attached cables do).
Siiiiiiiick.

User avatar
macmakkara

06 May 2015, 11:31

phosphorglow wrote: Well, decided to take a break from other things and at least translate the 122 matrix into a chart. Now to plug it into the config...

Here's something off-topic yet related to the degree that it would be usable with this controller, a silly little project that was bugging me so I had to take some measurements and see if it would be feasible. Red lines are cutouts for the separating layer and second layer.
17.jpeg
Think 1206 SMT and ~.75mm thick diode.

(Don't expect it any time soon, but prototype will definitely happen eventually. Electric cutter/plotter + mylar + silver trace pen = dangerous.)
:O you mean NKRO on M O.O
I want that on my SSK..

Also btw how much shipping keyboard from your store to fin would cost?

User avatar
lavernus

08 May 2015, 17:00

i´m order mine one week ago with priority shipping an yet Maxx has not yet dispatched .I imagine that he has not yet finished

Vizir

08 May 2015, 18:44

Would the 122 versions work with the model f 122?

User avatar
Khers

08 May 2015, 18:49

No, but you can convert a F122 to USB using a xwhatsit controller

Vizir

08 May 2015, 18:51

yep. have one of those :P and it's waiting for a kishsaver. if this pcb worked with the f122, which currently has teensy + tmk, i'd have a teensy to make my next kb.

User avatar
Khers

08 May 2015, 19:00

Hah, I've also got one for a future Kishsaver (that will probably never show up). I guess you could hack one of these to work with the F122, but I don't know whether it's worth it over getting another Teensy if you already have tmk up and running on the F122. But someone more knowledgeable should probably answer that :D

User avatar
phosphorglow

13 May 2015, 00:09

macmakkara wrote: :O you mean NKRO on M O.O
I want that on my SSK..
Yup yup! :)

User avatar
phosphorglow

13 May 2015, 00:31

Otay! After a ton of busy busy busy, here's an update!

Bluetooth testing has been going well. It managed to get 96 hours of being left on continuously and being used on my iPad before needing a recharge. Sweet.

The switch on the back just switches between USB power and the output from the voltage regulator, which takes care of flashing while connected to USB.

Having no coding experience (BASIC doesn't count), I've been setting aside time with my morning coffee to read some C tutorials. Still can't see the individual trees from the forest, but they're getting less fuzzy. I always thought I'd get my feet wet with Python first, but C is more relevant since I've jumped into the MCU waters.

Alongside the C tutorials I've been staring at various config files and examples in TMK, and some things are starting to make sense. Kind of.

At the moment I'm stuck on this:
Pressing shift+Scroll sends Num Lock. Cool, but how do I also tell it to toggle the number pad layer? I tried using add_key (KC_FN2) and defining it as ACTION_LAYER_TOGGLE(1), but that doesn't work. (FN2 works if I put it on the default layer though).

Here's the code example I borrowed and modified:

Code: Select all

    switch (id) {
        // Shift + Scroll Lock -> Num Lock
        case SHIFT_NUM:
            shift_mod = get_mods()&MODS_SHIFT_MASK;
            if (record->event.pressed) {
                if (shift_mod) {
		    add_key(KC_NLCK);
                    send_keyboard_report(); // send Num Lock with shift + Scroll Lock
                } else {
                    del_mods(shift_mod); // remove shift
                    add_key(KC_SLCK);
                    send_keyboard_report(); // send Scroll Lock
                    add_mods(shift_mod); // return shift but not sent
                }
            } else {
                if (shift_mod) {
		    del_key(KC_NLCK);
                    send_keyboard_report();
                } else {
                    del_key(KC_SLCK);
                    send_keyboard_report();
                }
            }
            break;
Also on the agenda is switching host protocols for USB/BT via a FN key, and setting a pair button, but I think I've found some good examples to work my way through it.

User avatar
Muirium
µ

13 May 2015, 00:45

Music to my ears. 4 days of battery at first attempt is not bad at all! Native controllers are so the right way to go.

User avatar
phosphorglow

13 May 2015, 00:53

Right! Plus I'm sure there's something in the code base for power saving that I'm probably not utilizing.

Oh! And jump to bootloader magic function is working now. Needed to change the bootloader size to 8192, not 4096. Heh.

User avatar
Khers

13 May 2015, 11:30

4 days, that's impressive! What size battery did you use?

andrewjoy

13 May 2015, 11:37

Will it be possible to add bluetooth to an existing controller ?

User avatar
Muirium
µ

13 May 2015, 12:42

That's what Phosphor sent me the bits to do!

User avatar
lavernus

15 May 2015, 17:26

Creator theme did not like my comment and has no technical value as I expressed it by email , I delete the previous comment
Last edited by lavernus on 15 May 2015, 19:05, edited 2 times in total.

User avatar
phosphorglow

15 May 2015, 18:04

-Deleted- not relevant to the thread... :D
Last edited by phosphorglow on 15 May 2015, 19:24, edited 1 time in total.

User avatar
phosphorglow

15 May 2015, 18:06

Khers wrote: 4 days, that's impressive! What size battery did you use?
It's the 1200mAh battery. Adafruit was out of the bigger one, but I looked at the dimensions and it was too big to fit in a SSK. This one fits nice and snug!

User avatar
phosphorglow

15 May 2015, 18:09

andrewjoy wrote: Will it be possible to add bluetooth to an existing controller ?
Yes, so long as you don't mind getting a little creative with a few jumper wires... :P

I'd take a picture of mine, but it's embarrassingly messy from multiple solder/re-solders.

I still keep going back to the idea of a new sub-board with a Micro-B connector. And putting the voltage regulator on that... Aye...

User avatar
phosphorglow

15 May 2015, 19:35

Additional note!

I'm not satisfied with my original implementation for the painted mylar port covers. The black paint wasn't nearly as effective as I thought, which is annoying since my painted underlays have been able to withstand creases/folds/scrapes and other tests beyond my expectations. So if your cover chips or cracks, I'll send out another one.

The NEW idea is a custom cut 1/32" black sheet of HDPE plastic. Still need to order a sheet of it, but the test on the transparent stuff I had on hand worked just peachy.

User avatar
Muirium
µ

16 May 2015, 20:57

I must be honest: I never installed it anyway. I like that bare socket look. Especially as this PCB's waiting for modifications to power up to Bluetooth. Though the board's definitely a bit wobbly without that. Something solid should really seat it good and snug.

By the way, after a week on the Matias Ergo Pro (a pretty nice keyboard in its own right) I'm now back home on the SSK with your controller in it and it's bloody magnificent! My goodness, how I prefer buckling spring. And a programmable controller! Bliss. Just been importing my macros over from my Soarer box, all that power baked right into this board. Brilliant!

User avatar
Muirium
µ

20 May 2015, 22:16

phosphorglow wrote:
Muirium wrote: Music to my ears. 4 days of battery at first attempt is not bad at all! Native controllers are so the right way to go.
Right! Plus I'm sure there's something in the code base for power saving that I'm probably not utilizing.
The best way to really stretch battery life is to keep the controller sleeping as much as possible. Even when connected to a host over Bluetooth! The way you do that on the keyboard hardware side is: variable matrix scan frequency. When nothing's been pressed for a given length of time, slow it down, then down further, and again until you're only checking it twice a second maybe. If any key shows up, wake back up to the full polling rate you're using. A few hundred Hz is probably enough.

There's plenty of power saving tricks on the Bluetooth hardware side as well, and they're broadly about the "race to sleep" too.

Anyway, we start out in a great place by simply pulling out the old IBM controller, and saving all the power hungry bother of bitbanging its PS/2 output. Once you run the controller, you run the keyboard. Anything less than that, and, yeah, batteries won't last long because nothing can ever rest.

andrewjoy

21 May 2015, 10:49

It arrived yesterday , well packed and safe!

It will be ready to go when my 102 sliver label arrives!

I must say the quality of the soldering is very good , did you do it yourself or get it produced ?


Also regarding bluetooth , you said you would show photos of yours , would you be able to list what i need to buy to do it ? I want to be able to sit on my couch and use a model M :).

User avatar
Muirium
µ

21 May 2015, 12:05

Yesterday:
andrewjoy wrote: For me i find wireless a total PITA , batteries , syncing and so on its all just too much!I like the idea of it but the practicality is just not for me. I want to just plug a USB cable into a thing and then the thing i plugged in works, no fuss no messing. Many i am just a relic of times past i don't know.
Today:
andrewjoy wrote: Also regarding bluetooth , you said you would show photos of yours , would you be able to list what i need to buy to do it ? I want to be able to sit on my couch and use a model M :).
Fast learner. Welcome to the wireless club!

I have the components required (thanks to phosphor) and await his instructions for assembly. BT is in early days. The controller's still in development.

Post Reply

Return to “Workshop”