[WIP] OneHand - 20% Keyboard

User avatar
PJE

20 Nov 2013, 19:16

Muirium wrote:{You've got PM.}

A case is definitely an improvement over my current plan of sticking rubber feet on the underside!

@PJE: is it possible to run the OneHand without surface mount resistors entirely? If I forego LEDs and the expansion port?
The resistors are purely for the LEDs, which are optional (especially the center one covered by the Teensy, and the I2C - which can be fitted somewhere else on the link. Other than the switches and Teensy, all the other components are optional.

PJE

User avatar
PJE

20 Nov 2013, 19:29

mohitgarg wrote:Muirium, I am working on an acrylic case along with an acrylic case, which I should be able to send out by end of this month if you would be interested. Currently, I'm making two, one for myself and one for PJE.

PJE, I would suggest replacing the Teensy, with onboard SMD components, the GH60 is a great place to get started on that.
Hi Mihitgarg,

Thanks again for working on the acrylic case. I think it'll add some polish to the design.

I'm currently working on the MK2 design, which will keep the current shape/size, but will incorporate the following changes:

1. Replace Teensy with SMD mounted Teensy CPU from PJRC. This will have the major benefit of allowing all the switches to be replaced as needed.

2. Option to use I2C expander in place of the Teensy to allow two handed typing - although the Teensy CPU is only a little more costly than two 16-way expanders, so this may get rejected.

3. Replace I2C header with a Grove type 4-pin connector to provide a more standard connection.

In which case I may look to get the SMD components professionally mounted and run a small batch after the initial hand built prototype. The switches/LEDs will be installed from the top, with all the SMD on the bottom.

The physical key arrangement works well for me, but I'm looking at the chording options to allow smoother and faster typing - the addition of 'th' and 'of' along with other double letter combinations on rolling double presses has made a big difference in typing ease and speed. To which end I'm investigating the main key layout to provide as many sensible double letter combinations as possible.

If you have any other suggestions I'd be very interested in your input on the next version - the fact that I'm looking into a Mk2 is more an indication that I'm happy with the Mk1's concept but would like to take it further.

Regards,

PJE

User avatar
Muirium
µ

20 Nov 2013, 20:13

PJE wrote: The resistors are purely for the LEDs, which are optional (especially the center one covered by the Teensy, and the I2C - which can be fitted somewhere else on the link. Other than the switches and Teensy, all the other components are optional.
Phew! That surface mount stuff is something I need to practice before I'm the least bit confident.

Mohitgarg's acrylic case includes a plate as its top layer, which is a format I'm very used to with my steel layered 60%. A good enclosure should make quite the keyboard of the OneHand!

jeffkoch

20 Nov 2013, 21:29

Muirium wrote: Phew! That surface mount stuff is something I need to practice before I'm the least bit confident.
It's a lot easier with a stereo microscope and a really good soldering iron. Also very fine solder or solder paste, solder wick, and good tweezers. Stereo microscopes are abundant on ebay -- a model with zoom is probably worth the extra cost.

User avatar
PJE

20 Nov 2013, 22:44

I must have a steady hand and/or good eyesight as I have normally no problem using a standard iron. It's easier at work with a nice temp controlled iron and a magnifier lamp.

You just have to be very careful not to use too much solder and too much heat. I tend to lightly tin the pad, then lay the component on and reflow the solder to tack the resistor while holding it down with a pair of tweezers. I then carefully add a little solder to each end.

I think it's because I normally generate hand solder compatible footprints if I know I'm going to be making it by hand to expose some of the PCB pad at each end of the component which makes it easier.

Finally, I always use the thinnest solder I can find to prevent blobs of solder on the components/PCB.

I usually check the solder connection using an multimeter to ensure the resistor is connected correctly.

User avatar
PJE

21 Nov 2013, 01:17

I connected a Seeedstudio 128x64 OLED display to the I2C port on the OneHand to test it as a status display.

It's working very well, but it's a little small - I was expecting something larger when I ordered it - i.e. a typical LCD size, not thumbnail sized! Nice and bright though (not that it shows on the photo).

Image

PJE

EDIT: Having used it for a day I'm liking the display more than the in-switch LEDs. If I can get a bigger display such as the RGB LCD from Seeedstudio (link below), I may do away with the LEDs in the switches.

http://www.seeedstudio.com/depot/grove- ... -1643.html

User avatar
PJE

22 Nov 2013, 02:42

If you're not tired of all my updates, here's another one!

I've totally changed the way I decode the keypresses, so that each individual key in sequence is sent if two or more keys are not pressed simultaneously.

The Current single/double key map is (Capitol - Single, Lower - double from two adjacent characters):

Code: Select all

*  A f O y I q <
^  T h E m N g S
#  D b R v L   #
#  U ' C , .   #
Therefore, A followed by A>O will result in AO being typed. Pressing A+O simultaneously will generate F. (A>O indicates A pressed then while holding A pressing O).

I've expanded on this to change key pairs based on the start and end keys. T followed by T>E does not generate the TE pair, but the more common TH. Thus 'The' is simple the rolling T>E followed by an E which is quite easy to type.

I then expanded this to three character pairs, so T>E>N will add type TH followed by EN to generate THEN... Pressing T, E, N will result in the slower TEN which is less frequent word.

I, N>S will change the S to a G to create ING rather than needing to type I, N, N+S. This makes typing much faster.

I've made a switch statement for the translation to allow any combination to be created. At present, a single press, based on the last character can generate up to three characters (each with different modifiers if needed).

Code: Select all

switch (Step) {
  case 2: // Additions / Substitutions on second character
    switch ((char)Send[1]) {
      case (char)KEY_E: if (SendOld == (char)KEY_T) Send[1] = KEY_H; break; // TE -> TH
      case (char)KEY_A: if (SendOld == (char)KEY_O) Send[1] = KEY_F; break; // OD -> OF
      case (char)KEY_S: if (SendOld == (char)KEY_N) Send[1] = KEY_G; break; // (I)NS -> (I)NG
    }
    break;
  case 3: // Additions / Substitutions on third character
    switch ((char)Send[1]) {
       case (char)KEY_N: if (SendOld == (char)KEY_H) Send[1] = KEY_E; Send[2] = KEY_N; break; // (T)HN -> (T)HEN
    }
    break;              
}
At present it adds/substitutes on the second/third character, but you could use backspace to erase the first character followed by two new characters if needed.

I'm really enjoying messing around with this 'keyboard', and if I ever stop moving the letters around I feel I could become quite quick typing on it.


PJE
Last edited by PJE on 22 Nov 2013, 03:05, edited 3 times in total.

User avatar
Muirium
µ

22 Nov 2013, 02:53

Bored? Never! This is the good stuff now. Next step: analyse a corpus of English language prose (or whatever else you want to type most efficiently) for letter, pairs, triplets and quads frequencies!

How much headroom do you think you have in the Teensy 2 for creative sequences? I run out of space quite frequently with my crazy layers in Soarer's Converter, but I'm not exactly building from source.

User avatar
PJE

22 Nov 2013, 03:16

I've been looking at the pairs, triples and quads, to guide the letter placement - that's why I swapped T and A to allow THE/THEN to typed more easily.

With the OLED display driver, and Serial USB debugging within the code, I'm currently at:

Code: Select all

Binary sketch size: 9,826 bytes (of a 32,256 byte maximum)
Estimated memory use: 1,360 bytes (of a 2,560 byte maximum)
Most of the RAM is storing the main character table, which could be moved to ROM if I were so inclined, but until I run out of RAM I've taken the easy way out.

As you can see there's lots of space for special cases - I'm even looking at hidden codes to type my name, passwords and email addresses to speed up general day to day usage.

At present the system will generate a full alphanumeric keyboard with upper and lower case, CTRL, ALT and WIN modiers, a number mode, cursor mode and Function mode. I've pretty much given up on the modes at present as you can type the numbers and symbols from the brackets/braces/etc as well as cursor movement from the standard mode...

I'm still working on the MK2 PCB design, which will incorporate an embedded CPU rather then the Teensy which is a little messy. I'm also going to allow a larger I2C LCD display to be mounted above the keys for mode/status display, and even a simple text editor, or shortcut menu ;)

Now, if I only didn't have a day job...

mohitgarg

26 Nov 2013, 21:46

Got the PCB:
Image

Elliot, PM me your color choice for the case, I might get them cut this week sometime.

User avatar
PJE

28 Nov 2013, 02:18

Hi Mohitgarg,

Just a warning on the silk screen the I/O pin for switch 7 is D2 not D1, and swithc 8 is D3 not D6...

I've just fixed a bug that had been causing the software to hang periodically. Now everything is working fine, I'm going to look at adding some additional functionality.

PJE

mohitgarg

29 Nov 2013, 10:20

Here is the case:
Image

There are 7 layers, image shows layers from top to bottom. All cut in 3m acrylic.

There are three different holes for bolting as instead of using a socket head screw like most other acrylic cases, I use a different method. Top and bottom layers have large holes to allow for flat head screws to be as level with the surface as possible, this is an alternate to countersink as countersinking acrylic can be cumbersome, and I wanted to get the cases to be done all on the laser. The three layers below the top layers have hex cutouts to accommodate 8mm M3 brass standoffs. All layers after that til the bottom layer have 3mm circle cutouts for M3 screws to go through and allow all layers to align properly.

In this image,
Green --> Large circular holes for screw heads
Red --> Hexagonal holes for brass standoffs
Blue --> Small circular hole for screw shaft
Grey --> M3 Flathead screws
Gold --> Brass standoff
Image

User avatar
PJE

29 Nov 2013, 16:08

Hi Mohitgarg,

The case looks fantastic!!!!

Using a keyswitch plate will mean that you will need to mount the header pins for the Teensy to the PCB before attaching the switches, otherwise you'd have to be able to push the two switches 21 & 24 through the plate from underneath, which would need a bigger cut-out and reduce the mounting plate's mechanical mounting advantage.

I just received two Teensy modules with pins, but will order another without the pins so I can use your case as it was meant to be!

Work on the software is progressing well, and I now have a keyboard which can generate all the standard characters. I need to look at how the system handles the entry of non-standard characters via ALT and a number pad entered code. (Let me know when you need the software, and I'll post a link, but it's still evolving).

I've also turned the keycaps for the bottom row around, see below, to make it a little more comfortable - especially as I've move shift to the bottom row next to the thumb key so I could have an additional non-chord character in an easier to reach spot. The shift is now handled by the thumb as needed.

Image

I've also moved the OLED display a more central location, but I'm going back and forth on whether the LEDs in the switches or an LCD/OLED display is the way to go on the next version. I'll probably stay with the option for both, but make the LED pins available for add-ons if not need.

Image

Regards,

PJE

User avatar
jdcarpe

29 Nov 2013, 17:41

MOZ,

Can I get a case, as well? PJE is sending me a PCB.

You could ship it to me with the qazpad case. In the same colors. :)

Just let me know how much I owe you, sir.

User avatar
PJE

29 Nov 2013, 20:24

I've been playing with the character positions, and have come up with an alternative which uses much less chording for normal typing. It uses the thumb key to select between two alternative characters. With this I only need to use three fingered chords for q, x, and z.

Image

I'm looking to use [Space][Enter] to select a second number mode, or [Enter]+[Keys] to prevent needing to select a specific mode.

This keyboard is quite quick, once you get used to the key positions - which I'm constantly changing... I need to do a little more optimization on the red letters which are a little scattershot at the moment.

PJE

mohitgarg

30 Nov 2013, 09:11

jdcarpe wrote:MOZ,

Can I get a case, as well? PJE is sending me a PCB.

You could ship it to me with the qazpad case. In the same colors. :)

