I built this as I went so the layout is pretty messy =)
The user wears a headband that has electrodes placed at the temples. The left and right eye movements are tracked. The gain of the op amps in the electrooculogram circuit are controlled by the arduino through an AD5204 digital pot to allow for an automatic calibration routine.
You put on the headband and power up the board, and it outputs eye movement, unix timestamp and REM status to a computer for graphing. It waits a set amount of time for you to fall asleep, and then monitors your eye movements to detect the REM stage of sleep (when you are dreaming). When it detects REM, it blinks LEDs mounted in front of your eyes to give you a hint that you are dreaming to help you become lucid (
http://en.wikipedia.org/wiki/Lucid_dream). When the REM ends, it can wake you up so you can remember the dream better.
Since your physical eye movements match your dream eye movements, movement sequences can be programmed so that you can interact with it while you are in a lucid dream (like turn the flashing LEDs off, or make notes in the log, i.e. I'm Lucid)
It also has a built in alarm clock that can wake you up at a set time in the morning.
I got the idea from some experiments Stephen Laberge did at Stanford university
http://www.lucidity.com/slbbs/index.htmlI had found a device called "RemDreamer" that could flash LEDs when you were in REM but it couldn't output a graph of exact eye movements and was pretty expensive so I decided to make my own.
It's working but I still need to make a PCB for it and integrate it into a sleep mask.
I was able to get all of the ICs except the atmega168 as free samples so the cost for this was about $15.
It uses an LM358, INA126P, 2x TLV2472, AD5204, DS1307, Atmega168 w/arduino bootloader and is powered via FTDI cable.

This is the eye movement output of a 3 hour afternoon nap:

I'm pretty happy that it all actually works and just wanted to share =)