Beamspring USB controller

User avatar
Game Theory
Mr. Despair

19 Sep 2013, 07:01

Thank you for the additional work on the controller!

xwhatsit

20 Sep 2013, 07:10

Cheers Game Theory.

Well, implementing NKRO hasn't proved too painful. Forced me to learn properly about how HID descriptors work as well, which isn't a bad thing :) My code needs some more polishing first, and some testing to make sure the boot protocol will still work in BIOSes etc.

It also gives me the ability to implement usage pages that aren't just Keyboard—I think it was a500 who wanted an Eject key for instance.

The nice thing about capacitive keyboards like the beamspring is that there's no ghosting, so you can actually achieve proper NKRO and have it actually mean something. Quite neat opening up xkeycaps and mashing as many keys as you can with one hand while taking a screenshot :P
nkro.png
nkro.png (23.75 KiB) Viewed 9499 times

Ah yes and I thought I'd show off my first reflowed board. All the 0805s straight and flat, nice heel and fillet, all the things I wish I could do when soldering by hand! I think on the next redesign I might have to make a move to a board with all the components on one side so I don't have to do double-sided reflow (i.e. reflow one side, then flip it upside down for the other side and hope the surface tension of the molten solder is enough to hold the components on against gravity—this actually works to my amazement!).

Apologies for crap photos, work point-and-shoot has no macro mode and my M3 only focuses down to 1 metre lol (never mind the Tri-X grain being a similar size to the 0805s :) ).
reflow1.JPG
reflow1.JPG (133.01 KiB) Viewed 9498 times
reflow2.JPG
reflow2.JPG (194.24 KiB) Viewed 9498 times

xwhatsit

21 Sep 2013, 04:40

Here's a new version, v0.5.