Just let me know how much I owe you, sir.
Sure sir, no problem.

User avatar
Muirium
µ

30 Nov 2013, 15:57

I'm still in for one too, of course, because it's fine work. Thanks for making the inside and outside of a smart little keyboard, gentlemen! Indeed, the project's currently in the running for a Deskthority award: Best Space Saving / Compact Keyboard of 2013. Sterling effort.

http://deskthority.net/deskthority-awar ... t6936.html

User avatar
PJE

01 Dec 2013, 16:02

Muirium wrote:I'm still in for one too, of course, because it's fine work. Thanks for making the inside and outside of a smart little keyboard, gentlemen! Indeed, the project's currently in the running for a Deskthority award: Best Space Saving / Compact Keyboard of 2013. Sterling effort.

http://deskthority.net/deskthority-awar ... t6936.html
That's a very pleasant surprise - it's nice to know people think I'm not (too) mad! :D

I'm current reworking the key scanning code, to make it easier to expand. I've incorporated the thumb key into the table to make the table simpler as there are two smaller sets of codes one for the non-thumbed keys and one with the thumb. This reduces the memory used for the table, at the expense of needing to scan more entries.

At times I wish the keyboard only had 16 keys as this would make coding MUCH simpler. I tried using 32bit numbers, which worked, but was making the CPU do much more than it needed to. I've therefore split it into a 16-bit value and the two modifiers (Thumb & Shift). Hopefully I'll have it working again soon...

