Beamspring USB controller

xwhatsit

26 Jun 2013, 12:00

Updated 2014-05-09:

Released v0.6.1 of source and schematics, see post http://deskthority.net/post162024.html#p162024

Updated 2014-05-07:

Released v0.6 of source and schematics, see post http://deskthority.net/post161719.html#p161719

******************************************************************************
Updated 2013-09-21:

Released v0.5 of source and schematics, see post http://deskthority.net/post126735.html#p126735

******************************************************************************

Updated 2013-09-19:

Released v0.4 of source and schematics, see post http://deskthority.net/post126467.html#p126467

******************************************************************************

Updated 2013-08-26:

Released v0.3 of source and schematics, see post http://deskthority.net/post123264.html#p123264
Also link to pre-compiled Win32 binary of GUI util to assign scancodes etc.

******************************************************************************
Updated 2013-07-28:

Released v0.2 of source and schematics, see post http://deskthority.net/post120513.html#p120513

******************************************************************************
Updated 2013-07-05:

Availability and pricing for hardware: http://deskthority.net/post117886.html#p117886

******************************************************************************
Updated 2013-07-02:

Released v0.1 of source and schematics, see post http://deskthority.net/post117429.html#p117429

******************************************************************************

Hi,

Posted this on the `other forum' but it seems in the couple of years since I was on a keyboard forum this site has a good chunk of the more weird-and-wonderful keyboard enthusiasts so might as well post this here too.

I've finally got around to converting one of my beamspring boards (a 5251) to USB. Attached is some pictures and the schematic. Once I've finished the firmware (it needs an autocalibration routine for Vref, and an additional HID `debug' channel for rebooting it into USB DFU programming mode, and manually setting Vref and reading raw matrix, maybe a scancode programming mode) I will upload everything including the Kicad project and gerbers onto Github or somewhere.

