After pivoting to a device that could diagnose concussions, we needed to build some hardware to get our idea off the ground—and fast! We knew that we needed to track a user's eye movements while we showed them some sort of visual pattern, so we looked around at the materials we had. For the AR hack that we had initially planned to build, we had a Google Cardboard and four Playstation Eye cameras (dirt-cheap, 120fps VGA-resolution USB cameras), as well as a few components we had lying around—a couple IMU's, a battery, a voltage regulator, stuff like that. We had also signed out a Spark Core microcontroller from the PennApps hardware lab.
We quickly realized that we could put two of the Playstation cameras inside the Cardboard (where you'd usually put your smartphone) to track eye movements. However, we needed a way to keep them in place, so we designed a simple mount that we could put inside the Cardboard. (Sketch below definitely not to scale.)
We'd hoped to 3D print this but we missed the deadline to submit CAD models to be printed, so we constructed it ourselves out of a few pieces of cardboard.
We passed the camera cables through the back of the Cardboard so that they could be easily plugged into a computer.
Next, we needed to add components to display a visual pattern that the user could follow. We couldn't do anything with a smartphone, because there wasn't any space left inside the Cardboard after we added the cameras, so we decided to use some LED's instead.
We hot-glued four yellow LED's around the face of the Cardboard...
...and wired them up to a piece of prototyping board that we attached between the cameras. We added a socket for the Spark Core on the protoboard, and decided to drive the LED's directly off of four digital I/O pins (since the pins were rated to supply up to 25 mA each). We connected the LED's to Spark pins D3, D4, D5, and D6, with 220Ω resistors in between to limit current.
Finally, to power the device, we taped a 2-cell LiPo to the side of the Cardboard and connected it to a 5V UBEC, which supplied a steady voltage to the Spark Core.
Our prototype was finished! Here's a picture of the completed device (if you look closely, you can see the Playstation cameras and some of the circuitry inside the Cardboard):