PJE

User avatar
oneproduct

06 Jan 2014, 01:55

Image

Assembled it except for the Teensy. I thought I had a Teensy laying around but it was a Teensy++ so I ordered a new one and am waiting for it to arrive.

I did a pretty terrible job of soldering though and I'm not even confident that all the solder joints are good hah. It was my second time doing so, the first being my Ergodox. Once I get the Teensy I'll send you a PM to ask about setting things up. :)

User avatar
PJE

06 Jan 2014, 02:24

Good to hear about your progress. I've been busy over the holidays visiting my parents in the UK, so haven't done much with the software. I'm optimizing the code to speed up the scanning and reduce missing and repeated characters. There's just a couple of items which need correcting before release.

I've been thinking about the next iteration of the design, and I'm contemplating either embedding the CPU on the PCB, or switching to a lower cost ATmega32U4 board such as the sub $5 one off eBay, but that would require me to use a matrix keyboard arrangement.

http://pages.ebay.com/link/?nav=item.vi ... 1078954461

I'm also waiting for the MX Red and Brown switches so I can build a quieter unit as my wife is not a fan of the noise the Blues make.

I should have more time to experiment over the next few weeks.

User avatar
oneproduct

06 Jan 2014, 03:03

Looking back at your assembly instructions on the previous page, I suddenly realize how silly it to solder on all the switches before the Teensy, haha. Probably going to have to desolder some.

