Electronic keypads are often used to enter a password to perform a function, such as open a door in a security application. No key is needed, only memorization of a passcode.

Many keypad implementations suffer from several security issues which make a keypad entry system much less secure. Using the same keys on the keypad over and over may lead to someone in the vicinity seeing the pattern of keystrokes used. Also, over time the used keys will start to wear down, allowing a person to more easily guess the digits used on the keypad.

There are methods to thwart the shortcomings noted above. One such was implemented by Stephen B. Hirsch circa 1980. He developed a lock which scrambled where the digits would be located on the keypad. This prevented the use of pattern memorization and created even wear on the keys. There is a demonstration video on YouTube.

The Hirsch Scramblepad required 7-segment displays on the keys, a costly proposition. But that can be simulated on the Adafruit MacroPad.

This project will use the much, much less expensive (and much more fun) Adafruit MacroPad to simulate some of the high security features of locks such as the Hirsch Scramblepad. As the keys do not have displays in them (only colorful LEDs underneath), the scrambled numbers will be displayed on the MacroPad display

The MacroPad will include an indication of success and failure. Optionally, the digital pins on the STEMMA QT port can be used to trigger opening of a solenoid lock with a bit of standard electronics, if desired.


Video of a hand playing with a rainbow-glowing keypad.
Strap yourself in, we're launching in T-minus 10 seconds...Destination? A new Class M planet called MACROPAD! M here stands for Microcontroller because this 3x4 keyboard controller...
Out of Stock
USB Type A to Type C Cable - approx 1 meter / 3 ft long
As technology changes and adapts, so does Adafruit. This  USB Type A to Type C cable will help you with the transition to USB C, even if you're still...
In Stock

Optional keycaps for the lower left and right of the keypad:

Angled shot of single black 1U R4 lamp keycap.
These stark and elegant Black Windowed Lamp R4 Keycaps are made of opaque black plastic with a small cutout in the south-center edge that wraps around the top and...
In Stock

To make the optional solenoid lock driver:

Lock-style Solenoid
Solenoids are basically electromagnets: they are made of a big coil of copper wire with an armature (a slug of metal) in the middle. When the coil is energized, the slug is pulled into...
In Stock
1 x TIP120
Power Darlington Transistor
1 x Breadboard
1 x 1N4001 Diode
10 Pack (1 used)
1 x Female DC Power adapter
- 2.1mm jack to screw terminal block
1 x STEMMA QT / Qwiic JST SH Cable
4-pin to Male Headers Cable - 150mm Long
1 x Hook-up Wire Spool Set
22AWG Solid Core - 6 x 25 ft

This guide was first published on Sep 01, 2021. It was last updated on Jun 21, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.