Quick Key Adapter, 10 Button HID Keyboard using PIC18F14K50
Quick Key Adapter, 10 Button HID Keyboard
Such as: Alt+F4 for Close Program, Windows+D to Show Desktop, Minimize Window, Maximize Window, Multiple Launch Program or Emulator, Alt+Ctrl+Del, Coin Buttons for players 1 and 2,
The custom hardware(circuit) is based on Microchip Solutions sample “USB Device HID Keyboard” firmware for the Low Pin Count USB Development Kit which uses a 18F14K50. The development kit is not required to recreate this as included here is a schematic, PCB layout and firmware to build one from scratch.
It does not require any external power supply, it draws from the USB host. All the keycodes are set in firmware and are for Windows based OS’s, additional OSs could be used but the keycodes would have to be changed in the firmware.
If someone would like to send me key codes for a different OS, I will put together the firmware and post it to this Instructable.
Included in the ZIP below is PCB Layout, Schematic, diagrams, MPLAB project files, HEX file, readme, and the datasheet. Or you can view the HID Quickkey USB Adapter Datasheet or Visit the Website for Updates, Downloads and Details.
The Eagle files for the PCB can be found as a separate download.
DISCLAIMER: Recreate this project at your own risk. There is always risks when building your own electronics, be careful. Damage to the computers USB bus is possible, but not probable when everything is built correctly.
Parts and Supplies
Basic Kits including the programmed PIC, without buttons and wire are also available.
- PIC18F14K50 – DIP package, Buy One Programmed
- 2x 10k 5 bused resistors Like This
- USB Type B Socket
- 12 mhz Oscillator, series*
- 0.1uF disc Capacitor
- 220nF disc Capacitor
- 4 pin Header, such as Molex KK6410
- 4 pin Housing, such as Molex KK 6471
- 6 pin Header, such as Molex KK6410
- 6 pin Housing, such as Molex KK 6471
- Crimps, Molex KK 4809
- Wire, solid strand and stranded
- Printed Circuit Board or Perforated Proto board and solid strand wire
- 10 Normally Open Push buttons, board mount
- USB Type B to Type A cable(most devices such as printers use them) Buy One
*Normal crystal oscillator can be used, just add a 22pF capacitor from each OSC pin to ground.
- Soldering Iron
- Wire Strippers
- Diagonal Cutters
If Purchasing A PCB or Making one yourself, have it ready before beginning this step. Perforated board could also be used, then just follow the schematic.
The silkscreen PCB layout image included in the ZIP in Step 1 should be accessible for this Step, it shows the parts layout.
– Start with the 20-pin socket, the notch on the end marks the Pin 1 end. Carefully insert it, ensuring all pins line up.
– Resistor Buses are next, they each have 5 10k resistors in parallel within them with a common pin on one end, The common pin, which is marked with a dot on the SIP package should be lined up with the printed dot on the end of RN1 and RN2.
– Oscillator, ensure the solder joints are shiny and designing your own board, it should be as close to the MCU as possible.
– Capacitors C1 & C2: C1 is a 100nF disc cap for decoupling, C2 is a 220nF capacitor connected between the MCU’s VBUS pin and V+.
– Resistor R1 pulls the Data+ line high, which signals to the Host what USB speed the Device runs at.
– USB Receptacle: It only goes in one way, Bend the mounting pins outward once it is in the board, solder all the contacts ensure their good joints. Make sure the solder doesn’t bridge, as the contacts are quite close together.
– Headers: The polarized headers go in now, they can go in facing either way, there is a 4-pin and a 6-pin.
– PWR: Unused power header, leave it empty but solder over both pads. It is there in case more power than the bus can provide would be needed if the device was repurposed.
– Jumpers:Lastly the jumpers are installed, using these means that single sided copper circuit board can be used. Use some solid strand wire. And avoid other touching other parts, especially bare wire line on a capacitor.
- J1 is jumped to J2
- P1 is jumped to P2 which is jumped to P3. solder 2 wires into P2, then one wire each goes to P1 and P3.
- G1 and G2 are left open, explained in the next step.
- RX and TX are also left open and are not used, but are connected to the USART.
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw
Current Project / Post can also be found using: