Author Topic: MEK - 3d printed modular ergonomic keyboard, teensy, mechanical switches  (Read 3873 times)

0 Members and 1 Guest are viewing this topic.

Offline iso

  • Thread Starter
  • Posts: 125
PB = Pause break
SL = Screen lock
IN = Insert
CL = Caps Lock
PS = Print screen
H = Home
SHH = Shift + Home
VU+ = Volume up
VD- = Volume down
M1 = Macro1  (Open Firefox, open 5 diff pages, log in - Make it easy to start work in the morning)
M2 = Macro 2 (Open Firefox, open diff. websites to check various input fields, run a terminal, run a scraper, create a text file on desktop, paste, save...)
SHE = Shift + End
E = End
CS = Control + S
CA = Control + A
FX = Firefox
GEA = Control panel
DES = Miimize everything, show desktop or open a folder showing the files on desktop for active user.
PU = Page up
CC = Control + C - Copy
CV = Control + V - Paste
CX = Control + X - Cut
CZ = Control + Z - Undo
CY = Control + Y = Redo
MEN = Right click on application window/mouse cursor

Yes, left console tested, is working perfectly. I dont mind running wires from center console to the thumb cluster, the thumbs piece can be easily detached with the center console.
I`ll use enter, not return but I like the return icon :))

Offline nevin

  • Posts: 367
  • Location: US
thumb clusters are going to be part of the center console?    ....but they're attached to the side modules.

i can work on fixing the keymap & work on macros but we're at a standstill until i can see where every key is wired. the firmware needs to know what key is where so it send the correct scan code.

sticky initial key, make sure all switches are functioning properly (not stuck or binding) i know you said some of your switches were second hand. switch plates can oxidize as well and act like a dead switch. or if your getting bouncing, you can quickly/repeatedly press the switch to get it back to functioning normal. (i had this with some old alps switches) and you don't have any shorts. you always have to work the bugs out of a new board.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline nevin

  • Posts: 367
  • Location: US
what's CMD?  i would guess command (mac... would be GUI)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline nevin

  • Posts: 367
  • Location: US
what OS are you running? some of these macros are probably not capable of performing some of the actions you'd like.
but there might be another option to automate some of this stuff.
Quote
M1 = Macro1  (Open Firefox, open 5 diff pages, log in - Make it easy to start work in the morning)
M2 = Macro 2 (Open Firefox, open diff. websites to check various input fields, run a terminal, run a scraper, create a text file on desktop, paste, save...)

all these are programmed:

m1      SHH = Shift + Home
m4      SHE = Shift + End
m5      CS = Control + S
m6      CA = Control + A
m10    CC = Control + C - Copy
m11    CV = Control + V - Paste
m12    CX = Control + X - Cut
m13    CZ = Control + Z - Undo
m14    CY = Control + Y = Redo
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
I appreciate the help, but take it easy man, I like to figure things on my own, sooner or later I`ll get it to work.  Plus the first itteration is never perfect.
OS ? Windows 10 and Linux Lite.
About the keys being sent automatically, there were no wires/switches soldered on the teensy, bare board, just plugged in to the USB right after firmware flash, so there is no way the switches are faulty (might be but doesnt apply here)
I might have to get a new Teensy.
Thumblusters are attached to the left-right consoles but the way generated for me, I have to wire it from the center, makes no difference really.
For the macros, I can have F13, f14, etc and make a shell/cmd open a batch file and run that way, more efficient, was just a thought.
CMD is gonna be WINDOWS + R

Offline nevin

  • Posts: 367
  • Location: US
sorry.

this is how i imagined it being wired
218451-0

and attached is the json config with edits & added macros. just click on the upload button & select this json file. everything will be there.
« Last Edit: Thu, 02 May 2019, 00:57:07 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Fantastic, thanks again @nevin.

Offline iso

  • Thread Starter
  • Posts: 125
Will it take a complete rewrite of both firmware to... "combine" the pmw3360 sensor and keyboard ? I`d like to have a trackball on this keyboard but without "combining" the firmware its gonna take 2 teensy, the 2.0++ got enough pins left for the pmw3360 and I see no reason to use another USB port if there`s a way to have both on the 2.0 ++. Thoughts ?

Offline iso

  • Thread Starter
  • Posts: 125
Forgot to mention, there is no E2 pin, messed with my head for a good half hour, trying to figure out why some of the keys are not working. Got rid of all the E`s and moved everything on the firmware on F`s - Columns.


Offline nevin

  • Posts: 367
  • Location: US