As OSHPark gives you three PCBs minimum, I will shortly assemble another controller for my other Beamspring (also 5251-based, except based on the 3270 layout, I think it's a 3277? That means I have one PCB left over for now. Anybody with a 5251-based beamspring who wants USB?

I think it will need work for the 3270-style beamsprings (with the cases that step down at the back) as due to the connector I used the PCB is vertically mounted, which could prove difficult despite it being pretty short (about 22mm high I think). Also, non 5251-style layouts might have a different connector pinout (pin 1=GND, followed by 23 columns except pin 16=NC, pin 26=GND, followed by four rows). If anybody with a different beamspring board can answer these questions and is interested in a USB controller I would be keen to work with them.

Back:
bsusb_back.JPG
bsusb_back.JPG (512.63 KiB) Viewed 32096 times
Compared with original controller:
bsusb_old_new.JPG
bsusb_old_new.JPG (504.75 KiB) Viewed 32096 times
Connector details:
bsusb_top3.JPG
bsusb_top3.JPG (519.27 KiB) Viewed 32096 times
Reassembled:
bsusb_case_top.JPG
bsusb_case_top.JPG (448.5 KiB) Viewed 32096 times
A little bit short on desk-space now. Also need a higher chair.
bsusb_workstation.JPG
bsusb_workstation.JPG (463.93 KiB) Viewed 32096 times
Currently 890Hz scan rate or so, with a incrementing/decrementing counter for debounce (yes there still is bounce on a capacitive board). min=0, max=5, <=2 is unpressed, >2 is pressed. This means absolute max of 3ms for key delay, which I believe compares favourably with most modern Cherry boards (if sticking to the rather long recommended 5ms debounce)
scanrate.png
scanrate.png (2.68 KiB) Viewed 32096 times
Row drive for two consecutive columns, space inbetween to allow caps to drain:
drive.png
drive.png (2.2 KiB) Viewed 32096 times
Blue trace is column sense, about 100mV. Key (L Shift) is currently unpressed:
unpressed.png
unpressed.png (2.6 KiB) Viewed 32096 times
As above, except the key is now pressed:
pressed.png
pressed.png (2.55 KiB) Viewed 32096 times
Attachments
beamspring-usb.pdf
Schematic
(71.88 KiB) Downloaded 362 times
Last edited by xwhatsit on 09 May 2014, 04:46, edited 8 times in total.

User avatar
webwit
Wild Duck

26 Jun 2013, 12:40

Ooh, this is great, top points. Now all you have to do is mod it to a 60% layout!

JBert

26 Jun 2013, 12:45

Isn't most of the case filled with air? It looks wider than the F AT, but isn't the mechanism about the same width?

A 60% would still take considerable space with wide keys like that.

xwhatsit

26 Jun 2013, 12:53

Yeah there's a lot of air in there. Not so keen on 60%, it seems to have become rather popular in the couple of years since I looked at a keyboard forum. Ideally I'd have a 122-key beam spring. I'm looking forward to doing a USB Model F controller for my 122-key at some point. Don't know that the keys are that wide? Seem to be normal. I feel self-conscious about the beamspring now... poor board... fat keys...

Webwit don't you have a 3278? How far did you strip it down? Similar connector/pinout? You reckon a skinny board like the above would fit in the stepped-down case like that?

User avatar
webwit
Wild Duck

26 Jun 2013, 13:17


xwhatsit

26 Jun 2013, 13:24

Looks promising... seems to be similar pinout etc. as far as I can see (four columns at far right). Height would have to be measured. In the worse case could make the straight-pin edge connector I used into a right-angle connector with an adapter board.

User avatar
webwit
Wild Duck

26 Jun 2013, 13:34

I would love to try your spare PCB, but it's probably better spared for someone who will actually have the time and skill to play with it in the near future.

xwhatsit

27 Jun 2013, 10:47

OK assembled another controller today and installed it in my other beam-spring board, a 3727. Went together very easily. Looking forward to using the board for a full day tomorrow (today I got a full day's work done with the 5251 which was novel). Very smooth board, feels very high quality (much nicer than the rattly 5251 board).

Note in the pictures the `Property of IBM Corp. Armonk New York' label. Hope they don't come looking for it!
Attachments
IMG_0494.JPG
IMG_0494.JPG (136.73 KiB) Viewed 32021 times
IMG_0493.JPG
IMG_0493.JPG (128.25 KiB) Viewed 32021 times
IMG_0491.JPG
IMG_0491.JPG (170.71 KiB) Viewed 32021 times
IMG_0490.JPG
IMG_0490.JPG (165.43 KiB) Viewed 32021 times
IMG_0489.JPG
IMG_0489.JPG (150.8 KiB) Viewed 32021 times
IMG_0485.JPG
IMG_0485.JPG (183.34 KiB) Viewed 32021 times
IMG_0483.JPG
IMG_0483.JPG (156.6 KiB) Viewed 32021 times
IMG_0481.JPG
IMG_0481.JPG (174.03 KiB) Viewed 32021 times
IMG_0480.JPG
IMG_0480.JPG (128.35 KiB) Viewed 32021 times
IMG_0478.JPG
IMG_0478.JPG (117.69 KiB) Viewed 32021 times

xwhatsit

27 Jun 2013, 10:48

10 attachment limit...
Attachments
IMG_0497.JPG
IMG_0497.JPG (92.38 KiB) Viewed 32020 times
IMG_0495.JPG
IMG_0495.JPG (152.26 KiB) Viewed 32020 times

User avatar
Muirium
µ

27 Jun 2013, 12:46

So jealous + so jealous. Nice!

User avatar
webwit
Wild Duck

27 Jun 2013, 21:42

IBM beam spring 60%:

Image
IBM 3741 Data Station

Space Cadet color style/IBM/60% for the win!

Image
IBM 129 Combination Keyboard

User avatar
webwit
Wild Duck

27 Jun 2013, 21:47

Meanwhile, at geekhack... ;)
Spoiler:
Image

xwhatsit

02 Jul 2013, 08:04

Mmmm blue spacebar... are you sure that that's not that punch card punching thing though...?

I have the code in a good enough state for release. License is GPLv3.
beamspring-usb_0.1.tar.bz2
(240.43 KiB) Downloaded 329 times
I have auto-calibration for Vref now. Can be overridden in the EEPROM.

Keyboard scancodes are now stored in EEPROM.

An HID diagnostic interface is present that allows changing scancodes on the fly, storing and loading them from EEPROM, along with Vref and monitoring interesting stuff like current key state (independent of what the USB keyboard protocol is saying). BTW I have full NKRO on the board itself---you can hold down all the keys if you like---although I'm only sending 6 over USB as I don't have a great use for NKRO so haven't bothered to `scratch that itch' yet.

There is only a command-line tool for interfacing with the HID interface. Hopefully I will be able to write a Qt GUI app at some point when I get time.

xwhatsit

02 Jul 2013, 08:09

util.png
util.png (17.88 KiB) Viewed 31895 times
key_monitor.png
key_monitor.png (10.26 KiB) Viewed 31895 times

User avatar
bhtooefr

03 Jul 2013, 18:48

Excellent work, xwhatsit!

So, I have a 5251 board that I would like to actually use.

The problem is, well...
webwit wrote:I would love to try your spare PCB, but it's probably better spared for someone who will actually have the time and skill to play with it in the near future.
I've got the time, but I don't have the SMT soldering skill (through-hole I can do easily), and I don't have the programming skill.

User avatar
acfrazier
Mad Scientist

03 Jul 2013, 23:32

Alright, well I've decided to take this on as my pet project if that's okay, because I've wanted to do this for a while, but I can't design PCBs for shit. I've got free time, soldering skill, and I'll run my own PCBs and order parts. so you don't have to mail me yours. Yeah, I know I haven't been involved in the community for years, but this is the first thing that's interested me. I think I can have it done before the end of the year if I work on it in my free time, maybe sooner but no promises.

User avatar
webwit
Wild Duck

03 Jul 2013, 23:36

Haha, I like that. Finally someone cracked the beamspring to usb problem. A fine moment to be inspired.

xwhatsit

04 Jul 2013, 00:33

bhtooefr wrote:Excellent work, xwhatsit!

So, I have a 5251 board that I would like to actually use.

The problem is, well...
webwit wrote:I would love to try your spare PCB, but it's probably better spared for someone who will actually have the time and skill to play with it in the near future.
I've got the time, but I don't have the SMT soldering skill (through-hole I can do easily), and I don't have the programming skill.
Heh SMT frightened me at first too but now I prefer it to through-hole. Those pesky 0805 resistors and caps never want to sit flat though :|

If you want I can build you one, or maybe acfrazier can if he's ordering a whole bunch of stuff (I have one PCB left but already offered it to some other dude on GH, although he hasn't replied yet). If I have to order another PCB then it's about $8-9 for a PCB, about $10 worth of components and the connector was about $5 I think. If this other dude doesn't want the board then I'll just give it to you though.

If it's a 5251 that looks the same as the board in my first post then it should pretty much just plug together and work straight off the bat, could pre-program the same scancodes and you'd be sweet.
acfrazier wrote:Alright, well I've decided to take this on as my pet project if that's okay, because I've wanted to do this for a while, but I can't design PCBs for shit. I've got free time, soldering skill, and I'll run my own PCBs and order parts. so you don't have to mail me yours. Yeah, I know I haven't been involved in the community for years, but this is the first thing that's interested me. I think I can have it done before the end of the year if I work on it in my free time, maybe sooner but no promises.
Cool man. I think I remember we corresponded a few years ago on GH when I first got my beamsprings. Did I buy a 122-key Model F from you?

Are you planning to write new controller code from scratch or are you going to improve the released code? Either way I'd be keen to see what you come up with. If you're planning to use the existing code it might pay to point out that I haven't compiled the user-space diagnostic util for Windows yet; I think it would need porting. If you're a Linux guy then OK, otherwise you might have to wait for me to write a cross-platform Qt GUI app as I'm planning to (unless you want to write your own util to interface with the diag interface on the controller).

User avatar
Peter

04 Jul 2013, 01:01

I would buy one if it works for a 3278 with German QWERTZ-layout ..
Spoiler:
Image

xwhatsit

05 Jul 2013, 00:36

Peter wrote:I would buy one if it works for a 3278 with German QWERTZ-layout ..
Spoiler:
Image
Whoah pretty board!

Yes it would work, as long as it has that 30-pin connector with the same pinout (the other 3278 boards I'm seeing seem to have it, so I think it is likely).

In fact you'd probably use the same scancode matrix layout as a `US'-layout 3278 (or, say, my 3727), as with USB keyboards, they still send the character code for `Y', but the OS (whether Windows or Linux or whatever) knows that you have a German keyboard layout selected so intreprets the `Y' as a `Z'.

If you are confident with soldering surface-mount etc. you can build your own USB controller. Alternatively I can do it (I'll need to figure out proper pricing though so I don't rip either myself off or other people).

That's a very shiny looking Tab key. Previous user of the keyboard do a lot of form-filling? :P

User avatar
kps

05 Jul 2013, 02:54

I'd be in for at least one (probably two) PCBs/kits/whatevers.

xwhatsit

05 Jul 2013, 11:28

As far as I can see there are three ways to get a controller:
  • Use the schematics/PCB/code released above to make your own, or buy one off somebody who is
  • Buy an unsoldered/unprogrammed kit of parts from me and do it yourself (~$27 USD + shipping)
  • Buy a fully-assembled/programmed/tested controller from me (~$50 USD + shipping)
First option would be the most fun and fastest if you are buying parts and PCBs locally.

Second option is also fun but you might be able to get the bits cheaper (I'm in New Zealand) if you take the first option. You also have to wait for it to be shipped from NZ, which might be a couple of weeks.

Third option gets you something that works (and has been tested on either my 5251 or 3727). It costs a bit more as I'm no pick-and-place machine and I'd really want to test it properly before shipping it out.


Cost breakdown is as follows.

The PCB cost is $USD9.12 from OSH Park. My cost for components is $NZD21.714 (see below), which is rougly $USD17.
component_pricing_nzd.gif
component_pricing_nzd.gif (4.31 KiB) Viewed 31699 times
The remaining $USD23 for me to assemble and program/test the board is pretty conservative. I've no particular desire to make a profit on any of this (I don't think there's much of a market for this niche-in-a-niche), and would prefer that as many people as possible with beamsprings had the opportunity to use them (hence open-source), however I can't give my time away entirely.

This controller will all be a bit more compelling in a few weeks when I've had enough time to write a more user-friendly graphical remapping/diagnostic program. If people do want either option 2 or 3 from me, let me know either on here or through my email, tom@cornall.co.

User avatar
damorgue

05 Jul 2013, 11:37

If I were to build one, I would avoid the SMD parts. I recon some might be interested in a PCB with the SMD parts soldered to make things far easier.

xwhatsit

05 Jul 2013, 11:41

damorgue wrote:If I were to build one, I would avoid the SMD parts. I recon some might be interested in a PCB with the SMD parts soldered to make things far easier.
To be honest it's all SMT apart from the edge connector and the ground strap. If I'm going to solder all of the components on apart from that I might as well go the rest of the way and solder on the connector and test it on a keyboard.

mr_a500

06 Jul 2013, 23:13

This is awesome! Every day I've been staring at my beamspring keyboard, waiting for the day I can actually use it. Now there's real hope!

I'm a bit worried about the way the connector is mounted. On the 3278, the spot where the edge connector is just happens to be the shallowest point on the case - only 4 cm from the bottom of the case to the cover. It looks roughly 2.5 cm from the bottom of the case to the top of the connector, so if that PCB overhang is much more than 1 cm, it might not fit. Isn't there an edge connector that mounts sideways? (like the original board)

User avatar
Peter

06 Jul 2013, 23:57

Buy a fully-assembled/programmed/tested controller from me (~$50 USD + shipping)
Yes please .. Or maybe 2 ...
Anyone else in EUrope interested in getting some of them (besides webwit) ?
Maybe we should organise it a bit, so customs only gets one 'processing-fee' ??

btw :
The 'TAB'-key isn't as bad as the picture makes it look, in fact there is still texture on all the keys ..

User avatar
webwit
Wild Duck

07 Jul 2013, 00:18

Hmm, would it work with this 5251 66-key variant?

Image

User avatar
Muirium
µ

07 Jul 2013, 00:20

Cute 75% you got there!

User avatar
bhtooefr

07 Jul 2013, 00:23

Pop the cover off, count the pins on the controller/matrix interface.

An 83-key 5251 has 30 pins. (The edge connector being a 60P part would probably be because single-sided edge connectors are hard to find nowadays, and a double-sided one will work just fine.)

User avatar
webwit
Wild Duck

07 Jul 2013, 00:26

Muirium wrote:Cute 75% you got there!
Thanks. I got it NEW :shock:

Post Reply

Return to “Workshop”