Help with a Datahand Replacement Controller Upgrade

orihalcon

01 May 2022, 11:40

Hello all!

I have some basic questions that I feel like many serious datahand owners would be able to answer pretty quickly and am looking to be pointed in a direction to go in.

I have a "parts" Datahand "Personal" that had been modified by the previous owner with what I believe is a Teensy 3.1 swapped for the original microprocessor. However, there either is something wrong with their installation, or they weren't able to figure out how to configure the teensy and it seems the project was abandoned (see photos for orientation that it is currently installed in). They seemed to have decent soldering skills and I would assume would have been pretty confident in their ability to complete the project before modifying a presumably previously functioning rarer keyboard like this. In its current state, I get zero output on any keys that I try with whatever firmware/configuration is currently flashed to it. The Teensy is recognized by PJRC's Teensy App via USB, so I am thinking the Teensy itself is in working condition.

My questions are:

1. What would be the easiest/fastest route to get a "factory default" configuration firmware file flashed to this Teensy 3.1? I've not really done much with TMK/QMK, and with all the odd NAS/NAS Lock/Mouse/Normal modes and LEDs, probably not something I want to reinvent the wheel on as I'm assuming this firmware build/configuration exists out there for existing owners in the know. I am not opposed to swapping this to a different Teensy like a 2.0 if that is considered the more "standard" replacement.

2. Is there a template out there of the "black foam dust shield" (which tends to break down over time) floating around out there, say in 8.5x11 PDF that I could print and cut out of something else? I'd like to make a new one for this, and again, don't want to reinvent the wheel as I'm sure that is a very common thing to replace on these.

3. Any particular tricks in terms of cleaning the switch modules? From what I've read, the key stems are prone to breaking and I'd like to avoid that if possible. Also was thinking I might temporarily pull the mouse function thumb trigger just so that it doesn't break off if something catches it (and I don't really anticipate using the mouse). My original thought was to ultrasonically clean each of the modules without disassembling as I don't believe the IR sensors and receivers are something that is going to be damaged by ultrasonic waves/soap/water followed by compressed air. I also don't believe that any lubrication was really used at the factory that this would get rid of. Any lubrication suggestions would also be appreciated as a couple of the keys on this one definitely "squeak", though hoping that goes away after cleaning assuming I don't hear back that ultrasonic cleaning in this way would be a bad idea. Conventional wisdom from the few posts I've seen over the years says - DO NOT MESS WITH THE THUMB CLUSTER as it is particularly easy to break stems on.

4. Where might I find the other standard Datahand variety layouts/configuration files (original Datahand DH200, Datahand I, and Datahand II) files as well just in case someone else has one of these other models and needs them?

IMG_2341.JPG
IMG_2341.JPG (2.98 MiB) Viewed 2429 times
These are a couple of keymaps/configurations I found with some quick searching, however, I'm not sure if they are set up to use the mouse and LEDs correctly and I'm pretty sure that they are meant for a teensy 2.0 - which I can definitely swap to if that is considered the standard, or if it makes things easier.

https://gitea.philsson.com/philip/My-Qm ... 9139ea4098


https://nest.pijul.com/sunflower/qmk_fi ... 2Y.AH2DMAY


Will post any successes or failures here based on suggestions I receive. I think having the above information all in one place for others considering "upgrading" their datahand to a teensy/QMK will find it helpful as well. The other confusing thing I've noticed is that a lot of the datahand postings that pop up more easily in search is in reference to reproductions, so it is unclear if they also will work for the original which most likely will have a different matrix.

Any help definitely would be appreciated.

orihalcon

01 May 2022, 12:54

Hmmmmm. The plot thickens. Upon further review. Looks like the interface PCBs are not original and uses simplified modern components compared to what I am seeing here: https://octopup.org/computer/datahand/repair This one also uses a 25 pin connector between halves instead of the 15 pin one that this model would usually have so there are some cuts in the case to accommodate that as well.

