Beamspring USB controller

woody
Count Troller

26 Mar 2014, 10:09

xwhatsit wrote:The ATmega32U2 shortage is a pain.
I have 10 pcs of ATmega32U2-AU in a tray, never got time for them.
PM me if you're interested. Located in Bulgaria / EU.

xwhatsit

26 Mar 2014, 10:17

Oh neat. If the Canadian ones turn out to be duds I'll let you know.

Meanwhile—nourathar—if you're bored of waiting, woody might be your answer!

mr_a500

26 Mar 2014, 18:02

xwhatsit wrote:I think there's been a paltry 12 produced by me.
That means there are at least 12 monstrous beam spring beasts alive and clicking again, free to roam the Earth, thanks to you. You're like the guy who started Jurrasic Park. :P
xwhatsit wrote:On a positive note, on Monday I submitted the Rev4 PCB for manufacture. In a couple of weeks I hope to have my hands on some tasty fresh boards.
Solenoid.. support... solenoid.. support.... (I chant like an impatient zombie) ....solenoid...

xwhatsit

26 Mar 2014, 21:07

Actually quantalume raised an interesting problem regarding the solenoid clicking, and I must say I'm really scratching my head over this one.

He talked about autorepeat and (hope he doesn't mind the quote) how ``Using the "dup" key to replicate a card was like holding the trigger on a machine gun.''

The problem is that USB keyboards just send key down and key up states. The OS handles the autorepeat, and the keyboard has no idea if the key is repeating or how fast etc. Banging the solenoid to match the key repeats on-screen becomes rather problematic.

This would be very cool to have (although not to everyone's tastes). Anybody have any ideas?

mr_a500

26 Mar 2014, 21:34

It would probably be best just to sound the solenoid once when the key is pressed down. It's probably not possible to match the autorepeat.

I already have all the machine gun fire I need. I've got my Mac (and Amiga) alert sound set as DOOM shotgun guy getting killed by machine gun - and I repeat it all the time. :D

nourathar

26 Mar 2014, 22:36

xwhatsit wrote: Meanwhile—nourathar—if you're bored of waiting, woody might be your answer!
thanks, but in fact I ordered 4 from RS and received them three days later, and now all of a sudden Farnell tells me that they are on the way, so I'll have some to spare soon. I did not have time to try the soldering yet, after this week that should be possible. Can't wait to actually type on that thing !

And please note that I bought 30 connectors instead of 3, so I have some of those to spare too !
If anyone still needs some of those, I'll be happy to send them if the receiver pays shipping..

User avatar
kps

27 Mar 2014, 02:57

xwhatsit wrote:For now I have taken a risk and ordered six from a Canadian seller on eBay. He seems to have good feedback... hope they're legit chips! Never bought ICs from eBay before.
I'm ordered from them in the past. Legit.
xwhatsit wrote:This would be very cool to have (although not to everyone's tastes). Anybody have any ideas?
The keyboard could insert fake up and down events before the host's repeat kicks in.

REVENGE

27 Mar 2014, 05:26

"Wong-Cornall"

:o Looks like the upcoming 60%s will be of a multi-national, collaborate design. 8-)

User avatar
Muirium
µ

27 Mar 2014, 09:45

kps wrote:The keyboard could insert fake up and down events before the host's repeat kicks in.
Ducky and CM boards optionally do this (they have a range of "rapid fire" speeds, selectable via shortcut) and it's maddening for anyone actually trying to type. Not advised!

Better for the keyboard to accurately reflect its own state, I think. And let the computer's software repeats go silently, for the phantoms that they are.

User avatar
E TwentyNine

27 Mar 2014, 14:30

Or simply have a timer that clicks the solenoid every n ms the key remains pressed. Doesn't matter if it matches the onscreen repeat rate, just so you get the noise.... :)

nourathar

27 Mar 2014, 15:00

Muirium wrote: kps wrote:The keyboard could insert fake up and down events before the host's repeat kicks in.

Ducky and CM boards optionally do this (they have a range of "rapid fire" speeds, selectable via shortcut) and it's maddening for anyone actually trying to type. Not advised!

Better for the keyboard to accurately reflect its own state, I think. And let the computer's software repeats go silently, for the phantoms that they are.
Hmm, why is that maddening ?
The Northgate Omnikey that I use as my daily driver does the same: the autorepeat delay and speed are configurable on the keyboard, and I have no issues whatsoever. Speed can go ridiculously high, which is funny and which can be surprising if you forgot about it.
I have to admit that autorepeat is not something I use a lot, but I would think that generating the autorepeat events from the keyboard is the cleanest way to solve the solenoid click syncing issue.

Why not make it an option that can be configured in the firmware ?
That way, people can have keyboard-generated autorepeats with sync solenoid clicks if they want (and if they know how to disable the system-generated autorepeats), or they can have one click per keypress (and their autorepeat generated by their system, as usual).

User avatar
bhtooefr

27 Mar 2014, 15:36

USB and PS/2 use different methods of autorepeat.

USB does it in the OS, PS/2 does it in the keyboard.

User avatar
Muirium
µ

27 Mar 2014, 16:22

nourathar wrote: Hmm, why is that maddening ?
OOhh nnooo rrrreeeeaasssononn rrreeeaallllyy.. III sssuuuppppppooosssseee iiit'''s qqquuiuiite uuusssseeeffffuuulll fffforrr hhhaarrrddddccccooorrreee bbbuuuttttttoooonnn mmmaaassshhhiiinngg.... BBBBBuuuuutttttt ttttttthhhhahtttttt'''''sssss nnnnnnnooooooot ssssssooomommmeeeeeeetttttthhhhhhiiiinnnngggg IIIIII eeeeeeevvvvvevrrrrr dddddddooooo.....

That's a 100% authentic example of it in action, by the way. I went up through the three speeds (controlled by Fn+F1 to F4 on the CM), one per sentence. Even the lowest setting (Fn+F2) is unusable while typing. It's entirely a game cheating feature, I assume. And does really catch you out if you trigger it accidentally. I helped someone new here "fix" their Ducky recently when they had no idea why it was malfunctioning. I'd rather the manufacturers triggered it via a hot key rather than toggling with a mode.

But you're quite right otherwise. Tone down the speed and make it easy to escape when your beam spring goes berserk!

JBert

27 Mar 2014, 16:35

Muirium wrote:I went up through the three speeds (controlled by Fn+F1 to F4 on the CM), one per sentence.
Huh, seems they called it "QuickFire" for a good reason.

User avatar
Muirium
µ

27 Mar 2014, 16:48

zzzzzzziiiiiinnnngng!!!!!

quantalume

28 Mar 2014, 05:18

xwhatsit wrote:Actually quantalume raised an interesting problem regarding the solenoid clicking, and I must say I'm really scratching my head over this one.

He talked about autorepeat and (hope he doesn't mind the quote) how ``Using the "dup" key to replicate a card was like holding the trigger on a machine gun.''
Actually, I had in mind the IBM 029 keypunch when I said that. But I do remember the 3278 keyboard solenoid firing multiple times for key repeats.

I have all the parts and am assembling the first one. The ATmega enumerates when I plug it onto the USB port, so it's looking good so far. The DACs that I got have no pin 1 mark. I guess we have to go by text direction on that one? I just have to add the passives and the 60-pin connector and I'm done.

xwhatsit

28 Mar 2014, 05:24

Neat!

Yes the DACs are a pain not having the mark; if you look closely in the datasheet you can see that you're supposed to figure it out from the feedtape that they were supplied in (which side the sprocket holes are on). However I have had success every time by using the text direction... no guarantees though. My DAC101S101s have text that starts with X so I use that as the pointy end, easy enough to see.

Good luck!

quantalume

29 Mar 2014, 03:29

I finished the board and successfully programmed it with FLIP. It shows up in both Windows and Linux as a HID. Here's the dmesg dump:

Code: Select all

[   63.425446] usb 2-1.1: new full-speed USB device number 5 using ehci-pci
[   63.767661] usb 2-1.1: New USB device found, idVendor=0481, idProduct=0002
[   63.767670] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   63.767675] usb 2-1.1: Product: Beamspring-USB
[   63.767679] usb 2-1.1: Manufacturer: TC
[   63.772600] hid-generic 0003:0481:0002.0003: No inputs registered, leaving
[   63.772764] hid-generic 0003:0481:0002.0003: hidraw2: USB HID v1.11 Keyboard [TC Beamspring-USB] on usb-0000:00:1d.0-1.1/input0
[   63.776286] hid-generic 0003:0481:0002.0004: hiddev0,hidraw3: USB HID v1.11 Device [TC Beamspring-USB] on usb-0000:00:1d.0-1.1/input1
[   63.780279] input: TC Beamspring-USB as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.2/input/input14
[   63.780530] hid-generic 0003:0481:0002.0005: input,hidraw4: USB HID v1.11 Keyboard [TC Beamspring-USB] on usb-0000:00:1d.0-1.1/input2
However, I'm getting no response at all from the keyboard. I'm pretty sure I've got it connected to the pad card properly--ground and the ATmega are on the left and the four return lines on the right. Any suggestions? I'll check the soldering again.

quantalume

29 Mar 2014, 04:14

So...ahem...I see that the chassis ground is really important. :oops: Works great now! :D
Last edited by quantalume on 29 Mar 2014, 08:46, edited 1 time in total.

xwhatsit

29 Mar 2014, 05:39

Congrats!

See everyone, not so hard! You don't need some hamfisted kiwi on the other side of the world with a toaster oven to do it for you :D

Yeah the chassis is actually separate from the ground `planes' (really just surrounding traces) of the keyboard itself; the original controller was used to bridge the two (the screwholes attaching the controller also had ground traces that the screw touched), so it doesn't act as a very good noise shield. I had problems with excessive interference more than no response entirely—but if you were trying to use autocalibrate the noise may have been defeating the crude algorithm.

Good job! We all expect pictures!

xwhatsit

29 Mar 2014, 05:51

REVENGE wrote:"Wong-Cornall"

:o Looks like the upcoming 60%s will be of a multi-national, collaborate design. 8-)
Hehe yeah. New revision, new double-barrelled surname.

I think I'll just have to suck it and see with the solenoid. Right now I'm not liking the fake key-press/release/press/release scenario as it means keeping track of a whole bunch more state, and also to make certain keys not repeat based on scancode (shift, break etc.). I can see that this might cause some interesting things to happen in certain applications that monitor key state rather than individual `clicks'; I'm almost certain it would wipe out certain chorded key combinations I use in my tiling window manager for instance.

If the autorepeat solenoid jackhammer mode is desirable then maybe just a configurable delay + repeat rate from the GUI util would suffice. Different OSes seem to behave differently (I used a Macintosh once, it seemed to have a repeat rate of 1Hz :shock: ), and I know I set my delay unusually to 300ms (xset r rate 300 in .xinitrc).

quantalume

29 Mar 2014, 08:29

xwhatsit wrote:Good job! We all expect pictures!
I picked up a nice braided USB cable.
Image

I slotted the end of the connector so it would seat all the way in on the right side.
Image

I need to lower my keyboard drawer now so it will slide under the desk.
Image

A nice close-up of the pearly-white double shots.
Image

I'm thinking of painting the case this color. It's called "oil-rubbed bronze."
Image

REVENGE

29 Mar 2014, 09:13

quantalume wrote:
xwhatsit wrote:Good job! We all expect pictures!
I picked up a nice braided USB cable.
Image

I slotted the end of the connector so it would seat all the way in on the right side.
Image

I need to lower my keyboard drawer now so it will slide under the desk.
Image

A nice close-up of the pearly-white double shots.
Image

I'm thinking of painting the case this color. It's called "oil-rubbed bronze."
Image
8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-)

nourathar

29 Mar 2014, 12:38

great !

quantalume

29 Mar 2014, 18:04

I want to take a moment to thank xwhatsit for his contributions to the community. My 3278 keyboard sat in the garage for something like 10 years while I waited for enough free time to design and build a controller. I learned programming on one of these in the 1970s, so there was a lot of sentimental value to me in resurrecting it. Xwhatsit's design is very elegant and thorough, especially when you consider the software utilities he includes. I was going to use analog multiplexers and phase-locked loops, but I think xwhatsit's is a more workable design.

To answer the question about the odd 3.96 mm connector spacing, this was actually quite common back in the day. It corresponds to 5/32" and was used on a lot of backplanes. I put together a fair number of prototypes using boards like this:

Image

xwhatsit

30 Mar 2014, 01:19

You're most welcome! I copy you 100% on the `free time' factor—so many fun things to do but never enough time to do them :) Lucky you learning programming on some nice hardware like that. My sentimental beginning-programming memories are of sandwich-foam C64 keyboards and some horrible Acer 386 with scratchy stiff ALPS.