New features:
- Full NKRO (implemented same way as Soarer's converter, with two reports, one marked as boot compatible, one not—tested on my laptop BIOS and seems to be fine)
- Additional non-USB-HID-keyboard keycodes, including media keys, web keys (yes, 1998 did call) and eject etc.
beamspring-usb_0.5a.tar.gz
(346.95 KiB) Downloaded 252 times
Oh and here are links to precompiled firmware (make sure you match the hex to your board revision!) and a Windows version of the USB util:
http://downloads.cornall.co/beamspring_ ... 2_v0.5.hex
http://downloads.cornall.co/beamspring_ ... 3_v0.5.hex
http://downloads.cornall.co/beamspring_usb_util-0.5.zip

Beam spring technology, the hardcore gamer's new friend. Ultra-low latency (fast scan rates, no long debounce), full NKRO, low hysteresis switch, layers, and optional gold cable* (*not supplied by xwhatsit) :lol:
Last edited by xwhatsit on 06 Dec 2013, 05:13, edited 1 time in total.

xwhatsit

25 Sep 2013, 03:09

And here is a Mac build of the USB util.

Requires at least Mac OS X 10.7 I think.

Seems to be much slower fetching information over USB HID, so it sits there and spins the beachball for a few seconds when it's loading the keymap with the layers.

http://downloads.cornall.co/beamspring_usb_util-0.5.dmg

User avatar
damorgue

25 Sep 2013, 19:28

Looks like I need to get myself a beamspring board.

User avatar
Muirium
µ

25 Sep 2013, 20:22

Don't we all?

Argh, it's like I've caught buckling spring envy all over again!

Greystoke

25 Sep 2013, 21:29

damorgue wrote:Looks like I need to get myself a beamspring board.
Just thinking that myself...

For someone gingerly dipping a toe in the deep end of the beamspring pool, are there any guidelines on what to look out for? I've read about the rubber layer, but apart from making sure all the keys are there, is there anything I could tell from a picture that would give a clue to condition?

For example, there's one 5251 for sale on eBay at the moment. Is this a fair price, overpriced, or...?

http://www.ebay.com/itm/IBM-5251-Displa ... 0895940606

User avatar
Muirium
µ

25 Sep 2013, 21:56

Well, I saw a beam spring from that same seller for about half that price a couple of months ago. I was all lined up to get it as soon as my brother had finished his move to California when it vanished. Blast! The direct shipping from New York state to me in Scotland was more than the price of the keyboard, so my plan seemed a great score. But I just missed out. Might have accidentally cheated Dorkvader from it, too, as he had his eye on it as well until I sought his opinion.

xwhatsit

25 Sep 2013, 23:39

That seems to be a pretty consistent price, but occasionally you do see one much cheaper. I don't know how many people are buying them at that sort of price though; I think both of my boards were about half the price but I can't quite remember.

As for condition... I think replacement of the rubber is inevitable. My 3727 still had one mostly intact, but it was brittle and eventually gave up after me using the keyboard daily. Other than that... yeah, look closely at the keys (cracks, anything obviously bent over—the keystems are 2D, just punched flat plate). For the most part the keyboards are pretty damned robust (like that damned Oracle boat that just refused to break a mast :(), and despite my 3727 having a scuffs and bits of paint missing on the top shell where it's obviously taken a knock or two it's so overbuilt there's no real effect.

My 5251 is quite rattly and loose but it's hard to pick that up until you get the item in hand.

User avatar
Game Theory
Mr. Despair

26 Sep 2013, 01:32

I got my 5251 at about 1/2 the price as well. Think the seller above had two at about half price. Maybe when the one sold they cleaned up the other and raised the price :(

Greystoke

26 Sep 2013, 17:37

Thanks for the feedback! I'll keep my eye out for a more reasonably priced 5251, see what pops up.

Parak

27 Sep 2013, 16:39

Decided not to wait for the chance possibility of solenoid support, and just build the current version as I finally have some free time :P

Given that I've ordered the following mouser cart:

https://www.mouser.com/ProjectManager/P ... 4adc2c152d

could you advise once more which bits I'll need to add/replace for the current pcb revision? Might be nice to have the most relevant version of the cart in the sticky as well for those that want to do the DIY approach like me.

Great results on the reflow, btw. I do have some solder paste lying around in the fridge, but I think I'll stick to hand assembly for the first one as I don't have a decent toaster oven handy. Maybe a skillet.. hmm..

xwhatsit

29 Sep 2013, 22:37

Sorry for late reply, busy weekend!

- Replace the MCP4726 with a DAC101S101 (TSOT-6 package)
- You can drop the FSMSM switches (there are just test pads now so you can short them with a couple of screwdrivers, only needed in an emergency if the util won't get it back into the bootloader)
- You've got a LM339DT as well as the LM339ADR—drop the LM339DT
- The price I'm seeing on your cart for the 74HC4094s is horrendous, I would have thought (US-based) Mouser would have good prices on TI stuff. Try this guy: http://nz.mouser.com/ProductDetail/ON-S ... 8Ln6yXLhg=
- You've also got an additional MCP4726 (with a different I²C address), drop that as well
- Replace the special ABM8G crystal with a standard HC49US package, like this guy: http://nz.element14.com/jsp/search/prod ... KU=7940506
- Only 1 4.7K resistor needed
- The 18pF caps could probably be replaced by cheaper 22pF ones if the selected crystal is suitable
- You now need a couple of 20K resistors (0805) for the window DAC

What sort of edge connector have you managed to find? The Rev3 PCB can edge-mount either the narrow PCB-pin type or the wider solder-lug version. I find the wide solder-lug version easier to solder (the pins are flat, don't have a stiffening bend in them, so easy to bend down flat with a screwdriver when soldering the top side).

I've never tried skillet—some people get great results! Double-sided reflow could be tough though. If I do a Rev4 I'll definitely take reflow into account; mini-USB connectors are really designed to be mounted on the opposite side though, so that's annoying. For slow USB "Full" speed like with the ATmega32U2, chucking an extra couple of vias in one data line and crossing the lines over probably wouldn't hurt anything.

Parak

30 Sep 2013, 20:53

Done!

http://www.mouser.com/ProjectManager/Pr ... b06994aa1a

I'll be using the ebay connectors with lugs - it's even cheaper now than it used to be when I ordered them - grumble. Do you solder one side flat, and bend the other, or prebend so that they are sort of even?

On a side note, I'll be doing a parts and pcb order for the rev 3 boards as well as for a mchck - hoping to poke at it a little as a much cheaper teensy3 alternative.

Thanks again!

xwhatsit

30 Sep 2013, 22:40

Looks good.

Yep I solder one side flat first—the bottom side, as this is the side in the keyboard with less clearance. Then I go along with a largish flat tip iron and squish down the pin against the PCB with the iron whilst feeding in solder. I try to get a bend in the pin with the iron (you can put a fair bit of force down). I do all the pins like this; however of course as soon as you let go of the iron, the solder is still wet and the pin hasn't had any overform, so it will spring back and pop up. I then go back to the beginning with a small flathead screwdriver, and re-wet a pin, push the screwdriver down against it to hold it flat, move the soldering iron to the next pin, then once the solder has cooled on the first pin (and the next pin wet again) I move the screwdriver along to the next pin as well.

You can see the marks in the photos above where the screwdriver was. It's hard to make it look even, you end up using more solder than you need in the end (otherwise the first step doesn't have proper wetting), but it seems pretty robust and is the best bet outside of a proper right-angle through-hole connector.

mchck looks cool; in a few years we won't be bothering with 8-bit AVRs any more. I've been playing around with the STM32s to get some familiarity. Lots more complicated, but lots of fun!

Parak

01 Oct 2013, 18:42

xwhatsit wrote: mchck looks cool; in a few years we won't be bothering with 8-bit AVRs any more. I've been playing around with the STM32s to get some familiarity. Lots more complicated, but lots of fun!
I sure hope so, as the avr prices are highway robbery value wise compared to what one gets with the arm stuff :(

User avatar
Halvar

01 Nov 2013, 18:26

Is there still a way to buy either a PCB or a fully assembled controller at the moment?

Not yet sure if I'm up to the task, given that I never soldered any SMD so far, but I'd surely like to try to get my beam spring to work once it arrives.

User avatar
Muirium
µ

01 Nov 2013, 21:17

Last month an SSK and now a beam spring! And I thought my IBM collection was growing fast. Be sure to take some pictures and write up your first experience with it, for beam curious folk like myself. Above even Topre, they're the one feel that beats Model F and M, for me.

User avatar
Halvar

01 Nov 2013, 22:18

Yes, curiosity killed the cash ... Now I really hope I find a way to make it work, not just have it sitting in a box. :)

xwhatsit

02 Nov 2013, 00:08

Yep all of the code and PCB layout/schematic is open-source, so anyone can build there own at any time. I may have started this project but it doesn't mean I claim ownership over it :) Alternatively, I can build one of these whenever. The only `batch' kind of stuff is the PCB, which comes in minimum order of 3 and has 2 or 3 weeks lead time from OSHPark, which is no big deal.

What sort of board have you got?

User avatar
Halvar

02 Nov 2013, 00:26

Sorry, I just PM'd you in parallel before I read this because I didn't know if you still read here regularly.

My board is a 3278, I think it's the same model as Peter's. If you are offering to build a controller for me I'd be most happy to take that offer, but I'd also try to do what it takes myself if that's not possible.

xwhatsit

02 Nov 2013, 00:29

No sweat—just replied :) Yes I'm still building these if people ask, it's fun to break out my new reflow toaster oven :)

User avatar
Muirium
µ

16 Nov 2013, 09:55

When I do finally get a beam spring, you'll know. Because your controller is going straight into it!

Incidentally, someone else has worked on the same problem, and took a completely different route:
Image
The problem with a converter, however, being rollover. The beam spring's controller doesn't like to give break signals for most its keys!

xwhatsit

16 Nov 2013, 10:05

Wow how interesting! Any more details? I was a little nervous about going down that route because of concerns like make/break etc., and wanting to wrap my head around the capsense stuff, but that's very cool. The kbdbabel guy seemed to be going working on that technique with a variety of boards, don't know how far he got though. That's not him?

User avatar
Muirium
µ

16 Nov 2013, 10:08

The project's site:

http://www.ibmsystem3.nl/IBM3278/

He has a contact email address there if you'd like to get down and nerdy in the way that only people investigating the same problem can!

User avatar
Halvar

22 Nov 2013, 21:44

I got my controller from xwhatsit yesterday. Fully assembled thankgod -- I would never have been able to do the SMD soldering on this. I'm having great fun trying it out at the moment. I'll post pictures when I'm further down the road of getting it to work.

So first of all: a big thank you to xwhatsit for constructing this hardware/software and making it available to us/me. Switches feel awesome on this keyboard, and it's great to have a chance to use it on a modern PC.

I still have some bumps ahead, but what would be the fun without that?

The controller basically worked out of the box on my desktop computer. I still have a number of problems though -- haven't tried a lot yet to solve them, but I will post them now anyway, maybe someone has some Ideas that I can follow tomorrow. A few people here have gotten this to work after all. Thanks for any help!

1) Most keys work, but a lot, maybe a third of them, don't work reliably. You either have to press them for a second or more before they react, or the break signal is slow. This probably has to do with calibration of the threshholds, but it also happens after autocalibration in the USB tool.

2) the leftmost column of keys (column 1 in the tool, F1/F3/F5/F7) doesn't work at all. I can sometimes bring the F1 key to register by pressing it really long, but most of the time even that doesn't work, and the other three never work. Can I look up somewhere which pin this column corresponds to on the controller connector? Do the columns and rows on the USB tool correspond to electrical coumns and rows on the board?

