Like many programmers, [Daniel Nugent] loves his old mechanical keyboard (a WASD Code Keyboard). What he didn’t love was the cord. Sure, you can get a modern wireless keyboard, but it won’t be the same as the keyboard you’ve spent so much time with. Armed with a Bluetooth Low Energy (BLE) module, a rechargeable battery and some coding, he kept his keyboard but got rid of the wires.
Although he has some specific handling for the WASD, the code would very likely handle any PS/2 keyboard. The PS/2 interface is a simple synchronous serial port with a single clock and single data line. Handling it with a microcontroller isn’t very difficult.
You might like a refresher on how the PS/2 communicates. Or, perhaps you’d rather just build the whole keyboard. We’ve even seen people who really went old school on mechanical keyboards. For us, though, a hack like this on an IBM model M would be good enough.
If you want an overview of Bluetooth vs BLE, checkout this post and see the video below.
This is probably the best case scenario for inductive charging. The keyboard will spend 60% of its life in rest state and some in working state in a well defined area of the desk and make some excursions. Nice large items to hidden charge loops in, and never forget to plug it up and be dead in the water. Also it will give you some more excuses about workstation ocd. “Are you sighting the side of your keyboard to line up with your monitor? Yes it gets the most charge effciency that way.”
Can’t help but think of Flash, the StarCraft player. He measures the placement of his keyboard with a ruler before every match.
I’ve done Qi charging DIYs before. what you could do is to embed 2 or 3 coil units in the keyboard and diode parallel them since they are really just 5v power sources. build a base for the keyboard and align some 3 coil senders in there (amazon and ebay have diy coil kits if you don’t want to break open an existing qi base). then, stagger the alignment so that if you are off center a bit, one coil combo will engage and if you shift a bit the other way, another combo will engage. a little pricey but at least you get to be sure that you won’t be unaligned on the charger sweet spots.
I guess an even easier method is simply have a base that fits the keyboard in a way that some plastic bit aligns with some other bit. then you’d only need the single qi pair of coils.
btw, you can buy qi coil kits very cheaply:
http://ecx.images-amazon.com/images/I/61StKxVF2fL._SL1200_.jpg
not hard to open it and find the red/black wires. its JUST that simple, folks! it gives you 5v out and you can wire that to any lipo charger circuit that would take 5v from usb. consider a power mux chip if you want safety to plug in usb cables as well as the qi charger card.
I hacked one of those cards for an arduino remote control I built and I can get away with using a fairly small lipoly battery since the remote sits in the qi cradle when its not in use.
note that qi cards do get warm so make sure there is ventillation (holes, at least) if you embed a qi card in your project.
I have looked into wireless charging. That will probably be an upgrade. I really want to embed a charging coil into my desk but I don’t think my company will allow it.
MX Blues… I’m gonna put my hands around one of these some day…
Get a keyboard with gateron blues- much, much cheaper than cherry, and just as good if not better. The v60 can be found for about ~80$ on sale.
But that’s not cheaper than a Quickfire Rapid.
Superb. Been meaning to do one of these for years…
Thanks! Now it should only take a weekend if you use my code!
My plan was (is…) to do it all on the BLE chip itself, using a CSR1010, which should improve battery life to the point where a CR2032 or a pair of AAAs should be more than sufficient. PS/2 decode could probably even be done on the 8051 in the CSR1010 without bothering the main processor.
Just wondering…
You know many keyboards do dual PS/2 and USB, with an “adaptor” included in the box? Almost certainly the adaptor doesn’t do much, just redirects some pins, and the keyboard chip itself decides whether to spit PS/2 or USB down the line.
Question is, how do you make an adaptor like that? Is there a resistor value, or just redirect some pins? Like maybe +5V comes in one one line for USB mode, and another for PS/2? In fact you could reverse the voltage, and use a bridge in the keyboard to cope with that, and be able to tell from the polarity which plug was connected. That’d still leave 2 pins spare for USB or PS/2 data and clock.
Then again that’d require spending 10p on a diode bridge. Any idea how it’s done? A bit of messing with a multimeter and an adaptor might be instructive. I ask because obviously interfacing to PS/2 is a lot easier, and it’s probable keyboards will still support it for the next few years. Could be handy for people to know.
PS/2 signals are open collector/drain has pull up resistor on the pins while USB has 15K pull down resistors. I would assume that the firmware decide whether that same two pins becomes PS/2 or USB pins by looking at the voltage on them.
http://www.instructables.com/id/USB-to-PS2-convertor/?ALLSTEPS
Oh okay so I’ve answered my own question. Turns out the power is wired as usual, and the USB data pins are wired to PS/2 data / clock. The keyboard’s brain must just listen for the right packets to decide what language to speak. Easy enough! So it seems a USB keyboard will speak PS/2 pretty easily!
It doesn’t even need to listen to the packets. Just read the voltage at power up. If the pins are L, then it is USB and if they are both high, then PS/2.
did the guy actually parallel lipoly batteries? you don’t do that, mate! I know you bought them from adafruit; did you not read the warnings about how this is a bad idea?
Not only that, but solder the wires directly. There are pretty little margins for screw ups.
No these aren’t adafruit batteries, just some randoms I have laying around. I have plenty to spare. I see no issue with lipos in parallel. In series I see some issues…..
I have boxes of old Wyse keyboards with Cherry MX switches and I just loved them. I was going to build an adapter for them but never did. This would be a perfect solution!