Looks like it was part of a conversion kit or something designed by someone themselves potentially. The case has definitely been cut in a few places which allows it to fit and there definitely isn't any Datahand silkscreening on the main PCB like there is on the modules. Also doesn't look like the LEDs on the left hand side are connected.

IMG_2349.jpg
IMG_2349.jpg (2.62 MiB) Viewed 2397 times
IMG_2351.jpg
IMG_2351.jpg (3.36 MiB) Viewed 2397 times
I still think all of the above info in my original post would still be useful to have, though not sure it will help me in my situation haha.

Anyone recognize the kit or if it was part of a group buy at any point? If I can look up info on the group buy, I can figure out what firmware/layout is supposed to be used with this particular unit.

Also a long shot, but does anyone have original PCBs that they aren't using that I could buy? Might be worth going back to stock to hopefully get this useable again.

User avatar
Muirium
µ

01 May 2022, 23:44

Does the Teensy show up as a USB keyboard when plugged into a computer? If not, it likely isn’t programmed at all.

If this was an ordinary keyboard, I’d be pointing you to Soarer’s controller or indeed QMK, but this controller communicates with what exactly in the other hand? What’s the matrix look like behind those… switches?

orihalcon

02 May 2022, 08:20

It’s got a 25 pin serial cable that connects the two halves (original had 15 pins I believe) and that I think essentially extends access to the matrix to the other half along with some LED functiona.

The original modules are arranged in a 13x2 matrix each half and together they make a 13x4 matrix.

I spent a lot of the day messing around with one of the phototransistors (apparently that is the appropriate term rather than IR receiver). In my mind, I thought that the phototransistor would produce a small voltage when the IR from the emitter hit it, but alas, no, it actually acts more as a switch in that it goes from a resistance of around 100K down to a few KOhms. Unfortunately, the resistance is not near zero, so you need some voltage always going to the PT so that it passes through if the switch is on.

I’m not sure I fully understand it, but I feel like If I were to modify the original module PCBs or perhaps swap the photo transistors for emitters on both sides that it would be possible to have an xwhatsit controller drive it with the right rewiring. I don’t really want to damage the original PCB to hand wire them, and they are super thick - like 4 or 5mm thick with odd shapes, so guessing not quite as easy to have made as regular prototype PCBs. That and I lack design skills to actually come up with the files to make them.

Since I don’t fully understand the “new mainboard circuits” I am unsure how I’d go about determining a matrix. I like the xwhatsit controller because it just lights up on a visual matrix when something is pressed. I’m not actually sure what the other microprocessors are on the new PCBs, but I’m guessing they do some additional strobing or sensing.

The xwhatsit conversion challenge would be fun, but almost certainly won’t work with all the LEDS to indicate what mode it is in. My guess is that this was supposed to use a modified version of QMK, just interesting that someone would Prototype this and abandon it without posting about it.

I’ll take some additional pictures most likely tomorrow. Someone did make an electrical diagram of the switch modules too which I’ll post along with it.

User avatar
Muirium
µ

02 May 2022, 11:31

As much as I respect Xwhatsit for bringing back Beamsprings and Kishsavers from the dead, I'd heavily advise against using his hardware/firmware combo now. Especially for a non-capsense task like this, his firmware is entirely inflexible and almost certainly won't work, nor can it be modified.

Pandrew's QMK port to capsense hardware works just great on my Xwhatsit equipped keyboards. He did a fantastic job, including live matrix scanning like this:

Image
viewtopic.php?p=480369#p480369

I'm still using Xwhatsit's hardware—he built my beamspring and Model F controllers for me himself—but Pandrew's QMK will run on the controllers you can buy from Ellipse etc., too. Pandrew is still around and it's worth asking for his advice on your project. I've no idea if a capsense controller could in fact work with photoresistors like this. But it may well be the right base for a modified firmware to start from?

orihalcon

02 May 2022, 14:49

