Sunday, August 12, 2012

TeensyTyper - A Teensyduino USB Keyboard

There are plenty of tutorials showing the basics of having an Arduino or similar device act as a USB device of different types, which was only made easier with the Arduino Leonardo or the Teensy 2.0.
I had a problem that needed a solution and decided to spend the day with one of the Teensy 2.0's I got in yesterday to create it.

At work, I have to log into a bunch of different systems that do not normally have keyboards attached that have differing schemas and handling of passwords. It is a pain to have to dig out a keyboard, type in a convoluted user id and password or head back to my office to grab the password list to figure out which one it is currently.

I wanted to make a device that would fit in my pocket that I could use to plug into a system, select a script to run, and let it handle all the typing for me. I have seen several other similar solutions, but most of those just have multiple buttons for each command. For this project, I wanted to give it a simple but scale-able user control. It also had to be easily fit into my pocket and not collect lint.

The end result is this:


My USB Key TeensyTyper
Note: This device is 1.5 inches x 1.75 inches.
While it first into a small tin, I had to use a bigger one to get the USB Cable in.

The top button selects between scripts. The bottom button runs that script. The 7 segment display shows which script number you will be running. The dot on the 7 segment display pulses to tell you it is on and stays lit when running a script.

Software-wise, I have some passwords set as part of the program. I have another set stored in the Program Memory area. Since one of my passwords changes monthly, I store which password of that set to use in the EEPROM memory.

When I need to access a system, I plug it in. I select a script and execute. No more having to retype that one blasted password 5 times in a row holding my keyboard with one hand and pecking out the password with the other. No more having to remember what this months password is for the other piece of software. No more having to remember if it is "?Pass&*word99Z" or "?Pass&*Word99Z" or "?pass&*word99Z".

Source code and wiring diagrams are on my Github page. The wiring diagram is cluttered on a breadboard because I wired this thing on both sides of my PCB to keep it compact and to keep the control functional.

This is what it looks like with the tin case cut.