Bongofish
November 23, 2014, 08:36:13 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You may have to login twice the first time,  but we don't know why - Erm i mean it's a security thing yeah that's it - security.
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: TabletPC Quickkeys  (Read 12937 times)
tpope
Jr. Member
**
Posts: 43


View Profile
« on: February 07, 2011, 12:59:00 AM »

This is my second build log that's not actually a Cintiq, but I figured it was probably relevant enough that it was worth posting.  As before, if my assumption is mistaken, the moderators should feel free to delete this thread.

My actual DIY Cintiq project remains on hold due to lack of a tablet that works, and my budget is tight enough that it's likely to remain that way for a long time.  However, I had an epiphany Friday night, and spent a slightly feverish (quite literally feverish, some bug is going around work) weekend working on a completely new project.

One of the reasons I wanted a Cintiq is that while I love my Tablet PC (Motion Computing LE1700 slate) for sketching and other concept work, it's very frustrating working in Illustrator or Photoshop, given how much those two applications rely on a handful of key commands.  I've already set my second button on the stylus to Shift, which helps a bit, but I really need Alt, Control and the Space bar as well to really cover all of the keys I use regularly.

What just occurred to me is that maybe I could hack up an old USB keyboard in order to add that functionality to my tablet in a portable enough package that I could still use it without having to sit at a desk.  ~48 hours later and I have a working, if not actually USEFUL prototype, a lot of new ideas and lessons learned.  

I'm going to make a few more posts going through the process, just to keep the images nicely organized.  
« Last Edit: February 17, 2011, 10:30:03 PM by tpope » Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #1 on: February 07, 2011, 01:05:19 AM »

Step 1: Disassembly

I started with an old Dell USB keyboard that came with my computer.  I'd torn keyboards apart before, but it's been a while, and I hadn't really thought about how they were wired.

