This Miniscule IR To HID Keyboard Hides In A Key Cap

Shards of silicon these days, they’re systematically taking what used to be rather complicated and making it dead simple in terms of both hardware and software. Take, for instance, this IR to HID Keyboard module. Plug it into a USB port, point your remote control at it, and you’re sending keyboard commands from across the room.

To do this cheaply and with a small footprint used to be the territory of bit-banging software hacks like V-USB, but recently the low-cost lines of microcontrollers that are anything but low-end have started speaking USB in hardware. It’s a brave new world.

In this case we’re talking about the PIC18F25J50 which is going to ring in at around three bucks in single quantity. The other silicon invited to the party is an IR receiver (which demodulates the 38 kHz carrier signal used by most IR remotes) with a regulator and four passives to round out the circuit. the board is completely single-sided with one jumper (although the IR receiver is through-hole so you don’t quite get out of it without drilling). All of this is squeezed into a space small enough to be covered by a single key cap — a nice touch to finish off the project.

[Suraj] built this as a FLIRC clone — a way to control your home-built HTPC from the sofa. Although we’re still rocking our own HTPC, it hasn’t been used as a front-end for many years. This project caught our attention for a different reason. We want to lay down a challenge for anyone who is attending SuperCon (or not attending and just want to show off their chops).

This is nearly the same chip as you’ll find on the SuperCon badge. That one is a PIC18LF25K50, and the board already has an IR receiver on it. Bring your PIC programmer and port this code from MikroC over to MPLAB X for the sibling that’s on the badge and you’ll get the hacking cred you’ve long deserved.

[via Embedded Lab]

22 thoughts on “This Miniscule IR To HID Keyboard Hides In A Key Cap

      1. Also called “Pertinax”, much cheaper than GF-epoxy.
        But one time I also had a light brown/beige/light yellow (difficult to name non primary colors) version. It was harder than the one shown in the picture, but definitely not GF-epoxy. Perhaps it was some kind of paper reinforced epoxy compound.

  1. A hint – if you make PCB’s this way – make the pad holes as small as the software will allow. It makes it easier to visually center the drill bit and the extra copper also helps guide the drill to the center of the pad.

    1. Also, how am I gonna impress my hipster friends with a MCU called PIC18F25J50, that’s dry as hell… needs to be african for herder of gnus or something…. or Neuromancer XT Turbo V6i

  2. Over all I like the keycap use as assembly shell. And What is nice about those PIC18F* is that don’t need a crystal as the internal oscillator lock on USB clock from the host. This feature is also available in some PIC16F* family.

    1. digispark uses attiny85 which has just 8kb flash while pic18f25j50 has 32kb. also the attiny85 has larger footprint than the one i used.. so It’s not same size.. mine is smaller.

      I agree that working on digispark is much easier…. but i wouldn’t call it “building” something.

      1. attiny45 with 4kb in a tssop-8 would also work and is a really small part. You’d probably need to use the USI engine to shift in data from the IR LED and examine it when you have time to do so. V-USB can introduce a lot of latency and you’d be likely to miss some IR bits if you were trying to read it raw.

Leave a Reply to Suraj BhawalCancel 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.