User avatar
PJE

06 Jan 2014, 03:32

oneproduct wrote:Looking back at your assembly instructions on the previous page, I suddenly realize how silly it to solder on all the switches before the Teensy, haha. Probably going to have to desolder some.
All the holes are through hole plated. If you bought a Teensy without the pins installed you can solder pins to the bottom of the PCB, and then mount the Teensy onto the pins. Otherwise you'll need to remove the switches around the Teensy to access the solder points.

Let me know if you need more detailed instructions.

User avatar
oneproduct

16 Jan 2014, 03:54

After being silly on two occassions, I've got mine working! :D

The first occassion was me not realizing that soldering on all the switches before the Teensy was not a good idea! Make sure you solder on the two switches that go beneath the Teensy, then the Teensy, then the rest of the switches! I thought I was getting some work done ahead of time while I was waiting for my Teensy to arrive in the mail, only to realize how dumb I was and have to desolder a bunch of switches. PJE even mentions this somewhere in the thread, but it's hard to find single posts in a thread heh. Might be worth moving instructions to your initial post. :)

The second occassion was me not looking at the silkscreen properly to notice that you need to use a few pins that are not provided when you buy a Teensy with standard header pins included. There's three extra pins you'll need to add!

And one thing for you to perhaps edit in your posts PJE: when I was looking through the thread to try to correct my mistakes, I looked at your first silkscreen layout for a while puzzled why my multimeter didn't seem to correspond with what I saw only to see a second, and then your final silkscreen layouts a little further down. It would probably be a good idea to edit your posts and remove the old silkscreens so others don't make the same silly mistake I did. Though that's impatience and poor reading on my part. I was too excited about all this! :)

Also, I think in one of the source files you provided me one of the buttons wasn't outputting anything when used as a single press, which led me to believe that that button wasn't working at first (it was the escape key at the top left). I just quickly mapped every single button to the letter Q though and they all worked.

Anyways, all my troubles were my own mistake, not yours. Going to start working on a custom chording layout for myself now and hopefully I'll be able to use it to write a post in a few days!

User avatar
PJE

17 Jan 2014, 16:28

Excellent News!

I have been a little busy recently as I have over 1,000 industrial systems that I designed and programmed being built into the new Aluminum Ford F-150 production line, so I haven't had chance to work on the OneHand as much as I would like...

