Senior Project (Eyemouse)

History

To graduate with an engineering degree from CSUS you must do a “senior project.”  This project is meant to put all your engineering skills to the test and force you to work in a team for a year.  I started my senior project Spring 2006 and initially proposed three project ideas:

  • Wireless Electro-Oculargram
    • I had recently read an article about measurable potential across eyes, and a project that had implemented it as a way to let disabled people type on a screen.  The circuit itself didn’t seem too difficult and I thought it would be interesting to make a hand-held wireless device you could interface to a PC and use to move the mouse.
  • Micromouse
    • I had numerous failed start-up attempts at doing a micromouse by myself in college, and I thought if I had a team to help maybe I could finish it.
  • RC Force-Feedback system
    • I wanted to put a wireless accelerometer on an RC car/plane/boat and have it send data back to the controller.  The controller would have servoes on it and yank the control sticks when you get acceleration not cause by the controller (ex. if a wind gust hits the plane it would pull the stick so you could feel it).
The team decided to go with the wireless electro-oculargram since it would possibly help us get jobs in the biomedical field when we graduated.  The original work plan was something like this (names have been changed to protect the incompetent):
  • Member A
    • Analog circuit design (amplifiers, filters, rectifiers)
  • Member B and C
    • Wireless design (transmitter and receiver)
  • Me
    • Embedded design, integration, PC software
After the first semester we had nothing completed.  I had thrown together some analog-to-digital reading examples and some simple software, but other than that nothing was even close to working.
That summer I had an internship with NASA and spent the summer working in Huntsville, AL.  I had taken some of the project to work on, but never got around to it.  When I came back, I realized that if I didn’t do the work it probably was never going to get done.  I started on the analog design, hoping the other three members of the team could triple-team the RF and get it working.

The analog design was much more difficult than I anticipated.  The potential difference generated by the eye is typically around 0.5mV.  To get the most resolution, it has to be amplified with a gain around 5000 to 10000 times.  Whenever you have that much gain, you’re basically creating a 60Hz noise-amplifier.  My initial designs wouldn’t work if the overhead lighting was on (I tested the original circuit in the dark).
The analog circuit design took around seven weeks to finally complete, and still had problems.  I started interfacing the analog signal to the microcontroller and while I waited for the RF to be finished I bought a transmitter/receiver pair online and used it to get the microcontroller to send data to the PC.

Once I was reliably getting data to the PC, I started working on a way to plot the data and get it to move a cursor on the screen.  My software skills at the time, to say the least, were not that great.  So I got help from my friend Kevin when I was working on the desktop software.  He got a project up and running for me that would graph a single ADC channel, and I worked on expanding it to graph all four data channels (each direction was a seperate channel: up, down, left, and right).  Once each channel we being read and sampled Kevin helped me to integrate the signal and use it to generate a position on the screen.

When I finally had a prototype done, it was so late in the semester we decided to axe the idea of rolling our own RF.  The only task left was to layout the board, populate it, and do the final report.  Initially, one of the other team members was going to have a coworker on his do the layout for us.  That fell through, and since I was the only person with any kind of layout experience, I ended up doing that as well.

I finished up the final report, did the presentation, and breathed a sigh of relief.

Theory of Operation

The potential difference between the front and back of the human eye is around 0.2 to 1 mV.  If you can amplify and read that signal, you can determine eye position without the need for cameras.

Circuit

Schematic Overview(transmitter)

Schematic Overview(transmitter)

This is a basic overview of the circuit.  Each eye axis is amplified with the instrumentation amplifier, filtered, the DC offset is determined, then rectified and split into four signals.  The microcontroller was basically used as an analog to serial converter.  The Atmega8 would sample the four ADC channels and generate a serial packet in the form of:

|ADC1|ADC2|ADC3|ADC4|n

Project Schematic

Project Schematic
Click for explanation of Schematic sections

Click for explanation of Schematic sections

Software

Graphing Software for each eye

The software was written in C# with great help from Kevin (Kevin did more work on my senior project then any of my actual project teammates).  It reads data from the serial port and graphs it to four pane windows.

Because the circuit has a fundamental time constant (large capacitance from the filters), the actual data roughly represents the acceleration of eye movement instead of position.  For this reason, to calculate actual position the data must be integrated.

Prototypes

First Prototype

First Prototype

Second Prototype

Second Prototype

Final Prototype

Final Prototype

Final Version

PCB layout

PCB layout

The layout was done in EagleCAD.  I was extraordinarily short on time, and autorouted almost everything except the power and ground lines.

Finished PCB front

Finished PCB front

finished PCB back

Finished PCB back

I had the PCBs made at a company I still use today, Sunstone circuits.  There were surprisingly few errors on the board considering it was the first turn.  The only major mistake was the incorrect footprint for the regulator (which wasn’t that bad), and the smd diodes barely fit the footprint.

Conclusion

The project was hard.  In the end, I had basically done all the work: project presentations, reports, analog design, digital design, firmware programming, software programming (with help from a computer science friend), PCB layout, assembly, and testing.

During the semester I grew increasing frustrated with how little work my teammates did but looking back it turned out great for me.  My senior project professor saw that I had done all the work and when it came time to get a job he pulled some strings to get me an interview at the company I work for now.  Not only that, but the process of designing my senior project made me a much better engineer and gave me a great talking point for every job interview I had.