Photos attached of both PCBs. All 4 of the chips are the same ULN2003A which apparently are a package of 7 NPN Darlington transistors which must amplify the output of the phototransistors. Also attached are some schematics of the original switch modules that I can't recall the specific source I got them from when searching around, which seem relatively straightforward to look at. Also in the attachments are the schematics of the original controller which may be useful to someone.

I am fairly certain this was meant to use QMK/TMK, but I have no idea how to configure rows and columns or how to configure pins for LED activation. The circuit in the right hand side does indeed seem to just pass the matrix of that side over to the left via the 25 pin serial cable. I get now why most projects just put a teensy in each half rather than try to connect the two - that 25 pin cable sure is bulky!

Muirium - I will definitely will have to look into Pandrew's implementation there, does look pretty sophisticated indeed! Agree, probably time to learn some new stuff rather than sticking purely to what I'm comfortable with. I think the main reason you can't use something like an xwhatsit to the existing matrix is that it appears that the "ground connection" is what is strobed rather than a positive pulse like the xwhatsit would use. I've had problematic Xwhatsits where the strobed pulse was too high, so I know there's a component on there (most likely resistor packages) that essentially control what the pulsed strobe voltage is that could easily be changed, so you could make it strobe the appropriate voltage to power the IR emitters with limited modification to anything - sounded good in theory, maybe less so in practice noting the above. I did include a slightly modified schematic of what I'd imagine the PCB could be rewired to to have the chance at working with the xwhatsit, but I've decided not to actually modify the original switch module hardware since they aren't exactly plentiful. Of note, my red/green modified drawing to the schematic WILL NOT WORK because the phototransistors are more like variable resistors and don't generate a voltage, so they'd need 5V applied to them in some way. I also think there's a fair chance that my use of grounds is wrong in the diagram. I'll probably order some loose IR emitters and phototransistors to mess around with just to see if it's possible and report back with any results. After playing around with an oscilloscope and one of the original phototransistors, they aren't quite as simple as I was imagining them to be. After a lot of messing around, I was able to use a TV remote to essentially "see" the signal pattern on the scope which was kind of cool and provided a way to "test" phototransistors. Also found that an LCR meter alone looking at DC Resistance can see the big decrease in resistance even with ambient light changes without additional hardware required for basic confirmation that a phototransistor is working.

Those familiar with TMK/QMK - Would there be an advantage to switching from this Teensy 3.1 to a Teensy 2.0 before proceeding further? Seems most TMK/QMK projects use that instead, but I understand the IO might be different or incompatible with this board.

For QMK, is there an equivalent of "HID_listen" that helps identify which switch is where on the matrix? I'm guessing you still have to "define" the original matrix with what pins are columns/rows and if they are hi/low as well as how to control any LEDs which I'll have to do some research on. I think that would be a good starting point unless the initial configuration/matrix is obvious. The circuit looks rather simple, so I'm guessing it will be obvious to someone.

Also of note, the larboard recreation seems to go a different route in terms of amplification from phototransistors which is interesting, some details here if anyone is interested in how it works: https://hackaday.io/project/178232-lalb ... c-keyboard

IMG_2367.jpg
IMG_2367.jpg (2.1 MiB) Viewed 2261 times
IMG_2368.jpg
IMG_2368.jpg (1.5 MiB) Viewed 2261 times
IMG_2374.jpg
IMG_2374.jpg (179.64 KiB) Viewed 2261 times
DHKeyboardMatrix.png
DHKeyboardMatrix.png (59.01 KiB) Viewed 2261 times
Theoretical Xwhatist Rewire.png
Theoretical Xwhatist Rewire.png (68.98 KiB) Viewed 2261 times
Attachments
DH_RightBoard.png
DH_RightBoard.png (111.69 KiB) Viewed 2261 times
DH_LeftBoard.png
DH_LeftBoard.png (75.74 KiB) Viewed 2261 times

User avatar
Muirium
µ

02 May 2022, 15:15

Any idea what this replacement controller was called? Isn't there somewhere hosting the files?

