Quick Keyboard Hack To Control Heavy Loads

When you want to control an external device (like a lamp) from your computer, you might reach for a USB enabled micro. Looking for an inexpensive and quick option to control two lamps [Pete] wanted to control a couple 12 volt halogen lamps, he reached for his keyboard and used a little bit of python.

Desktop PC keyboards have 3 LED’s indicating lock functions, hardly anyone uses the scroll lock, and on a laptop with no keypad, numlock is no big loss as well. Adding wires to the little PCB out of a USB keyboard the numlock and scroll lock LED’s 5 volt output was redirected to a switching circuit.

That switching circuit takes the output of either LED, inverts it with a PNP transistor, then connects to the gate of a FQP30N06L, “logic level” mosfet transistor to handle the heavy lifting. Once the wiring is in place a fairly simple Python script can take over turning on and off the two chosen lock keys, giving  control of up to 32 amps with the touch of a button.

21 thoughts on “Quick Keyboard Hack To Control Heavy Loads

    1. Where are you buying your keyboards from? Or, alternatively, where are you buying your teensys from? You can usually pick up a keyboard for a couple of quid; even less if you pick up someone elses old one. teensys are usually about £20ish

  1. PIC 18F2550 is about $2 on eBay, it has native USB interface, 2k of RAM, runs at up to 96MHz … also there is that thing called Arduino Nano.
    However this is the cool hack, giving some purpose to scroll lock LED is nice option. I wish some keyboard manufacturer realized that and put general purpose out connector on keyboard.

  2. How odd, I was considering doing this very thing with my keyboard a couple weeks ago, I was going to glue an LDR to the scroll lock LED of the keyboard instead of hacking it open though. But I keep my keyboard on my lap most of the time and I don’t want to deal with extra wires coming off it. I suppose that could be remedied with change to a cord with more wires though…

  3. On most laptops with no numpad some of the ordinary keys become the numpad when Num Lock is on (for me UIO becomes 456, JKL becomes 123 etc.) S6 5f 5 d5d th5s, th5s 5s what everyth5ng 5 ty*e w643d 3662 352e when the 3a0* was 6n.

  4. MAME has long supported mapping some of the original games’ cabinet lights to LEDs – I think even the Q*Bert pinball thumper can be triggered via CAPSLOCK light or something. Atari had several games with individually lighted Player 1 and 2 “volcano” buttons once you had put in enough coins.

  5. Cool idea have done similar things when I was a teenager and didn’t yet have microcontroller powers. On another note this post makes me miss parallel ports…

    Oh also I wonder what type luck one would have use a pre-amp circuit wired directly to an audio output through some passive highpass/lowpass (notch?) filters interfaced with a flip/flop. Turn on tone once lamp on again lamp off.

  6. Use another USB keyboard circuit board and cable gutted to do this, then plug it into your system. Run USB to the hacked control remotely located. No hack on your normal keyboard. I want to mute the radio tuner at the sound mixer which includes computer sound, it’s a few feet away from the chair and desk. The only thing I can’t control is the radio from the computer.

    This came up on a search of scroll lock hacks. Playing with the little board from a texter that also had the mute and volume buttons on it I wanted to mute the volume of the computer at the stereo with this board and a big pushbutton. Then it occurred to me, what happens when I hit one of the lock buttons on the computer keys? The light comes on on the slave keyboard too!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.