[WIP] OneHand - 20% Keyboard

kile

09 Apr 2014, 13:21

Look what Santa just brought! :D
onehand wireless PCBs
onehand wireless PCBs
oh_pcb.jpg (543.88 KiB) Viewed 7058 times
I didn't expect these for another 10 days at least. By a stroke of luck, the family is out of town for the weekend, so I will have two whole days to play with my precious creation.

I pledged for one of these https://www.kickstarter.com/projects/ee ... nt-adapter and I'm still waiting for it - it should arrive any day now. That thing will help a lot with tweaking the current consumption and prolonging battery life.

User avatar
Medowy

09 Apr 2014, 13:42

This is really interesting thread. Keep up the good work guys! Can't wait to see the final product.

User avatar
PJE

09 Apr 2014, 23:07

kile wrote:Look what Santa just brought! :D
Looking good!

I'm excited to see how the wireless system works out. I decided against wireless, and LEDs for V2 of my design. I'm thinking of a V3 with embedded CPU as it would give me an excuse to buy a reflow oven :)

kile

10 Apr 2014, 23:59

And it's working! :) I made "only" one mistake on the PCB design - I reversed the LED USB plug. It should actually be soldered to the top of the PCB to work properly, but I wanted it on the bottom. No biggie, since I only use the LEDs for laughs anyway. I soldered a JST connector to power the LEDs from an external battery just to see what it looks like with all the LEDs on.

So, everything works - the matrix, the UART debug output and the most important thing - the radio. But, nothing works as it should :) I am not putting the MCU into sleep mode at all yet, so it draws a lot of power. Which is why I didn't solder the CR2032 battery connector yet. I am powering the circuit from the programmer connector and reading the matrix in an infinite loop, just like you would on a wired keyboard. I'll work on this during the weekend.

Most of the caps are leftovers from the max keyboards translucent set I bought for my beloved 7G. The rest I took from my old 6Gs. I'll probably get a full blank set for this board from WASD or some other place. Any suggestions?
Spoiler:
PCB with blacks
PCB with blacks
20140410_231519.jpg (446.42 KiB) Viewed 7002 times
Spoiler:
board bottom
board bottom
IMG_2271.jpg (332.41 KiB) Viewed 7002 times
Spoiler:
board connected to the programmer and the battery which powers the LEDs
board connected to the programmer and the battery which powers the LEDs
IMG_2266.jpg (335.55 KiB) Viewed 7002 times
Spoiler:
vegas mode
vegas mode
IMG_2264.jpg (169.21 KiB) Viewed 7002 times
If anyone likes adventure, I can send PCBs and help people with the assembly and programming. You will need a dedicated MCU programmer, though, because these chips do not have bootloaders which is probably their biggest drawback.

User avatar
Muirium
µ

11 Apr 2014, 00:13

Very cool! Well done on crossing the first hurdle. Now it's just on to the hard power saving stuff…

I'd be hella interested in one of these guys come the time your software can be preloaded. The Teensy loader app is just about as close to silicon as I comprehend!

User avatar
scottc

11 Apr 2014, 00:15

I am quite partial to adventure, but don't have a dedicated programmer or a very steady solder-hand and it seems like quite a scary thing to do. :D

You can get keycaps from SP from here: http://keycapsdirect.com

User avatar
PJE

11 Apr 2014, 01:38

kile wrote:If anyone likes adventure, I can send PCBs and help people with the assembly and programming. You will need a dedicated MCU programmer, though, because these chips do not have bootloaders which is probably their biggest drawback.
Congratulations on your progress. I'd love to give your version a try.

I'm just about to pull the trigger on a SMD rework station to help build my future keyboards. I may even pause V2 and add the option to go bare metal... The Pro Micro is a bit of a mess when it comes to wide I/O ports - you have lots of single pin ports.

What is the power draw for all those LEDs?

kile

11 Apr 2014, 10:26