Under the outer shell and keycaps (not shown, it's a keyboard) is a rubber membrane with a bunch of nubs, one for each key.  This is what provides both the spring that returns the keys to position after typing as well as the plunger that makes the connection when one is pressed.  

Under that is where the actual connections happen.  There are three pieces of plastic film.  The top and bottom piece have a nest of leads running from keys to the inputs (2x13) on the PCB.  Every key leads to two inputs, one connected to the top layer and one connected to the bottom.  The middle piece of film has holes cut out for each key, so when you press the two layers together, a connection is made between two inputs on the PCB.

Many of the keys hit the same inputs (which I suppose is obvious, given the number) and for whatever reason, there are fewer inputs from the top sheet than from the bottom.


* quickkeys-disassembly.jpg (132.49 KB, 800x613 - viewed 514 times.)
« Last Edit: February 07, 2011, 02:31:12 AM by tpope » Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #2 on: February 07, 2011, 01:14:19 AM »

Step 2: Tracing

The next step was tracing out all of the keys I wanted.  I used several different colored Sharpie markers to carefully follow the paths from the keys I wanted to the inputs on the PCB.  I also dismounted and remounted the PCB a few times, to test that I was getting the right keys.  The onscreen keyboard on my tablet was handy here as it lights up to show the keys you are pressing, even from an external keyboard.

Once I had all of the keys traced, I made a quick color coded sketch from a photo of the PCB.  Then I did one final test by plugging it in and using a piece of wire to short across the four pairs I had marked.  So far so good...

I don't know if the pinouts on keyboards are even vaguely standard or not.  For Mk2 I'm likely to find another Dell keyboard from work (we have dozens lying around) so maybe I'll get lucky.  But I won't know until I pull the next one apart and trace again.  


* quickkeys-tracing.jpg (79.04 KB, 800x358 - viewed 448 times.)
« Last Edit: February 07, 2011, 02:47:07 AM by tpope » Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #3 on: February 07, 2011, 01:41:00 AM »

Step 3: Wiring

I asked a friend of mine teach me how to solder (it's been years) and discussed the project a bit with him.  

There were two basic soldering steps.  One was to shorten the USB cable and one was to wire up the switches.

The USB cable of course was about 4 feet long, so I needed to shorten it considerably.  I also wanted to use the plug itself as a structural part of the connection to my tablet.  I briefly toyed with adding a second USB plug as a pass-through, both because the widget was going to cover the second USB port as well as for a second layer of support.

However, this was already complex enough so I settled with just cutting the original wire and using some epoxy to connect the plug to the PCB.  Then, some solder and shrink tubing for everything all wired together and working again.

The other learning exercise of the evening was desoldering and removing components from a PCB.  I had a few laptop motherboards that I'd pulled out dead machines, and one of them have seven nice little buttons surface mounted on the board. A bit of desoldering braid and some prying with a knife and I had them off the board.

The buttons had no less than 5 leads, which was a bit daunting.  But my friend helped me work through which was which.  One was a ground, which I just cut off, as I didn't really need it.  The other were paired across the button, so I just wired across diagonally, testing each step with a multimeter.

Along with the spare wires from the USB cable, a VGA cable gave its life for lots of different colored wire, enough for all seven buttons (extra just in case I managed to destroy any while wiring).  I wired them all up and tested again to make certain they all worked.  So far so good...


* quickkeys-wiring.jpg (153.36 KB, 800x617 - viewed 429 times.)
« Last Edit: February 07, 2011, 02:50:30 AM by tpope » Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #4 on: February 07, 2011, 02:30:01 AM »

Step 4: Final Assembly

The last bit of assembly was by far the most painful, and there's a lot I'll do differently next time.

I had the PCB finished, and four buttons epoxied onto a scrap piece of plexiglass sheet.  Now it was time to wire them up to the board.  My first few tries were a total failure.  The traces are under something that melts and doesn't stick at all to solder, though it's obviously conductive, as the film was pressed right against it.  The first few tries failed miserably, just melting the plastic coating everywhere and not sticking the wore at all.

So, I tried using a knife to scrape off the coating and then re-solder.  That worked better, though it was difficult bracing both boards and lining up the wires (I needed at least three more hands, and I only had clips to make up for two).  So that worked pretty well, with the exception that I realized I'd stripped the wire too far back and it was going to cross with the adjacent buttons.  This is where I made my first mistake.  Instead of desoldering the wire, I figured I could just pop it off with a knife.  It popped off just fine, and took most of the input lead with it right off the board!

That prompted a very frustrating half hour of carefully scraping up along the trace up from where the input was damaged and repeated failed attempts at soldering, I finally got it to stick.  The rest were comparatively easy, once I scraped the leads down to the bare metal and slowed down a bit.

Miraculously, this complete hack job worked!  None of the wires were crossed, nothing shorted, and all of the buttons work.  Not bad at all for my first real electronics project in 25 years!

Of course, while functional, the end result is still less than usable.  It's sturdy enough (surprisingly) but I miscalculated the lengths of the wires that I needed from the switches, and I can't put the switchplate over the PCB as I had planned.  Even worse the one wire that's the problem is the one that took all that time to solder, and has the most precarious connection.  I'm not at all certain I could get that one working again. So I'm calling this done as a proof of concept and will start again once I find another keyboard.

One thing I'm going to do differently in the second version is to solder the wires to the leads on the PCB (assuming they work the same way on the next keyboard) before soldering them to the switches.  That should prove to be a much easier wiring job, and allow allow me to thread them to the switches without as many problems, I hope.  I also need to leave myself a lot more wire, and/or pre-measure how far it's going to be from the farthest switch to the opposite input.  :-)

Of course, even once I do all of that, I'm only halfway there.  I still need to figure out how to button caps and a housing for all of this that's not much larger than the board.  And preferably something that can be disassembled for the inevitable repair job.  But overall I'm still pleased.  This one is theoretically usable, and it serves as a proof of concept.  If I can get the bugs worked out and find another few keyboards, I think I'll be able to build something that's actually functional for Mk2 (or Mk3 or 4...)


* quickkeys-finished.jpg (124.06 KB, 800x528 - viewed 452 times.)
« Last Edit: February 07, 2011, 02:58:51 AM by tpope » Logged
bernard
Administrator
Hero Member
*****
Posts: 2533


pato mania


View Profile
« Reply #5 on: February 07, 2011, 10:45:30 AM »

I like those projects!  Grin     Very cool! 

It might get moved to the another area (I'll let Drew decide that) but, for sure we won't delete this gem!  Smiley

- Welcome to DIY electronics! so much fun. Smiley
- Using the color wires from a VGA cable is a great idea!  As you already noted yourself, always leave yourself much more wires than you think you need, it is easy to stuff the wires inside the case, but quite impossible to stretch them.  Although if you need to do that, cut the wire in the middle and extend it where it is not too dangerous to break (w/shrink tubing). (or resolder to the switches if that turns out to be easy).  It is always a question of risk.
- I do not have a good sense of the "size" of your little board but having the four keys aligned this way, at that distance, does it work?  Was there supposed to have some sort of "cap" on top of the switches?  I mean, pressing/holding micro-switches in the middle of the action does not sound like fun/fast (or even pressing/holding multiple keys).  Do not underestimate the task of building up buttons yourself (if that was the plan). Anyway, now that you know the electronics can be done, I would try to find the switches you want and start planning on the casing right away.
- for scraping the PCB, you could use sanding paper to get to the metal (instead of a knife) -- althought an exacto knife is one of the most important (and unsuspected) tool for this type of project and if it works, let it be! Smiley
- If more than one wire goes to the same connection on the PCB, make sure you only solder it once on the PCB and do a junction somewhere else. In a place where it would be less "prone" to breakage I mean.
Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #6 on: February 07, 2011, 03:25:27 PM »

It might get moved to the another area (I'll let Drew decide that) but, for sure we won't delete this gem!  Smiley

Sounds good.  I realized last night that this does have application for a DIY Cintiq as well, since it's one way to add-on the function keys lacking on the Intuos2 and Intuos1 (and older) tablets that many of us are using.  Granted, it also eats up another USB port, but that may be worth it, and it's definitely something I'll consider once I get back to the real build.

Quote
- Using the color wires from a VGA cable is a great idea!  As you already noted yourself, always leave yourself much more wires than you think you need, it is easy to stuff the wires inside the case, but quite impossible to stretch them.  Although if you need to do that, cut the wire in the middle and extend it where it is not too dangerous to break (w/shrink tubing). (or resolder to the switches if that turns out to be easy).  It is always a question of risk.

I hadn't even considered cutting and splicing (still running a fever) until you mentioned it but in this case, I don't think there is any safe way to do that.  Odds are high that just the act of stripping the wires could pull them out of the joint, especially the problem wire with the dodgy connection.

But then again, I realized that this might work to my advantage after all.  I'm still going to start on Mk2 as soon as I get another keyboard, but I might be able to build up the housing to support the buttons resting on the tablet bezel, and that might actually be more comfortable to use.  The epoxy is drying right now on the spacers, but I'll post more updates on how that works.

Quote
- I do not have a good sense of the "size" of your little board but having the four keys aligned this way, at that distance, does it work?  Was there supposed to have some sort of "cap" on top of the switches?  I mean, pressing/holding micro-switches in the middle of the action does not sound like fun/fast (or even pressing/holding multiple keys).  Do not underestimate the task of building up buttons yourself (if that was the plan). Anyway, now that you know the electronics can be done, I would try to find the switches you want and start planning on the casing right away.

The board is roughly 4" long at a guess.  It's not terribly ergonomic, but I can use it as-is, other than the fact that I'm touching bare wires.  But the plan was always to cap off the micro-switches with wide flat buttons of some sort.  The challenge will be to do that without increasing the bulk significantly (especially on Mk1 where the buttons are riding up onto the bezel.

Oh, and electronically, multiple keys do work.  Ergonomically again, it's not great.  Mk2 might also rearrange which button goes where, which is another reason to try and get Mk1 working well enough that I can decide if that's necessary.  I could also, if I wanted, drop the Control key.  It's the least used of the set.

Quote
- for scraping the PCB, you could use sanding paper to get to the metal (instead of a knife) -- althought an exacto knife is one of the most important (and unsuspected) tool for this type of project and if it works, let it be! Smiley

I tried a file first actually.  While that worked, I decided I didn't want to risk damage to any of the other leads (or creating a short circuit, I really didn't know what the board was made of) so went back to just using the exacto on only the leads I cared about. 

Quote
- If more than one wire goes to the same connection on the PCB, make sure you only solder it once on the PCB and do a junction somewhere else. In a place where it would be less "prone" to breakage I mean.

Hmmm...  I hadn't considered that.  What I did in this case is to twist the two wires together, then solder them together, then solder the whole mess down to the board.  I also epoxied all the wires in place this morning while I was attaching the spacers for the top plate.  Next time I'll play around with different wiring ideas and really think it through before I start soldering anything down.  :-).

Thanks for all of the comments!
Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #7 on: February 08, 2011, 05:53:27 PM »

Just a quick update.  I added some standoffs cut from a ballpoint pen tube (continuing in the tradition of using only scavenged parts) and cut some acrylic pieces for the front and back.  This at least minimizes the bare wires and exposed circuitry.

With that in place, I've spent a little bit of time actually using the thing, and am so far rather pleased.  Obviously it needs real keycaps but I don't think I'm going to bother for Mk1.  Adding any kind of caps will make it a lot thicker on the bezel and probably even more unwieldy, so I doubt the tradeoff is worth it.

From the brief usage so far, I'm very happy with the near-random selection of button order.  In most use cases, I'll either be pressing one button or two adjacent buttons, and rarely need to press two non-adjacent buttons.  That said, even assuming nice key caps, the buttons are too far apart.  For Mk2, in addition to moving the buttons where they belong onto the main unit, I'm going to bring them closer together to take up maybe 2/3 of the length.

If that really works out, and I have as much extra space as I hope, I may add a "Control Z" button as well, assuming I can wire it successfully.  That's another feature Adobe never managed to put somewhere you can reach with one click. 

Anyway, I've attached a (crappy) photo to show the size of the full unit and the button bar.  ...and there I'm pretty much at a stopping point with Mk1. I'll continue to use it while I try to refine the concept for the Mk2.


* quickkeys-size.jpg (106.79 KB, 800x533 - viewed 455 times.)
Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #8 on: February 09, 2011, 05:38:39 AM »

Just started a new sketch of Mk2.  This is all assuming that I can find a similar or identical keyboard PCB on which to base the second version.  But if that ends up the case, I think I know how to build this.

I'm still not sure how to make the buttons, though I do know that whatever they are made of, I'm going to try gluing them all down to a single flexible sheet of plastic or rubber sandwiched between the outer case and the button board.  The backing should keep them in place, but hopefully remain flexible enough to avoid false presses.

As for the rest, it's the same sandwich arrangement as before, using standoffs and the USB plug itself as part of the superstructure.  I'm still likely to go with acrylic as the casing, simply because I have some lying around, and it's a decent combination of sturdy and easy to work.  I might even cut and file the individual buttons from acrylic as well. 


* quickkeys-mk2-sketch.jpg (91.13 KB, 900x661 - viewed 500 times.)
Logged
bernard
Administrator
Hero Member
*****
Posts: 2533


pato mania


View Profile
« Reply #9 on: February 09, 2011, 05:57:47 AM »

Cool stuff!!   Very nice sketch!  With the shading et al, what did you use to draw this?

Yeah, to me, the button mechanics would be the biggest risk closely followed by the casing stress. Can't you find & reuse existing keys (from whatever device) -- I know those "rubber" often found under a keyboard (like your Dell one) is not that nice to cut and solder, but maybe you can get lucky with a dead laptop keyboard instead?

I like the idea in one of your picture of the keys sitting right on top of the laptop case. The laptop case is solid. If the rest of the board could be put out of the way (at the back of the laptop for example with long wires) you could have something quite "small" and potentially more ergonomic??  Just a wild thought.
« Last Edit: February 09, 2011, 06:17:00 AM by bernard » Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #10 on: February 09, 2011, 03:29:14 PM »

Cool stuff!!   Very nice sketch!  With the shading et al, what did you use to draw this?

Thanks!  I used Autodesk Sketchbook Pro.  It's a fantastic sketchpad application that's perfectly designed for pen input.

Quote
Yeah, to me, the button mechanics would be the biggest risk closely followed by the casing stress. Can't you find & reuse existing keys (from whatever device) -- I know those "rubber" often found under a keyboard (like your Dell one) is not that nice to cut and solder, but maybe you can get lucky with a dead laptop keyboard instead?

Perhaps.  It's certainly one of the things I'm going to explore once I get back to the office.  There's a dead Thinkpad there that I can rip apart and see if the keys will do me any good.  Though in the end, that only saves me about half the work, as cutting the custom frontplate and fitting the keys so they won't fall off is still going to be an issue.

Quote
I like the idea in one of your picture of the keys sitting right on top of the laptop case. The laptop case is solid. If the rest of the board could be put out of the way (at the back of the laptop for example with long wires) you could have something quite "small" and potentially more ergonomic??  Just a wild thought.

Hmmm...  The problem with that is that it would involve at least one or maybe two attachment points, and I'm not really sure how to do that without something ugly like stick-on velcro patches.  Point number one of course is the button bar itself, and point number two is the controller, wherever that would live.  I can't put the controller where it is now because its proximity to the button bar is what makes that so hard to reach in Mk1.  So I'd have to have a USB cable running from port to controller and another cable running from controller to bar, and then attachments for both.  Probably too unwieldy.  But that said, I have no idea what I'm going to find in the next few keyboards I tear apart, and maybe one of them will have a radically different PCB that gives some options.
« Last Edit: February 09, 2011, 03:32:15 PM by tpope » Logged
bernard
Administrator
Hero Member
*****
Posts: 2533


pato mania


View Profile
« Reply #11 on: February 09, 2011, 05:41:59 PM »

Quote
I'd have to have a USB cable running from port to controller and another cable running from controller to bar, and then attachments for both
yeah that is what I had in mind.  Wild indeed.  I guess the way to fix this is to make the board the same thickness as the laptop? So it sits well on the table(?) Was that how the mk1 works with the little "pen posts" you created?
Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #12 on: February 09, 2011, 07:48:24 PM »

yeah that is what I had in mind.  Wild indeed.  I guess the way to fix this is to make the board the same thickness as the laptop? So it sits well on the table(?) Was that how the mk1 works with the little "pen posts" you created?

Not really.  The standoffs were just to hold on the backplate so that there wasn't exposed circuitry.  It happens to make the unit just about as thick as my tablet, but that's only a coincidence.

Note that the tablet I'm using is a slate-style, so it doesn't sit on the table when I'm using it, and the only keyboard it has I rarely bother to connect.  Usually I'm using my tablet I'm often on the bus or on the couch or lying in bed or somewhere not at my desk.  This is why I'm looking for a solution that has the minimum of attachments and fuss.  Now, the Mk1 has a pretty solid connection at the USB port, so other than the iffyness of making the USB connection a structural part of the equation, it's actually quite sturdy.  

I was thinking briefly of putting in a second, dummy USB plug (The LE1700 tablet has two adjacent ports).  That second port is covered up anyway, and a second plug would be a much more solid connection, at the cost of custom fitting it to only this tablet.

Anyway, I'm still thinking about this.  I'm pretty certain Mk2 will be built more-or-less as drawn, but there might be a compromise design where the buttons aren't quite as far from the main unit at Mk1 but there's a ridge overlapping the bezel just enough to provide a bit of support.  Again though, that's a tradeoff between structural strength and quite possibly having to build a new one when I change machines because it won't fit anything but the LE1700.


* quickkeys-with-le1700.jpg (114.34 KB, 800x600 - viewed 488 times.)
« Last Edit: February 27, 2011, 05:06:11 PM by tpope » Logged
tpope
Jr. Member
**
Posts: 43


View Profile
« Reply #13 on: February 10, 2011, 10:37:09 PM »

Fever subsided, I'm back at work and tore apart a few keyboards we had lying around.

Another Dell USB keyboard yielded a similar but not identical PCB.  It's a little bit shorter and has two sets of 14 inputs, rather than 2x13, so I had to retrace the wiring.  I also traced the "Z" key at the same time, though I'll have to do some testing on how to safely wire and switch the Control+Z leads.  After running all of the traces and testing with a piece of wire, I cut the USB cable down for easier portability.  Tonight I'll glue it onto the PCB like the last one and solder all of the connections back up.  

An old PS/2 HP media keyboard yielded a bonanza of micro switches.  These are through-mount rather than surface mount like the old ones, and a little bit taller, but I think I can still make them work.  Eight of them means I can screw up removal of at least three before I'm in trouble, which is also a good thing.  The board also had a nice little prepackaged LED+resister combination with a 5v lead that I might connect just as an "I'm getting power" light.  

Not shown is a piece of backlight acrylic from a laptop LCD display that I can use for the housing.  It's not even thickness, slanting from about 2mm at one end to 5mm at the other, but as long as I cut strips off "with the grain" and make sure everything lines up, I can live with that.  It might even make the housing a bit more attractive.

So, I've got everything I need to start on the next version.  I figure I can at least get it to the bare wires and buttons stage this weekend, providing I don't screw anything up.



* quickkeys-mk2-parts.jpg (94.71 KB, 800x600 - viewed 366 times.)
« Last Edit: February 10, 2011, 10:39:01 PM by tpope » Logged
bernard
Administrator
Hero Member
*****
Posts: 2533


pato mania


View Profile
« Reply #14 on: February 10, 2011, 10:44:58 PM »

neat findings!  Grin
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!