3) I tried the keyboard on 3 different Windows computers. On my desktop (Windows 7 and Windows 8.1 dual boot), when I plug in the keyboard, I get 3 "USB Input Device" entries in Windows' device manager, and they all work (both in Windows 7 and Windows 8.1).
On the other two boxes (a Thinkpad laptop and an Intel Atom tablet, both running Win 8.1), only one of the three "USB input devices" works, and the other two entries show an Error 10 (device could not be started) in Device Manager, and a yellow warning sign. I tried disconnecting the controller and deinstalling the drivers in Device Manager, but the not-working devices just returned when I plugged in the controller again. I wonder if this could have to do with not enough current on the USB port or if there is some other problem.

4) The USB software tool only works on the desktop cmputer. The others say "no beamspring plugged in" when starting it, probably because of problem #3.

5) But also on the desktop computer, I can't really use the Windows USB tool. It will always work at first when I start it up, but after working with it for only a few seconds or up to a minute, I hear a Windows error sound, the mouse pointer becomes an hourglass (or the whirly animation formally known as the hourglass...), and the application doesn't react any more at all. Once this happens, the application never returns. Any Idea what the error sound could mean? Is the source code of this application available so I could try to run it in a debugger?

Cheers,
Halvar

mr_a500

22 Nov 2013, 21:59

