Password Safe / Keyboard Injector Version 5.0
by Smurfy_CH in Circuits > Computers
171 Views, 3 Favorites, 0 Comments
Password Safe / Keyboard Injector Version 5.0
A programmable keyboard for sending passwords / login credentials / text.... to a PC via USB connection.
The texts are stored as files on the memory of the password safe. Editing the files is enabled by pressing the rotary knob while plugging in the USB cable. When pressing the knob during USB connection, a USB drive is mounted on the PC, providing 800 MB of storage space for text files. This equals more than 500,000 ASCII characters.
In October 2023, I published a Password Safe / Programmable Keyboard in a “steampunk look”:
https://www.instructables.com/Password-Safe-Keyboard-Injector/
Since then, I have continuously improved and refined the design.
I have now reached Version 5. The goal was to create an ultra-compact version and a desktop version with a large display that can be mounted under a desk.
Another goal was to minimize the electronics assembly effort and to use the RP2040’s flash memory.
Since I also use the password safe as an Internet favorites list, with login options and recurring text output, the 2023 version became somewhat confusing, due to the “database size.” Therefore, I decided that the password safe should be able to select between multiple topic-oriented databases.
The process of creating database records has also been simplified.
Additionally, the display now switches off when not in use.
The password safe can remain plugged into the PC’s USB port.
When the PC is switched on, the password safe remains in a waiting state for 3 minutes, to avoid interfering with the boot process.
The 3 minutes can be shortened by pressing the rotary knob, which cancels the waiting process and switches to operating mode.
First, a PIN query can be entered.
Then the database selection appears.
After that, the corresponding records from the selected database can be sent to the PC screen.
By turning the rotary knob, the desired text output can be selected by pressing the rotary knob. This will send the ASCI string to the PC.
There are two versions of the password safe here: One is the mini version with an OLED display, and the other is the larger version with a 1602 I2C LCD display. Designed for mounting underneath a desk as a pull-out drawer.
Supplies
1 Pico Zero
1 OLED display 0.91" I2C or I2C TFT 1602 Display
1 Rotary Encoder with Push-Button
1 RGB LED 5mm
1 Resistor 0.25W 150 Ω
2 Compression springs
1 Metall rod Ø 3 x 90mm
5 cm heat shrink tube
Thin stranded wire (approx. Ø 0.7 mm)
Soldering iron and solder
3D Printer
Installing CircuitPython on the Pico
- Connect the Pico to the PC using a USB cable. After a few seconds, the Pico appears as a USB drive. It contains files that are not relevant to us.
- Download the Circuitpython Firmware 10 (adafruit-circuitpython-waveshare_rp2040_zero-de_DE-10.1.1.uf2) You can get the file from https://circuitpython.org/board/waveshare_rp2040_zero/
- Copy the .uf2 File to the Pico. After that it will perform a RESET and after a few seconds a new USB drive will appear.
- Several folders and files will now be present. You can delete all files — we will install everything new.
To install the Password Safe program:
Copy all files listed below to the root directory of the Pico USB drive.
Get the font5x8.bin from here https://github.com/adafruit/Adafruit_CircuitPython_framebuf/raw/main/examples/font5x8.bin and copy it into the root directory too.
Download the library CircuitPython Libraries bundle from https://circuitpython.org/libraries. You need the same version of the library as your firmware. In this example it is Version 10.
Create a folder on the Pico called lib, then copy the following libs into that directory:
adafruit_character_lcd/ (entire folder)
adafruit_hid/ (entire folder)
adafruit_framebuf.mpy
adafruit_pcf8574.mpy
adafruit_ssd1306.mpy
Solder the OLDE Version
Solder the components to the Pico using thin stranded wire, according to the wiring diagram.
Afterwards, a test run can be started.
If the rotary encoder rotates in the wrong direction, swap the two wires on the 3-pin connector.
Soldering Instructions
Solder a “bridge” on the rotary switch from Pin A to Pin E.
This bridge goes via a stranded wire to the GND pin on the Pico.
Solder D directly to Pin 12 on the Pico.
Solder F directly to Pin 11 on the Pico.
Connect Pin B with the wire from the “LED PIN SHORTENING” to Pin 9 on the Pico.
Shorten the LED Pins.
Make sure you remember which one is GND!
Solder the 150Ω resistor to GND.
Attach stranded wire to the 3 remaining pins and the other end of the resistor.
Cover all 4 solder joints with heat shrink tubing.
Connections:
- GND (with resistor) → Pico GND
- LED RED → Pin 3
- LED GREEN → Pin 4
- LED BLUE → Pin 5
OLED Display
Shorten the LCD display pins to approx. 2mm.
Solder one stranded wire to each of the 4 pins and cover with heat shrink tubing.
Connections:
- GND → Pico GND
- 5V → Pico 5V
- SCK → Pin 6
- SDA → Pin 7
Soldering work is now complete.
A test run before installation into the housing is recommended.
The start PIN in demo mode is 1234.
Installation Into the Housing
Print the housing.
The STL files below starting with XXS_ is an extra SMALL version.
Connect Pico with USB-C cable and slide it in from the side.
Lightly secure the rotary knob with the nut.
Insert the display through the top opening and fix it at the small tab near the rotary knob using glue or adhesive tape.
Fix the lower rear side with hot glue or adhesive.
Fix the LED at the rear next to the USB-C cable entry using hot glue or adhesive.
The rear edge of the LED should be flush with the inner housing wall.
Slide the completed frame into the housing and secure the rotary switch with the nut.
Finally, insert or glue the cable end cover into the housing
Assemble the TFT 1602 Version
Solder the components together according to the schematic using some wire.
Use same Software as for the OLED Version, just replace the code.py with the version attached here.
Downloads
Mount It Into the Box
3D Print the Box.
Mount the RGB LED first, as shown in the picture.
Then install the rest into the housing as shown in pictures.
Fix the RP2040 with hot glue.
Final Assembly
This model is designed for mounting under a desk as a pull-out drawer.
The frame can be assembled with locking mechanism on the left or right side.
On the opposite side, install the insert without spring.
In addition to the 3D printed parts, you will need:
- One M3 threaded rod
- Two matching compression springs
Fix the USB cable in the housing exit channel with hot glue or "super glue".
Troubleshooting
No function:
Check GND and 5V connections
Check for short circuits
Display scrolls in the wrong direction:
Swap Pin D & F on the rotary knob
LED blinks but display remains dark:
Check GND and 5V
Ensure SCK is on Pin 6 and SDA is on Pin 7
LED does not light up:
GND soldered incorrectly
LED colors in wrong sequence:
Swap LED pins
USERMANUAL & Buildinstruction As PDF
Below you find the user manual, how to use the Password-vault and how to change and create databases.
There is also a PDF file with this instructions for printing.
Final Note
This circuit was programmed for a Swiss German keyboard layout (DE/CH).
To use other keyboards, you must modify the MAPPING section in the program file code.py.
Otherwise, you can only use standard ASCII characters for output, and the Y / Z keys may be swapped.
For a US keyboard, I have included the corresponding code here.
Rename & replace it with code.py on the RP2040.
However, the US keyboard version has not been extensively tested.
Since this device is connected to a PC via USB, soldering errors may, under certain circumstances, cause damage to the PC.
Assembly and use are at your own risk.
Technical Specifications: The device is recognized by the PC as a keyboard. Maximum USB port load: < 40 mA
Disclaimer: The device has been manufactured to the best of my knowledge and belief. At the time of manufacture, I am not aware of any way someone could access the password file via the Internet. However, if the device is stolen, the passwords stored on it can be read out. The memory can be accessed and read using a PC. I cannot accept any liability for its use. Nothing is 100% secure, and passwords should not be stored exclusively on this device. In the event of a defect, it may no longer be possible to recover the passwords. If a PC is already infected with a virus, this device does not provide protection. It also cannot prevent interception of input data via a “keylogger.”
Use of this device is at your own risk.