ITP Blog

Tangible Interaction - Week 7

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).”

NYU Albert 2fa

Coordinated Security Considerations

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.

Rotary test

Rotary test LCD

Shu-Ju helped me test this early prototype and identify the following issues and considerations for a 2PA device:

  • Using a rotary knob for number selection felt too slow which emphasized a deceleration quality over a mutually deliberate quality
  • The need for an LED to display the current number indicated how distinct keys for each number could be clearer and less complicated than the rotary knob
  • Individuals make mistakes, so there needs to be some way to delete or clear the input — we agreed that a clear would be appropriate given 2FA codes are only 6 digits long and match a familiar experience from ATM pin code entry
  • It seems more intuitive for the ranges each user controls to be 1-5 and 6-0 because that’s how keyboards are laid out and keypads commonly have the 0 button at the pad’s bottom

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.

keyboard sketch

Climbing A Resistor Ladder

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.

resistor ladder prototype

two ladders

ladders with LEDs

I Got The Keys

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.

keyswitch

Another benefit of using commercial key switches is that there are existing resources and templates for fabricating a keyboard panel.

laser cut keyswitch 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.

blank keycaps

keycaps side

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.

ignition

2 ignitions

Solderpalooza And Panel Testing

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.

pcb

pcb half

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).

EAGLE

eagle 2

bantam

But eventually I started to feel the deadline crunch. So I opted to stick with my existing knowledge and solder directly onto the keyswitches.

key soldering

There were some casualties that I had to toss.

casualties

all pieces

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.

final prototype panel

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.

clear button

Below are images of the various panel designs, tests, and failures:

proto panel with components

paint

paint test

panel paint test

final paints

all panels

final panels

final with components

final with keys

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.

out of the wire

thru the wire

Final Product

user 1 panel

user 2 panel

full sized

Below is the final circuit diagram, schematic, and code for the two person authentication HID:

circuit diagram

schematic

Video Demos

Future Thoughts

Some thoughts I had if I continue to iterate on this idea and incorporate feedback from the class demo:

  • Consider using a full keypad because more people recognize a full keypad than half the keys of the keyboard number row — it would also add an additional layer of coordination to decide who is pressing a number input at any given time
  • Triggering a count down (either through lights or audio) once six digits have been entered instead of having to verbally countdown — which leaves less time and increases the commitment stakes to doing 2PA
  • Building out an entire panel cabinent instead of two standoff enclosures connected by a pipe for more of a two-man rule experience
  • Considering a timeout functionality and evaluating whether having to wait on another person to confirm the authentiation (whether physically or remotely) is desirable, especially in scenarios such as logging into social media

Adrian Bautista

NYU ITP documentation blog.
Words are my own.