Worst case scenario, I suppose, is you have a one-off that was half-completed by its original maker who never published their work. Then, yes, you're going to have a lot of work ahead of you. It's unclear to me how you strobe those sensors (and their matching emitters) in such a way to play well with existing controller logic. (I'm guessing it needs similar but not identical work to what Pandrew put into QMK.) You're also going to need to work out what you want from the DataHand's switches. I've never tried one myself. Are they chording keyboards? I guess so by all those A/B labels.

My nontechnical understanding is that QMK is neatly modular. That's how Pandrew was able to give it capsense support, while retaining all the key mapping / macro / LED support. I'd try to get your head around what QMK can do—it can certainly drive chording keyboards—and figure out what your remaining needs are, for driving this exotic matrix.

orihalcon

02 May 2022, 21:47

Haven't seen any examples of a "replacement controller" for the Datahand on the internet. I bought it really without pictures as parts and being told that it was in the process of being converted to USB and never finished, which I took to mean that the original cable was clipped with the intention of putting a teensy or PS2 to USB converter inside or something to that effect. Couldn't have been more wrong, but an interesting rabbit hole to go down nonetheless!

This design is pretty simple looking, and if it works, would think there would be some interest from other datahand owners as QMK/TMK is likely more reliable/customize-able though still not sure if having layers indicated by LEDs is very easy to implement on that. I think it would make more sense to just put a separate teensy in each half of the datahand so that you don't need a bulky cable going between the two.

I did order some what I believe are similar emitters and phototransistors to mess around with so I don't destroy anything original. My understanding is if you were to replace the phototransistor with a second emitter that the emitter will output some voltage when exposed to certain wavelengths of light, and I think there's a good chance the voltage should be significant if it's the color that the LED usually produces. I'm curious since it essentially would represent wireless power transmission. I'm sure there will be lots of loss and ambient light could probably really make it unusable, but even if it works in the dark I would find that interesting. See this YouTube video that explains that all LEDs can act as Solar cells, but aren't optimized for it: https://www.youtube.com/watch?v=6WGKz2sUa0w

Anyone with parts Datahands at a reasonable price, would be interested in potentially buying them to play around with. Even if I don't succeed at anything, has been a fun little run of experimenting with so far and I don't believe I've permanently broken anything yet haha. I'll probably sell the parts again to someone else who can use them after doing any experimenting so that they can stay in use/circulation as I hear it's quite a niche market. these look like they'd be a pretty equal mix of fun and frustration to offer a repair service for, particularly the switch modules being delicate, but you also have to be pretty rough with them to get the caps to come off making you almost certain you'll break something, and I'm sure lots of people have.

As for the circuit in its current state (no pun intended), I can figure out where +5v and ground are supposed to go based on the original schematic and also apply a voltage to one of the columns and then start pressing switches and seeing if I can get any pulses back on any of the rows going back to the Teensy and viewing any potential output signals of the pre and post amplified phototransistor with the oscilloscope. If I can get a parts datahand or an original controller from someone, I can be a bit more confident in the voltages that are supposed to go into the strobes without killing anything, though my LED tester tells me that the voltage on these is in the 1.25v range and two are connected in series, so will start low and go up from there. Fun thing about IR LEDs is that you can "see" them emit light if you're using a camera without an IR filter which is fairly common on a lot of cameras including phone cameras, so I should be able to "see" them "be on" if I have that part right.

I don't have much datahand experience, but I'm guessing each version had different connectors, so not sure if you could easily put together a "universal" modern QMK/TMK controller adapter, but if the implementation is as simple as what this one looks like, seems to be in the realm of possibly as long as you are ok giving up the mouse function and have questionable LED indications, which I think most users would trade for reliability and easier customizability and to make them future-proof other than anything physically breaking. I think the emitters and phototransistors can still be purchased, so that's the only real component that could get "used up" over time if you take the controller out of the equation. I also wouldn't be surprised if the project wasn't completed due to the circuit not working as intended, and therefore was never published, though I also think that you'd hand wire something for proof of concept before having these very professional looking PCBs made.

It's a mystery for now.

User avatar
webwit
Wild Duck

02 May 2022, 23:11

orihalcon wrote:
02 May 2022, 21:47
Haven't seen any examples of a "replacement controller" for the Datahand on the internet.
https://geekhack.org/index.php?topic=12212.0

orihalcon

03 May 2022, 06:26

webwit wrote:
02 May 2022, 23:11
orihalcon wrote:
02 May 2022, 21:47
Haven't seen any examples of a "replacement controller" for the Datahand on the internet.
https://geekhack.org/index.php?topic=12212.0
I may have briefly seen that thread - lots of good info there. Not sure if it will help me much since I don't have the original controller to replace the microprocessor into. I suppose part of what I am asking is if anyone has built a full controller board from scratch like what has been done here. Probably is a fairly unique situation where the original controller PCBs are lost unless there was a significant controller failure. I still think it would be kind of cool to just have a drop in full replacement controller PCBs with a teensy in each half so that only USB cables are required to go to each half rather than the original bulky serial style cable. The issue that probably would create is that the LEDs and states activated on one side might not carry over onto the other if they see each other as separate keyboards :?

For those that use QMK for a project like this, are there any issues using knockoff Teensy 2.0++'s since PJRC has no plans to make more and the genuine ones are sold out everywhere? It's not totally clear to me exactly which Teensy versions are compatible with QMK. It seems that almost all projects prefer to use Teensy 2.0 and Teensy 2.0++ which use Amtel AVR microcontrollers and are only 8 bit with a lot less memory onboard. You'd think there would be more suggestions to use newer, still supported/manufactured versions, but I don't know how easy it is to use QMK to go from one type of processor versus another.

User avatar
webwit
Wild Duck

03 May 2022, 20:35

I have this spare one for the Pro II. It's probably compatible and just adds programmability but don't take my word for it.
datahand.jpg
datahand.jpg (1.06 MiB) Viewed 2116 times

orihalcon

04 May 2022, 02:52

Hmm. I'm thinking would probably need both halves to do anything with original controller PCBs, but definitely cool to see the originals up close.

Seems for as much of a cult following these have or did have at one time that there isn't as many pictures out there of the different versions compared.

Doing some more research, there are a fair number of datahand firmwares out there to modify originals, but they assume a fairly high level of knowledge of programming that is prohibitive without that knowledge.

I'd say others looking into a similar project should definitely check out the Datahand recreation (Dodohand) project here:
https://geekhack.org/index.php?topic=41422.0

Within, there is mention of a few original firmwares for teensy, namely the "TrackHand" here: https://github.com/Henry/TrackHand

Interestingly enough, even looking at the TrackHand project, I'm not seeing the actual electrical diagrams for it and so many of the programming elements are way beyond me haha. Could be because most of the original controller PCB is also used, but I can't really tell as that's an older DataHand DH200 model. They also seem to get rid of the 15 pin serial cable by using an MCP23018 IO-expander, but doesn't really diagram out how that's actually connected unless I'm missing something.

Of note, they actually do use a Teensy 3.1 for the project which is what I have uses, though guessing that's more because these may have been developed at a similar time where this was the most modern Teensy available. If the IO Expander thing was more standard/common knowledge - I am guessing this project would have used that too in order to delete the thick 25 pin connecting cable between the two halves.

Starting to think I bit off a lot more than I can chew in messing with this, but I'll keep pressing on for now. I'll probably learn what I can and clean it up really nicely and then sell it to someone else who knows more about programming for them to play around with. Since no one really sells Datahand "Parts" and I'm also unaware of any active "repair services" I could see splitting up the individual finger and thumb modules or repairing other datahands that aren't working if there's some interest expressed.

orihalcon

09 May 2022, 01:56

UPDATE - It's becoming increasingly more apparent that I am not an electrical engineer to be able to fully understand direction of current flow and properties of phototransistors and such.

The ULN2003's seem to be used to effectively "strobe the columns to ground" by completing the circuit using the typical +5V strobe pulse as the trigger. It seems odd to me that they chose to strobe to ground as opposed to having ground always connected and then strobing with a positive voltage?

To further complicate things, the phototransistors have their "Emitter" side directly wired to ground also makes the circuit a lot harder to make sense of. Had they connected that side to a static positive voltage - possibly even strobing right along with the IR Emitter with a +5V pulse - it would have acted much more like a regular switch in that it would allow some of the +5V source to make it through to the other side - possibly up to 1V or so. Presuming your controller could sense that +1V, that would be the end of the circuit with very simple wiring.

There's definitely a good possibility that I have a few things wrong above, but this is what the oscilloscope seems to tell me about how the original circuit works.

The phototransistors apparently are different than photoresistors in that they can also generate a current when light hits them and not just have a large decrease in resistance - something in the order of Mega Ohm range dropping down to Kilo Ohm range when the right light hits them.

The way this apparently one-off custom controller was supposed to work was to have the Teensy directly sense some combination of the phototransistor's drop in resistance to ground or sense the small amount of current that it generates and it has the "Collector" side going right to the teensy, and the other side is wired to ground as mentioned above.

They seem to have kept the original 13 columns and made 8 rows - Essentially kept the original 2 rows, but gave each module it's own separate 2 rows. Seems to strobe all of the columns the original way though.

Not really sure where to proceed from here unfortunately.

Further questions/considerations:

1. Anyone know specifically what kind of connectors the Datahand uses inside? They seem to be 2mm pitch which is a kind of odd size and I wasn't able to match what they were looking like to other more common JST type connector varieties. The unique thing about these are the square retaining tabs. I am also fairly sure that one of 14 pin cables (blue one for the finger modules) isn't working reliably as I wasn't able to consistently/reliably test continuity with my probably substandard equipment, but that could also be because I don't have new connectors to use in the testing. I've posted some photos of the original connectors in this post showing what I believe the wiring would be.

2. My original thought with all of this work was to make a universal third party controller group buy of sorts for all original Datahands. Electrically, they seem pretty simple (though it appear that they could have been a lot simpler with my limited knowledge as detailed above- I must be missing something with my limited knowledge as to why they did it the way that they did). I'm wanting it to be plug and play, so I can't modify the original module PCB circuitry. At this point, I'm just missing some basic knowledge of phototransistors sensing and PCB design skills and possibly also a good way to make the two halves talk to each other so that things like "NAS state" can be relayed from one half to the other with just separate USB cables going to each half with something like a teensy 2.0 or Arduino Pro Micro as the controller in each half so that it also deletes the need for a bulky 15 pin connecting cable.

3. Anyone who knows circuits have ideas as to why they didn't just strobe positive pulses to the LEDs as opposed to switching which ground is connected and why they chose to connect the phototransistor's emitter directly to ground as opposed to the collector for much simpler sensing circuitry where you get a positive voltage output when the IR source is detected?


If anyone has suggestions about how to proceed with QMK with this particular controller, particularly how to sense the phototransistor output with the emitter connected to ground, that would be greatly appreciated!

I will admit that I may have gotten as far as I'll ever be able to on this, so would be open to offers for everything or possibly selling specific parts. The bottom case was modified to fit the new controller and the right thumb unit has some issues returning back to neutral position and likes to stay pressed down. That can probably be disassembled and cleaned/lubricated so it returns to the up position, but I'm not experienced enough to trust that I wouldn't break it further ;)
Attachments
IMG_2445.jpg
IMG_2445.jpg (2.36 MiB) Viewed 1890 times
DHKeyboardMatrix.png
DHKeyboardMatrix.png (59.01 KiB) Viewed 1892 times
IMG_2459.JPG
IMG_2459.JPG (2.86 MiB) Viewed 1892 times

Post Reply

Return to “Keyboards”