I wondered about a frequency-measuring approach as well (seems to be common with capacitive touch screens), but due to my inexperience with these analoguey-type-things I was worried that a slow frequency would lead to slow scan rates, and a high enough frequency would lead to a lot of scary high frequency noise inside that metal box that would be hard to filter and give other headaches. I'm more than likely wrong about that, but I decided the method used on the IBM patent method (and the keyboards themselves) was a nice tidy method, as all that is necessary is a threshold (on or off) rather than a full discretised range.

Ah yes imperial! Thanks to you delightful Americans and your dominance of the electronics industry I've learned many other interesting numbers, like 7.62, 2.54, 0.254, 0.2032, 0.1524 and the curious system of 0805 (or 2012M), 0603 (or 1608M) and 0402 (or 1005M) :) Luckily SMT is starting to rationalise and now we can use nice numbers like 1.6, 1.25, 1.0, 0.8, 0.5 and 0.3.

Eurocard is an interesting one with a bizarre mix of both systems; card height is 100mm, but for each step in size increases by 133.35mm (5.25 inches). The length on the other hand is also 100mm, however increases by 60mm steps. The connector (same as VMEbus) uses that crazy 2.54mm number again.

Thank goodness we no longer have to lay this stuff out at 3x scale with stickers and bits of tape!

