Kvasar dreammask

Project finished


It has come to my attention that someone is selling these plans on Ebay. I am NOT the seller. All information concerning this project can be found on these pages free of charge. I would like if anyone who has seen or bought these plans on Ebay could provide me with contact information for the seller. For the record, the information and code on these pages are not in the public domain and is copyrighted. Feel free to build your own device and improve on the design and code, just do not charge money for it!!!

If you have trouble finding the s4810/4826 you can use Sharp IS489 or the HLC2701 by Honeywell instead. If you use either of these sensors you also need this modified code for the PIC.

Since it has been requested, I have added a english version of the source to the zipped source-package. Hack away...


Kvasar is a lucid dream inducing device. I've long been interested in lucid dreaming (clear, when you know you are dreaming, dreams) and one day when I was surfing the net I came upon the website of the Lucidity institute. They offer a product called the Novadreamer, wich is pretty cool but hideously overpriced. So I figured, why not make my own dreammask? I came up with this design with a total material cost of about 15 euros, compared to a price of 250$ for the novadreamer (they say that the money goes into research, so if you can afford it, I guess it's a good way to support research into lucid dreaming). The heart of the device is a PIC16F84 microcontroller, apart from that there is only some discrete components and a S4826 integrated photodetector. All problems I encountered could be solved with some creative programming, done in the excellent language JAL by Wouter van Ooijen. I used to do all my programming in assembler, but high level programming is so much faster. Kvasar offers all the functions of the novadreamer, and then some. If I ever feel up to it I might even write some companion software for windows for keeping statistics.
Theory of operation is probably pretty similar to the novadreamer (I wouldn't know, I've never seen one in real life...). An IR LED shines light on the eyelid wich is detected by the photosensor. During REM sleep when most dreams take place, there is a lot of eye movement, and when the device detects this it gives a signal after an adjustable amount of time. You can set the number, intensity and type (light/light and sound) of signal, the time between signals and the time after eye-movement is detected that the signal is given. There is also a dream-alarm function that can wake you after a set time after the signal is given so that you can write down your dream. The device also saves the number of signals given so you can see if you have to change the settings.
The dreammask use pulse-width modulation for the IR-LED so that you can still use batteries that aren't completely fresh. This means that you should do a calibration each time you use the device, but this only takes a couple of seconds and is completely automatic, just push a button. The variable resistor needs to be tuned to a proper level to give the IR-LED a good output, somewhere in the 50-100 ohm range should do the trick. There is a test-mode so it shouldn't be that hard to find a good setting. On a related note, the device will not function properly if there are ambient (IR) lightsources!

Close up of the sensors, S4810 on top, LED in the middle and IR-LED in bottom. Placement of the sensor in respect to the IR-LED can be sensitive. I've found that a vertical placement with a distance of about 1.0 cm between sensor and LED works alright. On the right you can see the electronics, just small enough to fit between the goggles. You might want to build it a little bigger, since it can be a real pain to debug when you build it this compact.

Here is the parts list if you want to make your own Kvasar:

The schematics

Here is the source-code, HEX, ASM and JAL files. Note: program the PIC with RC-osc and the watchdog-timer enabled!

And here is the operating manual, txt file

If you need a primer on basic electronic skills I can highly recommend this site. It's actually a site about a robotic design philosophy that in my opinion is one of the best ways to learn about electronics.

Here is the programmer I'm using (external link to Ek projects, in german but not that hard to understand)

Or, if you have trouble reading german, or want another design, here is another programmer. It has fewer components, but requires a voltage regulator.

Feel free to mail me if you have any questions.

This device is released as "e-mailware". I'd really like to know if you build it and how it works, so send me a mail!