I didn't mention this, but I will sell a few of the programmers for these chips. They will be about $15 assembled, cleaned and programmed (yeah, the programmer needs programming too). And that's a special DT community price. :D I'll offer these later on ebay for $20 at least. And the same programmer is used for the dongle as well, because that one needs programming too.
Muirium wrote:I'd be hella interested in one of these guys come the time your software can be preloaded. The Teensy loader app is just about as close to silicon as I comprehend!
Sure, no problem, but that way you will not be able to change layouts or upload bugfixes. Of course, I can burn a fixed layout, send it, and hope for the best. :)

And the programmer PC side software is command line but not really complicated:

Code: Select all

nrfburn -f 16 -w myKbd.hex
That's not hard, is it? :)
scottc wrote:I am quite partial to adventure, but don't have a dedicated programmer or a very steady solder-hand and it seems like quite a scary thing to do. :D

You can get keycaps from SP from here: http://keycapsdirect.com
My almost 8 year old daughter soldered the LED current limiting resistors. And she did it quite well, too. If she can do it, you should be able to do it too. ;)

Thanks for the link!
PJE wrote:I'm just about to pull the trigger on a SMD rework station to help build my future keyboards. I may even pause V2 and add the option to go bare metal... The Pro Micro is a bit of a mess when it comes to wide I/O ports - you have lots of single pin ports.
Why do you need a rework station? Unless you need a good excuse to buy yourself some tools (I'm all for that), a temperature controlled soldering iron will do just fine. Have you tried to solder TQFN44 or 0805 SMD? It's really easy. Even 0603 is doable but a little frustrating. I did TQFP100 (ATmega2560) which has a 0.5mm pitch and it wasn't as hard as it looks. It looks really scary until you actually try it. Now, desoldering is, of course, a whole different story - you need a hot air station for that.

And I'm really all for bare metal. I love designing these simple digital circuits and soldering, for me that's probably the most fun part of this hobby.
PJE wrote:What is the power draw for all those LEDs?
Well, the battery was around 8V, the resistors are 1K each, the drop of the LED is around 3.1V, so that means about 5mA/LED.

One LED (the one on SW1:3) is connected to a pin of the MCU. I will use this for signaling stuff from the firmware. That one has a 27ohm resistor. It was the lowest resistance I had, and I used that because the voltage of the blue LED is 3.1V which is too close to the voltage I power the circuit from. So it doesn't really need current limiting. I might just put a jumper wire instead of the resistor, and forget about current limiting all together. That's what I have in my 7G at the moment.

nano

11 Apr 2014, 11:34

kile wrote:I didn't mention this, but I will sell a few of the programmers for these chips. They will be about $15 assembled, cleaned and programmed (yeah, the programmer needs programming too). And that's a special DT community price. :D I'll offer these later on ebay for $20 at least. And the same programmer is used for the dongle as well, because that one needs programming too.
I love your project and I’m very interested in building something similar. It’s awesome to see you selling programmers at that price soon.

User avatar
Muirium
µ

11 Apr 2014, 11:38

Wonder how much a "starter pack" would cost of all the appropriate bits (besides caps, stabs, LEDs and switches) as bundling saves on international postage…

User avatar
PJE

11 Apr 2014, 14:58

kile wrote:
PJE wrote:I'm just about to pull the trigger on a SMD rework station to help build my future keyboards. I may even pause V2 and add the option to go bare metal... The Pro Micro is a bit of a mess when it comes to wide I/O ports - you have lots of single pin ports.
Why do you need a rework station? Unless you need a good excuse to buy yourself some tools (I'm all for that), a temperature controlled soldering iron will do just fine. Have you tried to solder TQFN44 or 0805 SMD? It's really easy. Even 0603 is doable but a little frustrating. I did TQFP100 (ATmega2560) which has a 0.5mm pitch and it wasn't as hard as it looks. It looks really scary until you actually try it. Now, desoldering is, of course, a whole different story - you need a hot air station for that.

And I'm really all for bare metal. I love designing these simple digital circuits and soldering, for me that's probably the most fun part of this hobby.
As with anything, projects are the easiest way to justify buying tools you don't really need... :)

Some of the surface mount crystals and smaller CPU packages are difficult to hand solder. Also, my old temperature controlled iron bit the dust so I'm looking at the $65 dual hot air and iron combo units.

I'm still optimizing the V2, and may leave the chip for V3, or the central PCB. I find hand routing PCBs to be very relaxing - as long as I can fit in the tracks...

As I bring the matrix out of my PCB on a header, it may be possible to make a wireless controller board which interfaces with my V2 PCB. In that way a Teensy, ProMicro, wireless interface or other custom circuit could be added without needing to disturb the keyboard matrix. The switches, caps, etc can get expensive if you need to make dedicated boards!

kile

12 Apr 2014, 12:08

Muirium wrote:Wonder how much a "starter pack" would cost of all the appropriate bits (besides caps, stabs, LEDs and switches) as bundling saves on international postage…
Ok, the starter kit (prices in EUR):

Code: Select all

nRFBurn programmer (special DT community price)                          11.00
OneHand Wireless PCB                                                      3.00
LED powering USB connector                                                1.00
transistor, capacitors, CR2032 holder, 0.05" pin headers, diodes          2.00
controller programming cable with reverse-proof connector                 2.00
small USB dongle programming cable-from-hell (optional - see below)      15.00
nRF24LE1 controller (only if you want me to solder it too)                5.00

soldering: the controller, transistor, capacitors,
one switch (SW1:3) with the LED socket, battery holder,
programming connector, USB LED connector and diodes.
You need to solder the switches, LEDs and current limiting resistor      10.00

fully assembled and tested unit                                           TBA
The reverse-proof programming connector is only reverse-proof on the controller side, and the programmer side has a sticker with names of the pins which helps plugging it in correctly. I will post pictures of these in a few days because I don't have these connectors yet.

You will also need the controller module (nRF24LE1), and a USB dongle (nRF24LU1+), and you can get these on ebay. I don't want to include these because I don't have enough of them and you can't really save in shipping. I have three extra nRF24LE1 controllers which I can sell but only if you want me to solder it in too.

Controller: http://www.ebay.com/itm/NRF24LE1-NRF24L ... fresh=true

The USB dongle comes in three variants. The first one is the cheapest ($10 shipped) and smallest (link). But there's a catch - it needs a programming cable which is a total bitch to make. To make it properly, you would need a crimping tool which I don't have and they are ridiculously expensive. So I have to improvise - I made these with some small pliers. I timed myself last night and it took an hour of frustration, swearing and sweating. Assembling the programmer takes less time and is a walk in the park compared to this. Which is why it costs as much as it does. The parts for the this cable are cheap (less than 1 EUR) and I will send them if you want to try your luck and assemble it yourself. But I don't recommend that.

The second dongle option is $20 shipped (link), it's larger and has a tiny red LED on it which the firmware running on the dongle can use. Currently my firmware makes the LED blink when it receives data from the controller. It does not need a programming cable because it can be plugged directly into the programmer if you solder a header on it. The header will be included in the package.

Size comparison:
Spoiler:
USB dongles size comparison
USB dongles size comparison
nRF24LU1p.jpg (416.4 KiB) Viewed 6941 times
Dongle 2 with the programmer and the cable from hell:
Spoiler:
dongle 2 and pain-in-the-ass programming cable
dongle 2 and pain-in-the-ass programming cable
20140412_100807.jpg (283.57 KiB) Viewed 6941 times
Dongle 2 plugged in:
Spoiler:
dongle 2 plugged in the programmer
dongle 2 plugged in the programmer
20140412_110410.jpg (260.7 KiB) Viewed 6941 times
The third option is sold by SparkFun here. It's $36 + shipping and you need a 2.4GHz duck antenna for it as well which is not included. It can also be directly plugged into the programmer. This is the best option if you want to develop firmware. It has two extra pins which are brought out to the connector and further connected to two LEDs on the programmer, so you can turn them on or off from the dongle. Very useful for debugging! These are marked DBG1 and DBG2 on the connectors and the programmer PCB.

SparkFun dongle:
Spoiler:
SparkFun dongle with antenna
SparkFun dongle with antenna
20140412_110220.jpg (252.37 KiB) Viewed 6941 times
I can also do soldering and testing, but that will cost extra, say 10 EUR. I would solder the programming connector, capacitors, the transistor, battery holder, the controller and one switch. That one switch is necessary because the controller covers the SW1:3 switch, so I have to solder the switch and then the controller. I will put a LED socket inside the switch so that you can plug whichever 3mm led you want.

I can also order switches from 7bit and assemble and test everything (LEDs and the resistors too), but I have to figure out how much that would cost.

Of course, I will only start accepting orders once the controller firmware works properly.

I hope I didn't forget something....

User avatar
Muirium
µ

12 Apr 2014, 13:35

The depth of your reply shows how much you've been thinking about this! Don't worry, I'm not in a hurry. Caps GBs have conspired to drain all my keyboarding coin for the moment. But I think you're both onto something great, and I'll be back!

User avatar
PJE

13 Apr 2014, 19:28

I've been playing with my V2 layout, and have come to the conclusion that it's good enough! The PCB allows a ProMicro to be mounted on the rear in the same way as before, but a second PCB without the CPU can be linked for a TwoHand layout. Also I've included two I2C connectors to allow daisy chaining of the boards with CPUs, and finally I've added the PS/2 interface, which uses the serial TX/RX pins for added flexibility.

Before I pulled the trigger on the PCBs I did a basic test on the PS/2 touchpad interface, using a cheap ($3) surplus Synaptics touchpad from a laptop wired to the TX, RX, 5V & 0V pins of the $5 ProMicro.
PS2_Touchpad.jpg
PS2_Touchpad.jpg (69.3 KiB) Viewed 6851 times
I've used the various PS/2 Arduino resources on the web to write an interrupt driven touchpad interface. It generates x and y positions as well as the virtual button press signals from the PS/2 stream. Using the interrupt driver for the receive should allow it to run in the background without interfering with the keyboard scanning too much. I now have to decide how I'm going to use the pad - mouse replacement, or cursor control... For some reason the side scroll bar is not working - probably a configuration issue, but I'll keep working on it!

Now that I'm reasonably happy with the next iteration I'll probably be ordering the PCBs this week.

Harrowed

14 Apr 2014, 16:22

Really neat design and can't wait for starter kit. I like the the concept of plain one hand OneHand more because I don't think that the two handed version could compete with other keyboards except as lightweight travel board. I would just use OneHand with mouse for quick typing actions and on the fly switch to full keyboard or Ergodox when more typing is needed.

kile

15 Apr 2014, 20:07

PJE wrote:As with anything, projects are the easiest way to justify buying tools you don't really need... :)

Some of the surface mount crystals and smaller CPU packages are difficult to hand solder. Also, my old temperature controlled iron bit the dust so I'm looking at the $65 dual hot air and iron combo units.
I completely understand that :) I bought an oscilloscope two months ago for a project I've since abandoned :oops: But, damn, these things are niiice :D For three years I've been looking at my circuits through a logic analyzer, and now a whole new world opened in front of me :mrgreen:

And I would like a hot air station too. I want to salvage perfectly usable SMD chips from prototype boards I don't need any more. But I don't have nearly as many chips trapped in prototype boards to justify the price of a good enough hot air station. Maybe some day...

The firmware for the OneHand Wireless has changed a lot. I've added most of the things from my 7G wireless project: the menu system, a clock which shows the time since power-on, RF packet statistics and battery voltage monitoring. Actually, it's not really monitoring, but it shows the current voltage of the power supply in the menu. So, for instance pressing Func+Esc (if those are bound to a key) will send this to the host PC:

Code: Select all

OneHand wireless
firmware build Apr 15 2014  19:23:50
battery voltage: 2.76V
RF packet stats (total/retransmit/lost): 213/39/0
keyboard's been on for 34 minutes 44 seconds
So, depending on the type of battery you have, you can guesstimate how much power you still have in them.

The menu is not really a menu yet, because there are no options to select, but that will change. For instance, it can be used to switch layouts.

The clock has a 2 second resolution. It's not terribly accurate (about 1%), but it's more than good enough.

And I've added sleep modes as I've planned. I still don't know if they work as I want them to, because just like with the 7G I can not directly measure the power consumption of the circuit. I just put the MCU to the required sleep mode, and the thing wakes up after the given sleep period. I really can't wait to get my hands on the uCurrent. That will change things a lot and make everything easier and more accurate in estimating battery life.

I've had a change of plans about the case. It'll still be wood, but CNC carved :D I just hope these things are not too expensive. How much of a problem is it to cut both the top and the bottom side of the case?

User avatar
PJE

23 Apr 2014, 14:48

I've been busy at work, so I've not managed to order the V2 PCBs, which might be a good thing...

While checking on the price of the ProMicro on eBay I came to the realization that PJRC sells the Teensy CPU for a similar amount, so I've decided to jump V2 over to an embedded CPU rather than a CPU module.

This has the benefit of making more pins available for other functions as well as allowing wider ports for the keyboard matrix - I'm hoping to use an 8-bit port and a 5-bit port for the rows and columns rather than using multiple ports and pulling the bits together.

I have the basic schematic for the change, I just need to find space on the best place on the PCB to drop the CPU and USB connector.

The main advantage of the on-board CPU is that the switches can be removed at any time without the CPU module blocking some of the central units, making plate mount easier.

Any thoughts?

I'm looking to

User avatar
Muirium
µ

23 Apr 2014, 15:08

We're going surface mount with these PCBs as they advance. That has significant upsides like you mentioned, and Kile's making great use of this potential, too. The only problem is that surface mount soldering is not for the faint hearted. We're moving into pre-assembled kit territory. Which is fine, if you're up for it!

User avatar
PJE

24 Apr 2014, 00:34

Muirium wrote:We're going surface mount with these PCBs as they advance. That has significant upsides like you mentioned, and Kile's making great use of this potential, too. The only problem is that surface mount soldering is not for the faint hearted. We're moving into pre-assembled kit territory. Which is fine, if you're up for it!
I'm normally pretty good at hand soldering SMD as long as I choose the larger packages.

I will probably look at providing units with everything installed bar the switches. I have to see how costly it will be, I'm expecting a parts cost of $15 per unit, and I could only afford to give out a few units - maybe a bartering system using MX switches as currency...

I may also look at Seeedstudio's PCB assembly service for small batches.

Now back to porting a 25,000 line industrial application over to a new graphics platform!

kile

24 Apr 2014, 11:53

PJE wrote:Now back to porting a 25,000 line industrial application over to a new graphics platform!
Do you use the OneHand for typing code at work? If you do, how long did it take you to get used to it?
I'm thinking about making a smaller board (TKL or less) with a custom layout and try to actually do my work on it. The problem is that I'm a creature of habit and I fear that the transition from a full sized layout is going to be long and painful and maybe not worth it.

User avatar
PJE

24 Apr 2014, 12:36

kile wrote:
PJE wrote:Now back to porting a 25,000 line industrial application over to a new graphics platform!
Do you use the OneHand for typing code at work? If you do, how long did it take you to get used to it?
I'm thinking about making a smaller board (TKL or less) with a custom layout and try to actually do my work on it. The problem is that I'm a creature of habit and I fear that the transition from a full sized layout is going to be long and painful and maybe not worth it.
I use a 60% keyboard at work, but have been using a laptop at home.

The OneHand is an interesting keyboard for certain applications, but the TwoHand could be a daily driver. The issue with coding on it is the placement of the numbers, symbols and cursor movement keys as they are much more important than normal. I'm still optimizing the position of these keys.

I'm currently working days, nights and weekends on my day job which is reducing my free time...

kile

01 May 2014, 11:48

I had a prototype case made. I'm really happy with how it turned out. It's MDF and not real wood, but it's good enough for a prototype. I messed up a few spots for about 1mm, but overall - YESSSS!!! :D
view 1
view 1
IMG_2347.jpg (269.13 KiB) Viewed 6722 times
bottom view
bottom view
IMG_2350.jpg (313.43 KiB) Viewed 6722 times
front view
front view
IMG_2349.jpg (275.85 KiB) Viewed 6722 times
top view
top view
IMG_2348.jpg (302.72 KiB) Viewed 6722 times

User avatar
Muirium
µ

01 May 2014, 13:04

Rather smart. But you're going to want to so something about those loose wires, Mr. 2.4 GHz!

User avatar
matt3o
-[°_°]-

01 May 2014, 13:08

I just wanted to chime in to say that I'm enviously following this thread and you gave me some very interesting ideas for my future builds.

kile

01 May 2014, 14:28

Muirium wrote:Rather smart. But you're going to want to so something about those loose wires, Mr. 2.4 GHz!
Yeah, I know. A wireless keyboard with wires sticking out of it :roll:

Anyway:
look ma, no wires!
look ma, no wires!
IMG_2357.jpg (236.98 KiB) Viewed 6701 times
look ma, no wires! (part II)
look ma, no wires! (part II)
IMG_2359.jpg (308.99 KiB) Viewed 6701 times
Happy now? :D

The white/blue wire will have to stay. That's the LED power cable, and I don't want to remove it yet.
And the serial debug connection has been replaced with a pin header, so I can now plug it in/out as required.
matt3o wrote:I just wanted to chime in to say that I'm enviously following this thread and you gave me some very interesting ideas for my future builds.
Well, thank you from my part. But as I said before, this is really not as complicated or hard as it may look. And I am more than happy to share any and all knowledge I might have on these things. All that's required is an honest will to learn. Coming up with projects that allow me to learn about electronics is my main motivation for doing this. I don't really need this keyboard that much, you know :)