I'm still waiting for the MX Reds and MX Browns I ordered through Geekhack to arrive, they were due last November, but I'm still waiting. Once they arrive I plan on doing a fully documented build of my second and third units so I'll have OneHand with each of the primary switch types.

The software is progressing - I found the chords to switch the layers on V0.7 had been omitted, and once they were added back things started working better! The main issue I'm working on at the moment is how to handle a space at the end of a word. At present you need to release all previous keys and press space. I'd like to be able to press the space while holding the last key down to enhance typing speed.

Hopefully I'll get time this weekend to do some more (non work related) coding.

User avatar
Muirium
µ

17 Jan 2014, 16:45

Great stuff. Once I'm back out the woods, I'll get my PCB soldered up with the plate mount blacks I have spare. Perhaps they'll do the trick if I'm lucky. Mohitgarg is making me a case (eventually; we all get busy) which has an acrylic plate, I think. Likely the same design he's making for you. Should I solder first or wait, you think?

User avatar
PJE

17 Jan 2014, 19:10

I'd wait until you have everything in hand. It took me less than an hour to build it. Hopefully my switches will arrive and I can do the documented assembly instructions.

User avatar
oneproduct

23 Jan 2014, 04:41

Hey there, I've been meaning to reply for the longest time, but I can't post while at work due to security restrictions they have set up there.

Anyways, regarding your latest post concerning layouts, my only concern is that you are starting to mimic the Matias half-keyboard: http://www.matias.ca/halfkeyboard/index.php?refID=7

However, to do a half-keyboard you need a 3 row by 5 column grid, whereas your OneHand is two keys short of that. It's more like (3x5 - 2) + 3 on another row which is a bit too low to use quickly.

This is not to say that the OneHand doesn't have its advantages being programmable and smaller, it's more to recommend that if you are going to do another revision, it may be worth considering changing the physical layout slightly so that chording isn't required at all.

I'm still mostly treating the one I've built as a 5 button keyboard and am just using "pure" chording for it, even though it's certainly slower. I mostly just have a personal interest in chording and would someday like to make an even smaller chording keyboard that actually only has 5 keys. I do however really enjoy how the OneHand can be used as a numpad and am likely going to get labelled keycaps on it to reflect that and the "typing mode" with chording will just have to be from memory since you can't really label keys with chording combinations.

Anyways, I'm having a lot of fun with it, and I thank you for the work you've done on it. I do really need to figure something out for a case though... It's a shame I gave all my LEGO blocks to one of my young cousins a few years ago otherwise I'd have built something out of those.

I was also curious, not being any good with designing PCBs, if it were possible to make a left handed layout (as opposide to ambidextrous) but in a way such that if you flip the PCB, you could assemble it as a right handed layout instead. That is to say the PCB would not be symmetrical, but made to favor a certain hand, and you could decide which hand you want it for just by flipping it over and constructing it a certain way.

User avatar
Muirium
µ

23 Jan 2014, 09:19

The left and right handed ErgoDox does indeed use that very trick already:
Image
http://deskthority.net/post143634.html#p143634
With the side effect that Matias / Alps switches are pin compatible with symmetric MX mounts!

Matias' symmetrical keyboard is so simple and smart I must try making my own version sometime. But its core trick – using space as both an alpha key (to press space) and a mod (to access the mirrored layer) – is beyond my current abilities.

User avatar
fifted

23 Jan 2014, 15:46

Muirium wrote:Matias' symmetrical keyboard is so simple and smart I must try making my own version sometime. But its core trick – using space as both an alpha key (to press space) and a mod (to access the mirrored layer) – is beyond my current abilities.
Hasu's TMK firmware already has support for this with the ACTION_MODS_TAP_KEY macro; I've used it to try the half keyboard thing on my Ergodox but was unconvinced of its awesomeness.

User avatar
Muirium
µ

23 Jan 2014, 18:09

Yeah, it's far from impossible. Just beyond my comfort zone: Soarer's Controller. Anything I have to build from source, well, I don't. Typically. It doesn't take many variables for me to cook up a right old mess!

How do you find the tap key implementation? Is it at all awkward, in the general sense? Matias' flipped keyboard is a separate question!

Post Reply

Return to “Workshop”