Programmable Keypad Rev B

by f5AFfMhv in Circuits > Arduino

2238 Views, 49 Favorites, 0 Comments

Programmable Keypad Rev B

main.png
bottom.png
side.png

This is second hardware revision for Programmable Keypad project I made some time ago. General concept and code for this project has not changed. So please check original post for this project if you want to get better understanding about it.

In a nutshell this device is a Keypad which uses Arduino Pro Micro as keyboard emulator. Each button sends key press combination over USB which is mapped to some particular action on operating system.

Supplies

bom.png


  • Wire, solder, soldering iron, etc.
  • (Optional) Some heavy base for keeping keypad from sliding, I'm using old 3.5" HDD

Schematic

power_connector.png

Schematic is mainly unchanged from previous revision. All connections to Arduino Pro Micro are the same to keep compatibility with existing firmware.

One addition to this revision is PC and home server power control buttons. I have my devices on the floor and power buttons are not in the most convenient location for me. So I decided to bring them to my Keypad.

Inside each computer I soldered 2 additional wires to a power button. Then I snaked them to the back of computer where I drilled 6 mm hole in a motherboard shield for 3.5 mm audio socket.

This allows me to use male-male audio extension cords to bring PC and server power control to my Keypad. I chose audio jacks and connectors for these reasons:

  • easy to find 3.5 mm sockets in various shapes and sizes. I use SMD sockets on keypad and panel mount sockets on PC and server;
  • readily available various length male-male audio extension cables. I use 2 m length extension cables with straight plug on PC/server end and right angle on Keypad end;
  • this type of connector can be easily disconnected and reconnected as orientation does not matter.

Downloads

PCB

pcb_bottom.jpg
pcb_top.jpg
kickad_image.jpg

PCB was designed using KiCad 6. I decided to reuse old hard drive as keypad base so this decision influenced board dimensions. PCB is 145x100 mm with 3 mm holes added for mounting to hard drive. Additional mounting hole added to each board corner.

All inputs (Arduino USB and 2x 3.5 mm audio sockets) are put on the left side of Keypad. I didn't want that traces or vias would be visible from the top side, so I put all traces on the bottom layer with copper fills on both top and bottom. Where vias are needed they are put on areas which will be covered by other devices like push buttons and rotary encoder knob.

Keypad has three zones. First has rotary encoder for volume control and buttons for PC shutdown, VPN connection, light control, performance monitor and tab open/close functions. Second zone is for application shortcuts and third one for PC and server power control.

Application and function icons were imported from ordinary png images using KiCad image converter tool. Function icons were exported to silkscreen layer and application shortcuts to solder mask layer.

On the bottom layer I added legend for the shortcuts and their corresponding buttons on the top side.

You can clone KiCad project files from GitHub.

Assembly

bottom3.png
foam.png

Assembly is pretty straightforward. I wanted to use only SMD components and I had 0805 parts at hand so I used them in the design. Some wires are needed to solder panel mount buttons and rotary encoder to corresponding copper pads.

I added some foam to the bottom of PCB to help dampen sounds from button presses, as sound is sort of amplified by PCB itself.

Programming

As mentioned before code is not changed since last revision. You will need to install 2 libraries:

  • Encoder by Paul Stoffregen
  • Keyboard by Arduino

To compile for Atmega32U4 you also need to install Arduino Pro Micro board file, Sparkfun has great tutorial how to do that.

For mapping shortcuts to actions on windows you can use AutoHotkey.