March 13, 2019
The last assignment for Tangible Interaction was to build a USB human interface device (HID). One of my ideas was to build a collaborative device that requires at least two people to use it. This was based off of my experience pair programming with another developer using two sets of keyboard and nice and from the student driver cars that have an emergency brake pedal below the teacher’s passenger seat.
Inspired by a video Sid shared with me in which someone built a BopIt device fix Hawaii’s poorly designed missle alert confirmation system, I built a collaborative HID for entering two factor authentication (2FA) codes on a computer called “Two Person Authentication (2PA).”
I built a simple rotary knob based circuit with my Arduino MKR1010 to quickly test the feasability of a 2PA device and identify design issues that arise when a device is simultaneously used by multiple users. Each user held one of the rotary knobs and controlled the the input of five digits (0-4, 5-9) by rotating their knob to see the current number on the LCD and pressing the knob to send that value as a keystroke.
Shu-Ju helped me test this early prototype and identify the following issues and considerations for a 2PA device:
With this feedback, I sketched out the next prototype that would use distinct buttons for each number in a layout similar to a keyboard. I also wanted to use key switches (inspired by the interfaces for the two-man rule), a component that Tom mentioned during an office hours meeting.
To avoid having to use up 10 GPIO pins for each number key, I investigated the trade offs between using a multiplexer or shift register to utilize less pins for multiple inputs. However, Amitabh advised me to look into a resistor ladder because it would be easier to implement and truly require only one pin for each range of number keys. So I built a basic resistor ladder circuit and tested whether I could differentiate the different button presses based on the voltage range being currently read. I based the circuit off of a circuit described in this Arduino thread on a resistor ladder for input buttons.
The next step after building a working resistor ladder circuit using the ITP shop’s push buttons was to find appropriate buttons for the final 2PA device. I found spare Cherry MX clear mechanical key switches from a DIY mechanical keyboard kit I had. Using these key switches for the number inputs felt appropriate to me because a keyboard interface is almost ubiquitous now and would help mimic the number key layout of the average keyboard.
Another benefit of using commercial key switches is that there are existing resources and templates for fabricating a keyboard panel.
The keycaps I had for these key switches, however, were blank so I would eventually need to etch some labels onto the final panel.
For the 2PA submit key switches, I purchased ignition key switches from Amazon that are typically used for go karts and other small vehicles. Using them in a test circuit was straightforward, they behaved just like any other switch component by completing the circuit when turned to the “on” side. I especially liked these key switches because they had threads for panel mounting and the key could only be removed while in the “off” position — meaning users can’t take their keys with them and leave the switch on too.
Once I had tested the components using prototype circuits, I started to think about how to combine these circuits into one and how to make a circuit that is robust beyond an arms length distance. I didn’t want to have a breadboard underneath each panel to avoid tampering and wanted the components to be soldered a PCB board for stability. So I started with a PCB board that had the same power lines as a breadboard to reduce the amount of soldering needed.
Next, I experimented with desiging my own PCB using open-sourced designs for Cherry MX switches for the keyboard switches to avoid having to solder wires directly onto the switches. I referenced resources from the ITP course Homemade Hardware (props to Jesse for the link).
But eventually I started to feel the deadline crunch. So I opted to stick with my existing knowledge and solder directly onto the keyswitches.
There were some casualties that I had to toss.
I then started prototyping the panel the components would be mounted too. I used the laser cutter and cardboard to test different sizes and layouts to verify the component mount sizes, ensure everything could fit underneath a standoff enclosure, and the layout would be clear enough to understand and minimize mistakes.
I struggled to find a panel mount button for the “clear” input button because their color and larger sizes felt too loud and tempting to press(even if there was no keyboard input error to correct), so I decided to use a small push button. I found the small push button reinforced a deliberate action quality to it, similar to how small reset buttons that need to be pressed with a paperclip exist on electronic devices to minimize accidental presses.
Below are images of the various panel designs, tests, and failures:
Since the two panel parts for this 2PA device were on standoffs, a user could bring the two panels within arms reach and use submit two factor codes without a second user. So to physically and visually enforce a minimum distance between the two panel inputs, I enclosed the wires in a PVC pipe.
Below is the final circuit diagram, schematic, and code for the two person authentication HID:
Some thoughts I had if I continue to iterate on this idea and incorporate feedback from the class demo:
A perpetual work in progress blog documentating my NYU ITP projects. Words are my own.