REVENGE

30 Mar 2014, 01:40

Americans, in turn, thank the SAE.

quantalume

30 Mar 2014, 05:18

xwhatsit wrote:Lucky you learning programming on some nice hardware like that. My sentimental beginning-programming memories are of sandwich-foam C64 keyboards and some horrible Acer 386 with scratchy stiff ALPS.
Speaking of old switches, I still have a bunch of these laying around:

Image

They are Honeywell hall effect switches. I used exactly two of them, a "1" and a "0," in the first computer I designed about 40 years ago. I used to assemble my code by hand (was easy since the early Intel instruction sets were based on octal) and type the whole program in as a sequence of 1s and 0s. There was absolutely no bounce in those switches, so I simply fed the outputs into a shift register and address counter.

User avatar
Muirium
µ

30 Mar 2014, 11:53

Ah, Honeywells. I have a few of those, too, but they're all in this keyboard:

http://deskthority.net/photos-videos-f8 ... t6296.html

How do you use them, electrically speaking? And do you fancy sharing a few spares with the community? I know plenty of people who'd love to try one of this legendary smooth linear switch.

quantalume

31 Mar 2014, 04:20

Muirium wrote:Ah, Honeywells. I have a few of those, too, but they're all in this keyboard:

http://deskthority.net/photos-videos-f8 ... t6296.html
Ah, very nice. I once had a similar Honeywell keyboard, but somewhat smaller and without any encoding circuitry. Sadly, it's long gone. :cry:
How do you use them, electrically speaking?
Two of the four pins go to the power supply, and the other two pins are open collector outputs, like this:
Image
The pair of open collector outputs were essentially an open circuit when the key wasn't pressed. so you could wire them together in standard matrix fashion.
And do you fancy sharing a few spares with the community? I know plenty of people who'd love to try one of this legendary smooth linear switch.
I doubt I have enough to supply all interested parties, but what would you think about creating a roving package of unusual and/or out-of-production switches? I could contribute one assembled and one disassembled Honeywell switch, like this one:
Image
One neat feature of this design was the self-adhesive, double-sided tape on the bottom plate. This allowed one to stick the switch in place while the PCB was turned over and soldered.

Post Reply

Return to “Workshop”