@iso - combining firmware (keyboard & mouse).... would take a good bit, yes. QMK does have support for a couple pointing devices, more for trackpoints & trackpoads. nothing as advanced as the sensor we are using. in combining, i would be a little concerned there might be performance issues because of the additional load on the processor, and/or firmware size issues (getting all of it to fit on one teensy *flashing). plus, i haven't finalized the firmware for my MEM yet. usb hub or host shield would be another option to combine before connecting to the desktop.

firmware for trackball, only one axis will need inverted. will vary which axis, depending on orientation of optical sensor. will look at this first.

kbfirmware site... it's not perfect, but it's a great tool & jump starter to get from one-off custom hand-wired to workable firmware. i was also using the condensed version of your physical layout because of how it would be wired & recognized by the firmware.

Quote
trying to figure out why some of the keys are not working.
did you finish wiring the MEK? are you using it yet? what are your thoughts?
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Left console only, I had to pause that and make myself some new hardware, illuminated jeweler`s headband loupe.
Here`s the left console working. Will take another 4hr max to finish it... I need to find the time.

218686-0

Offline nevin

  • Posts: 367
  • Location: US
nice.

Quote
I need to find the time.
i know what you mean.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Found some time, re-soldered left console, finished center and right. Only the thumbs left to do.
The JTags I bought are made of.... chinesium... of wax, not sure, I have a 20watt soldering iron, lowest wattage I could find,  on purpose, plus I made the tip extra long,  the plastic on these JTags is real bad, destroyed 5 before I could use one and I was very careful to not overheat the pins.
Thats what happens when you buy cheap no-name hardware  :))

218804-0

Offline nevin

  • Posts: 367
  • Location: US
(....wolf whistle) nice.

yeah, anything like that, put the two halves of the connector together before you start soldering. that way if it does get a little soft, it will be held in place by the other half of the connector till it cools and alignment of the pins can't move.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Problems
I cant make the Teensy stop sending keys, flashed the firmware several times, different setup, desoldered everything again just to make sure I dont have a short somewhere, used 3 different machines and 3 diff cables, same problem.
Im talking about having the Teensy plugged in and nothing soldered to the pins, bare board.
First I had the teensy automatically sending RSHIFT, END, F6, F12, ; and ,.
The first 4 are only sent once at plug-in, last 2 are repeating/looping forever
Went back to the same website, removed and replaced those keys with something radom and re-generated the HEX, flashed the new firmware.
New keys are being sent, RSHIFT, END, F12, PAGEUP, PAGEDOWN
The first 3 are only sent once at plug-in, last 2 are repeating/looping forever
Now, I`ve never used RSHIFT anywhere on my setup so I cant disable that but given the newly added keys all I can only say the website is buggy and the HEX will never work as intended
On previous posts I`ve included the source code generated by same website, if someone can get that and look into it and check if me barking about the website being buggy is legit i`d appreciate it :))
I ordered another teensy, new temperature controlled solderign iron and new type of soldering flux, just to make sure I didnt damaged the circuitry, when the Tennsy gonna be here I`m not gonna solder anything to it but i`ll flash the 2 versions of the firmware.
So, for the next 4, 5 days I`ll focus on something else

On the positve note
I also bought a ball/roller massger, took it apart and now I have a 54mm hard plastic perfectly round ball for under $7
Modelled and printed a case/support for it, I`m gonna use the same sensor ; pmw3360  to create a module or attach it to the right console
Destroyed a small bearing, took the tiny steel bearing balls and heat insterted into the 3d printed support, 3 supports, rolls nice and smooth, not as smooth as the real deal where zirconia balls are being used but is good enough for under $7

218999-0


« Last Edit: Thu, 09 May 2019, 14:27:08 by iso »

Offline nevin

  • Posts: 367
  • Location: US
i'll look at the firmware, do a build on my system with your map etc. i have a unused teensy 2++ i can test on as well. will try for this evening but not sure.

flip your mouse over & test if the ball works with the sensor before you get too much farther. with optical sensors in trackballs, the material of the ball can be tricky to get one that reads well. i tested it with a racquetball to see what axes need flipped.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
DPI goes all the way to 12k, this sensor is a monster, works well with the ball I extracted, even works with a shiny stainless steel ball I`ve got.
Does not matter which axis is being flipped, rotating the sensor 45% clockwise/counterclickwise on horizontal plane will take care of the "wrong" orientation, this becomes a problem when cable management/USB plug will mess with the overall design.
Thanks for looking into the source code @nevin.

Offline nevin

  • Posts: 367
  • Location: US
good to hear on the different balls working. guess that's not as much of an issue as i originally thought.