User avatar
Muirium
µ

01 May 2014, 14:33

kile wrote:Happy now?
That's better!

Now I wonder if, with a little creative battery relocation, I could fit your PCB into Mohitgarg's case

Hmm, probably needs too much saw!

User avatar
PJE

02 May 2014, 02:05

Hi kile,

Excellent work! Your keyboard is coming along very quickly. How's the wireless data transmission working out? Any data on battery life yet?

I'm still swamped at work, so I've had to pause the V2 work for a week or so. Hopefully I can get back to it this weekend.

Keep up the good work.

kile

02 May 2014, 19:16

PJE wrote:How's the wireless data transmission working out? Any data on battery life yet?
Wireless transmission's been working good for a while. I don't do frequency hopping or anything fancy like that. I just set it to a channel away from the WiFi range, and it seems to work just fine.

I still didn't receive the uCurrent, so I can't measure the current draw. But I've had an almost drained CR2016 in it (it's already been almost drained when I put it in) for a few days, and it's been working fine. The current voltage hovers around 2.4V, so it should die any minute now.

kile

11 May 2014, 19:01

I've received the μCurrent and did the power optimizations I planned to do. So, now the MCU really draws about 4μA in sleep mode just like the datasheet claims. (technically, this sleep mode is called Register retention mode in the datasheet), I'm glad I actually waited for the μCurrent. When I first measured the sleep current it was around 45μA, and it turned out that I configured something incorrectly, so we're Ok now.

Still to do:

- some kind of intelligent handling of the one LED that the MCU can control
- layers

User avatar
Muirium
µ

11 May 2014, 19:27

Sweet. When are you triggering sleep mode? How much of a delay after typing? And how long does wake up take?

Post Reply

Return to “Workshop”