Sorry to hear about your problems. The only problem I had was a randomly repeating "4" key probably caused by dirt or something under the key. (working fine now - typing with the keyboard now)

I'm surprised about the USB errors. I haven't had a single dropout - even using the keyboard on my notebook on battery power.

xwhatsit

23 Nov 2013, 00:12

The non-working keys are probably down to the autocalibration not really being accurate enough. You can manually adjust the threshold up (I think you'll want to be increasing it) until you get all keys working reliably. However I suspect that as you bring the threshold high enough to get the other keys to work, you will find one or more other keys appearing to be pressed even though they're not. This will be why the autocalibration is failing—it adjusts the threshold until all the keys `settle down'. Likely these keys will have some dirt flaky contamination layer or something on the sense pads that will need cleaning, it's happened with a few people.

Yes the rows/columns in the GUI util correspond to the rows/columns on the keyboard if you were going to strip it down.

The USB problems are definitely unexpected though, i haven't seen this before. I imagine the cases of the GUI util crashing on the desktop computer are down to the USB interface stopping responding for some reason—it doesn't expect the keyboard to `disappear', it will do something similar if I unplug the keyboard while the GUI util is running. So this will be related to the other problems you're having.

You will have 3 USB devices as it works very similarly to Soarer's converter; there is one interface which is a bog standard USB boot-mode keyboard, this should really only be used by the BIOS etc., the second interface is the communication between the keyboard and the GUI util, and the last interface is the NKRO interface.

The keyboard should only use a fraction of the 100mA or so allocated for it. The only time I saw something remotely similar was when I plugged in the controller misaligned to the keyboard PCB. The `fingers' on the keyboard PCB were between the pins on the controller connector and shorted out a couple of columns when scanning which caused it to drop off USB. This doesn't explain why you have a difference between your different PCs, but it's something to check?

I must admit I haven't tried this with Windows 8.1 (only Windows 7 machine of a coworker) but as it's all pretty much conforming to the USB HID spec it shouldn't really be an issue. If the connector is aligned well (as above), then you can try flashing the controller with the old v0.3 firmware (you must also then use the v0.3 util to talk to it, otherwise you'll have problems). This is pretty easy; from the util, hit `Enter Bootloader'. The keyboard will then disappear and you'll get a new USB device (named Atmel), and it will stay like that until you unplug the keyboard. You can flash the old firmware with Atmel FLIP (http://www.atmel.com/tools/FLIP.aspx). I see I haven't uploaded a precompiled firmware for v0.3, you can download it here: http://downloads.cornall.co/beamspring_ ... 3_v0.3.hex. If v0.3 works then that would be interesting as it only has two USB interfaces—the traditional `boot-mode USB' keyboard interface, and the generic interface for the GUI util. It ignores the NKRO stuff, which adds a fair bit of complication to the HID descriptors and may be tripping Windows up.

Anybody else running Win8.1 with v0.5?

All the sourcecode (including the GUI util) is attached to this thread (check first post for links to specific posts) if you're keen to debug it. The util is written in Qt so you don't need Visual Studio or anything silly, just download Qt Creator from their website and you can have at it.

User avatar
wcass

23 Nov 2013, 21:49

would this controller work with other capacitive type switches - like an F type switch?
how difficult would it be to change the matrix to 8x8, 8x12, 8x15?

User avatar
Muirium
µ

23 Nov 2013, 22:46

Good question! Could Xwhatsit take the lead in the Kishsaver race?
Image
Because Tinnie's discovery of the motherlode makes these particular, as yet unconverted, Model Fs highly anticipated!

Post Reply

Return to “Workshop”