you can always wire a usb cable straight to the teensy & avoid the onboard connector or use in an extension to relocate it somewhere else (common in handwired vintage keyboards)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Update:

Finished designing most of the trackball elements, minus the sensor/teensy case which I`m gonna take from my mouse and adapt it for the trackball.
The sensor height/distance from the ball is adjustable by adding metal spacers/washers or nuts.
The scroll/jog has 44, 4mm holes for round magnets, those will trigger the reed switches/encoder, the ring is swappable, meaning, if you decide to go with less "scrolling power" you can swap the wheel without going to control panel and change settings for the scroll
Full metal bearing ball for the scroll piece, this is very smooth and will never go bad, as in develop play/become lose - https://www.amazon.com/gp/product/B007HS0HU6
The bottom picture is showing on the right side the steel screw/bolt, this can get close/away from the magnets. This will create "magnetic drag". If you want your scroll wheel to have hard/smooth/non existing feedback as where the next line is gonna stop.
Will use same sensor/teensy 2.0 like my mouse - You will be able to change the orientation of the sensor.
The tiny steel balls are easily inserted by holding them with tweezers and heating with a ligter/torch then aplying into position  (Last picture - I`ve misplaced those at first)
I will only upload the model if requested, please keep in mind that things will change the moment I have the new sensors shipped to me.

Its green because I`m testing and I wont use good filament  :thumb:
« Last Edit: Wed, 15 May 2019, 12:41:55 by iso »

Offline nevin

  • Posts: 367
  • Location: US
very nice. ball is sitting quite proud compared to most other trackballs i have or seen. i like it. more overall surface exposed.

will get you inverted axis's of current firmware soon as i can. (should be in the next day or so)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Yes, lots of surface exposed, althought I`m little conflicted about that, the ball is loose as in if I turn it upside down, will fall. That translates into if you hit the desk/keyboard support with your knee hard enough (we all did it) the ball might jump out of the socket, if lands on hard surface might chip the ball. Modelling a lip to keep it in place is a solution but will take away from whats beautiful about it :)

One solution would be to have a steel ball coated in hard material (ceramic) and a round magnet under the plastic, strong enough to keep it in place. without adding the extra material. But that wont be cheap :)

Offline nevin

  • Posts: 367
  • Location: US
i wouldn't worry about it. don't over think it. it's something that makes it unique. and how many times do you pick up your trackball or turn it upside down? now, if this will be mounted at an angle on your MEK, that might be an issue.

like the magnet idea too, even if not practical/cost effective.
depending on how strong the magnet is, it might inhibit ball movement anyway.
« Last Edit: Wed, 15 May 2019, 14:34:47 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
My Teensy 2.0 ++ arrived today, turns out the firmware that is generated by kbfirmware.com is bad.
Anyone used EasyAVR ? Doesnt look like supports 22 column x 8 row layouts but im not that familiar with the software anymore, changed alot from 3years ago. https://github.com/dhowland/EasyAVR/releases
I still have the Arduino IDE as last resort if EasyAVR is unusable for my specific requirements.
On the 3d printer I have the base of the trackball printing, updating soon with pictures.

Offline nevin

  • Posts: 367
  • Location: US
Probably just a bug in the Web configurator. Keymap & stuff should be good, I'll just build in the desktop enviroment.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Left to do on the trackball.
1. Model the case/support for 5 Gaterons  - Right/left/middle click, back/forward (DPI switching)
2. Scroll ; Rotary encoder placement/container

219625-0

219627-1

219629-2

