geekhack
geekhack Projects => Making Stuff Together! => DIY Discussions ARCHIVE => Topic started by: nanu on Sat, 29 August 2009, 10:28:12
-
You could also try something like pin sockets (http://www.allelectronics.com/make-a-store/item/SIP-30/SNAPPABLE-30-PIN-SIP-SOCKET-.1-CENTERS/-/1.html) between the PCB and the LEDs, to afford capricious swappability.
-
I think there is no possible way (at least under windows) to make the LED state change without the actual key state changing. So your idea regarding the wpm-o-meter might not work out, since as soon as caps lock comes in it would stArT mAkInG yOu TyPE likE thIs.
-
I think there is no possible way (at least under windows) to make the LED state change without the actual key state changing.
Actually, there is. You use IOCTL_KEYBOARD_SET_INDICATORS (http://msdn.microsoft.com/en-us/library/ms791035.aspx). Here's a demo project (http://www.codeguru.com/cpp/w-p/system/keyboard/article.php/c2825).
-
Actually, there is. You use IOCTL_KEYBOARD_SET_INDICATORS (http://msdn.microsoft.com/en-us/library/ms791035.aspx). Here's a demo project (http://www.codeguru.com/cpp/w-p/system/keyboard/article.php/c2825).
Interesting. Just compiled the sample source and it does not seem to work though. Telling me scroll lock should be flashing, just that it does not. Have you used this method before? Any idea what might be the problem? Keyboard is connected using USB.
-
Yeah, I once used a plugin for winamp that flashed the leds without me SuFfErrInG sTuDLyCaPs.
-
Interesting. Just compiled the sample source and it does not seem to work though. Telling me scroll lock should be flashing, just that it does not. Have you used this method before? Any idea what might be the problem? Keyboard is connected using USB.
Okay, just tested with a PS2 keyboard. Works flawless. I converted the example code to .net and I am now able to use the .dll in my own applications. This is great stuff. Thanks for sharing the link!
-
That method is great stuff. A friend helped me out a bit and these are the results so far:
My next idea would be to make a MB SENSO/SIMON clone that could use only the keyboard LEDs with the according keys below (/, *, - on numpad) - along with the pc speaker beep. How freaking cool would that be? I will start writing that tonight, maybe.
-
that is crazy
-
Interesting. Just compiled the sample source and it does not seem to work though. Telling me scroll lock should be flashing, just that it does not. Have you used this method before? Any idea what might be the problem? Keyboard is connected using USB.
It doesn't work because the sample code is not PnP-aware (hyphen correct?). It just tries to access the first keyboard device (which is often, but not necessarily, a virtual one) in an obsolete way.
The right approach is to enumerate all GUID_DEVINTERFACE_KEYBOARD (http://msdn.microsoft.com/en-us/library/bb663141.aspx) instances by using the SetupAPI (http://msdn.microsoft.com/en-us/library/ms791318.aspx) and RegisterDeviceNotification() (http://msdn.microsoft.com/en-us/library/aa363431.aspx).
Alternatively, you can set ConnectMultiplePorts and SendOutputToAllPorts in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass\Parameters to 1 (and restart) in order to run the keyboard class driver in compatibility mode.
-
Should have gone with the pink (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=67-2062-ND) ones.
-
The typical Vforward of a red/green/yellow LED is about 1.6-1.7V, as long as you choose a blue LED with the same or higher Vforward you will draw the same or less current so you should be fine.
If you have a multimeter with a diode checker (look for the --|>|--- symbol), you can be even safer and use it to measure the forward voltage.
-
Hi, electronics newb here.
Since the Vforward of blue/white LEDs is usually 3V or more, is it possible that I could
just replace resistors somewhere, for a keyboard that has dim green LEDs?
-
1/(1/r1+1/r2) is the resulting parallel resistance =P.
You run the risk of damaging the output of the controller if you start drawing too much power from it, so be careful decreasing the resistance.
To calculate the current that the old LED was drawing, you need to know the output voltage (probably +5v in most cases), the Vforward of the LED, and the resistance.
I = V/R = (Vcc-Vforward)/R = (5-Vfoward)/R in most cases.
Given that initial current, you can compute the new resistor needed to maintain the same current draw with (this is the Vfoward of the new LED):
R = V/I = (Vcc-Vfoward)/I = (5-Vfoward)/I
Then pick the next largest available standard resistance value.
That should guarantee its as bright as can be, without risking any damage to the controller.
-
Alternatively, you can set ConnectMultiplePorts and SendOutputToAllPorts in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass\Parameters to 1 (and restart) in order to run the keyboard class driver in compatibility mode.
This does not seem to work - I just checked and this reg entry is already set to 1 for me. Any idea?
-
May be time to start your own LED Blinkomatic post.
good call!
-
Sorry to dig up this old post, but I too would be thrilled if one of the software guys could come up with a windows program (or browser plug-in?) like Ripster proposed.
There are a lot of interesting/semi-useful things that could be done with the leds, just to brainstorm: volume display, a programmable tea timer, custom alerts (email, messaging, etc), Ripster's rad WPM idea, a blink for each key pressed (two-three for combos), BPM display in audio players, 3-2-1 countdowns for things like power/sleep on/off, etc.
I'm a space-saver user and can imagine the usefulness of this, I'm sure the normal-sized M users could come up with wilder ideas. I won't pretend to know how any of the programming works though :)
-
The more relevant thread is maybe http://geekhack.org/showwiki.php?title=Island:7031
-
I can confirm 3.2V LEDs seem to work (http://geekhack.org/showwiki.php?title=Island:9765) on blue Mx Filco boards, no side-effects so far...
Whats the worst that can happen?
From my understanding it's just that the LEDs won't get enough voltage so they run dimmed, or simply not at all, no?
-
USB specs: 5V, 0.5A -> 5V * 0,5A = 2,5W
Hard to believe 2,5W is enough to start a fire! :P
-
My bet: A defective USB port running way over specs, that, or a cigarette...
-
My bet: A defective USB port running way over specs
Which reminds me, I have a USB keyboard that clearly states a max rating of 5V 1.07A on the label. WTF is that?
(http://geekhack.org/picture.php?albumid=33&pictureid=252)
-
Just noticed some extensions of the USB specification (USB On-The-Go) allow up to 1.5A for USB1 and up to 1.8A for USB2,
which was introduced for faster charging of mobile devices such as cellphones and MP3-players... >.>
-
That keyboard is from 98/99ish. I don't think that was even "USB1" material yet; wasn't there a pre-USB1 implementation that really REALLY sucked?
(I mean the sort of thing you find on Socket 7 mobos from 1996, 1997)
-
I can confirm 3.2V LEDs seem to work (http://geekhack.org/showwiki.php?title=Island:9765) on blue Mx Filco boards, no side-effects so far...
Whats the worst that can happen?
From my understanding it's just that the LEDs won't get enough voltage so they run dimmed, or simply not at all, no?
Just make sure you add a resistor in there (http://led.linear1.org/why-do-i-need-a-resistor-with-an-led/). Just chaining them could cause a blow-out of the entire chain should one LED be overloaded and drop in resistance.
They also have a LED calculator (http://led.linear1.org/1led.wiz).
-
Still don't understand...
It seems logical that you need to add resistors when operating 2.2V (ie. red) LEDs on sockets for 3.2V (ie. green/blue/white/uv).
But when operating 3.2V LEDs on a 3.2V or 2.2V socket, you shouldn't need a resistor, and as I didn't change the circuit, the chance for a "blow-out" should be the same, no?
-
My bad, you wanted to replace existing LEDs. I was mistaken because I've seen you talking about USB's 5V supply...
In that case you're right: the resistors already on the keyboard should be sufficient. You may still risk to draw too much current through some switching transistor, although those should be up to the load if the keyboard was designed well. Just don't add LEDs where there were none before.
-
Actually a blinking LED might be a nice addition for the Caps Lock.
If any of you play any online games, you'll notice a lot of the kids TYPE IN CAPS OFTEN. AND I, FOR ONE, FIND IT VERY ANNOYING. :P
Perhaps a blinking LED would set them straight? I'll have to suggest that mod to my youngest brother, who is an avid gamer!
Better yet, I recently bought one of these (http://gizmodo.com/255567/bull****-button) "Bull****" buttons. Perhaps the circuitry and speakers could be ripped out and placed inside the keyboard to repeat indefinetely while the Shift or Caps Lock keys were active.
That would be rockin'!
-
Yea, ice is better to cool down with in the summer. I'm gonna accrue some debt, when those get done. Although, aside from occasional hail that maybe bounces once before melting, it is not like I see much in the way of ice, near the seashore.
I prefer mellow LEDs, though. Green is easier on the eyes, than red, unless you are color blind?