Yes, the whole trackball module is quite big, mainly because I`m using a 54mm ball, I believe the regular ones use 40mm.
Green doesnt look that bad when combined with other colors :)

Offline iso

  • Thread Starter
  • Posts: 125
I been trying to make a few keys working using the Arduino IDE, I dont even know where to start with this layout, I might have to go back to the same website and use that firmware which I managed to make it work to some degree
And havng the source code looks like could be easier to figure out why the keys are sent automatically and prevent that than trying to figure out the matrix on my own on a 8 x 22 config


Offline nevin

  • Posts: 367
  • Location: US
Arduino IDE... no idea how you specify scanning rows & columns in that. pretty easy for single key but using a matrix is something totally different.

with the QMK firmware... i'll look at it soon as i can (probably later today) my guess is, it's just a mixup between the matrix you specified & what's typical/normal (usually a block without spaces between rows/columns like the examples i was showing you). as the site just allows you to WYSIWYG config a bunch of the variables in a boilerplate QMK build.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
I managed to wire everything except the left-right-down-up arrow keys, its middle of the night here and I will continue tomorrow or next 2 days and re-update.
When I bought the JTag connectors I thought that 14 pins will do, the center console got 8 col by  8 row which require 16 pins.
So, I will have to order new jTags and re-model the console to fit.
Also pins from B0 to B7 are the rows, each console (x3) will have a wire running of off that, 18 wires, a new design where I have to add a PCB breadboard to the back of the teensy is required, so the teensy case/container will change too, as I see it, in max 2 weeks I will have MEK running.
After that I will focus on new module designs and functionality.

Offline nevin

  • Posts: 367
  • Location: US
the 14 pin connectors will work. you just need to get the rows & columns from the outside clusters to center console. see below.

sorry.

this is how i imagined it being wired
(Attachment Link)

and attached is the json config with edits & added macros. just click on the upload button & select this json file. everything will be there.


Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline iso

  • Thread Starter
  • Posts: 125
Update, all wired up except the thumb keys, which previously I had wired but since the last post I had to re-wire various parts of it, the connectors are hard to solder, low quality metals were used and what looks like a solid joint just snaps off after I`m trying to push it inside the 3d printed case, I have to find a diff. way or type of connector to link the Teensy to the modules.
I hope by Monday (3 days from now) I`ll post another update with a video of me using it.


Offline iso

  • Thread Starter
  • Posts: 125
Update:

Its all wired up and fully functional, I have to learn how to add my own macros and how complex those can be.
Best news of this update is that B0 is the culprit for sending certain keys automatically every time I`d plug in the teensy.
Not entirely sure why but now I`m not using that pin and routed the whole row to E1, solved the problem, its super stable now.
If someone can enlighten me on why would that be happening...
Sorry that I automatically blamed kbfirmware.com for this and thank you for having the web service up and allow me to map my device  :thumb:

Here`s a speed up low res video, I will have a better one soon where I separate the 2 video sources, with the phone is hard to capture both and make it look decent too.


Offline nevin

  • Posts: 367
  • Location: US
YAY! Congrats!

B0 - Take a look at the attached pinout. Looks like there is something else assigned to pin 10 = B0 (PCINT_) could help explain the reason it's doing it at startup....
220039-0
Taken from the data sheet

Little clip - how to create & assign macro in KBFirmware

Documentation on QMKs macro implementation As this is what the KBFirmware site builds for you. Again for some of the more advanced ones (opening tabs, logging in, manipulating windows, etc...) you might want to run a app/macro program on your PC to watch for certain key combinations to manipulate certain windows/apps (look for scripting/automating)
Here's a link to one discussion (old thread, just to give you an idea)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Sintpinty

  • Carbon Based Life Form
  • Posts: 511
  • Location: A can of beans in the cupboard
  • AKA Bitba_t. Loves keebs and Quora.
    • My promotion link
ALL KEYCAPS

All keycaps included plus some variations of same key I tried, so, some keys will appear twice, there are plenty of free 3d programs that will let you import OBJs and separate the models and export/print only what you need.

FREE FOR PERSONAL USE
[/color]

KEYBOARD MODEL

MEK.zip includes the keyboard files minus the module and the teensy box that attaches to the handle, on the back of the keyboard, I will add those later.

I`m using 4-40 screws/bolts, M3 would be a better choice.
Consoles have a slot for FC-14P 14 pin JTAG, will allow you to detach consoles, add different module, etc.

Enjoy.

Really interested about those keycaps

Offline iso

  • Thread Starter
  • Posts: 125
Thank you @nevin, always helpful, very much appreciated

"Really interested about those keycaps"
Now that I`ve been using the keyboard for few hours here and there I can tell what I`ve learned about this keyboard so far
With super-flat keys precision is very important.
What do I mean by that ?
No matter how big/small your hand is, you still gonna have to move your fingers left/right, meaning you`ll never hit the keycap right in the center.
Why is that important ? Regular keycaps  got a "skirt" for a good reason, if you hit the key off-center, the other surrounding keycaps skirt is gonna "guide" your finger and will give you a feedback about how off you are and slowly you get to "learn the layout", be precise.
With flat keys there is no guiding If you happen to have much smaller hands or much larger than mine, at the beginning you gonna have a really hard time typing and I`m not exagerating, I got a buddy of mine very excited to come over and try it, hes a wrestler, got thick short fingers and wide palm, it was funny seeing him trying to press just one key without hitting adjacent keys, he had no choice but to start pecking. "I want one anyway" he said after 3 min
So I guess what I`m saying is be ready to be disappointed at first, flat keys will force you to be precise.
Im looking forward to seeing other people building it and uploading pictures.