From: jgoldswo@coyote.csusm.edu (John Goldsworthy)
Newsgroups: alt.dreams.lucid
Subject: Circuit Plan
Date: 12 Jul 1994 07:16:44 -0700
Lines: 141

Well here goes. I here goes. I hope this plan makes it to the
newsgroup. As you can see vi and I don't get along yet. :)  mkesk
                            Home Brew REM Circuit


        OK, here is the circuit that I promised to make up for posting
        on the Lucid Dream News Group.  I can't claim that the results
        you will get will be the same as mine since there are variables
        that hve to be worked out by the person constructing the device.
        Namely the positioning of the LED emitter and receiver in the
        plastic eyepiece nd the triggering levels set up for the comprator.
        That said here is the circuit.

        Diagram 1.) Eyepiece
                  A. C. B.           A. Infrared LED
                ___\_|_/___          B. Infrared sensitive phototransistor
                3         3          C. Mini LED (I used green)
            ___/           \___         All components available from
                                        Radio Shack.




        The eyepiece consists of one half of a pair of swim goggles
        purchased for approximtely $1.89 at a local dept store sports
        section.  I chose a goggle that utilized a flat viewing surface
        for the user since this facilitated an easy to determine what
        angle the emitter and receiver oppose each other. Upon reexamining
        my eyepiece that the angle I used was approximately 30 degrees.
        This is not to say that this is the optimum angle for this type
        of use, it is only what I found that worked well for me.  I
        drilled the holes using a common electric hand drill, taking care
        to first drill a pilot hole using  small diameter bit so as to
        establish pathway for the larger bit that allowed the LED and
        phototransistor. The size of my pilot bit was a #36 and the finishing
        bit was a #21.  The #21 produced a hole that was very close to the
        desired diameter of the LED and with a little help from a rattail file
        I was able to produce a good snug fit.  A tight fit is important as
        you don't want the emitter and receiver shifting in their positions
        respective to one another since this would alter the signal produced
        by the REM eye movement.



        Diagram 2.)  Circuit



        Legend: (-) = circuit ground  (+) = 9 volts (from battery)

                PT = phototransistor  IR = Infrared LED

                741 Op-Amp (Pins are  OPI = Opto-isolator



            A.                     B.

    (-)--/\/\/\/\--(+)     (-)--/\/\/\/\--(+)
            /\                     /\
            3    Z------------------Y
            0    3     __________
           PT    3   \3 *        3\--(+)
            0    @---\3-  741    3\     Z---\Z------?\-----> (1.)
      C.    C--------\3+ Op-Amp  3\-----Y    3  OPI 3
  Z/\/\/\/\-Y       Z\3          3\      Z--\3      3\-----> (2.)
  C---Y             3 @----------Y       3   @------Y
  3                (-)                  (-)
 (-)

                                          This 7805 is used to power the
                           Z--------?     infrared emitter in the eyepiece.
                           3 LM7805 3     The resistor is used to limit
                           3        3     current nd protect the emitter.
                           @--------Y
                            ]   ]   ]   1200 ohms
                           (-) (+)  ---/\/\/\/\/--0 IR 0---->(-)









  This is the heart of the circuit.  The 741 Op-amp is being used as a
  comparator.  For those of you who don't know about electronics a
  comparator does the job of comparing an incoming signal voltage against
  a refernce voltage.  When the input signal exceeds the referance voltage
  the output of the op-amp swings high to the supply voltage. In the above
  circuit, the incoming signal is the voltage being taken from the voltage
  divider made up of PT and C.  It is fed into the non-inverting input of
  the op-amp and compared aginst the refernce being fed into the inverting
  input.  The inputs are located by counting the pins on the op-amp starting
  at the asterisk and proceding CCW.  Number 2 pin is the inverting input
  and number 3 pin is non-inverting. The bridge containing PT is the portion
  of the circuit requiring the most tweaking to get the desired response to
  show up at the computer's game port.  I placed a voltage divider in the
  form of a potentiometer (A.) so I could regulate the voltage that was
  available to the top of the input bridge circuit.  I also placed a
  potentiometer in the lower half of the PT voltage divider so I could balance
  and tune the resistance of this half of the divider withth the resistance
  the PT presented to it when I was wearing the eyepiece. The value for (A.)
  is not crucial as it only supplies voltage and any pot. can do this.  The
  value of (C.) that I found worked best for me was 100K (kilo ohms).  The
  output of the op-amp found at pin number 6. I fed this into an opto-isolator
  simply to protect the game port from the circuit itself.  This really is not
  necessary as the unit is only powered by a 9 volt transistor battery.  You
  could easily substitute a transistor working as a switch or a small 5 volt
  relay. Numbers (1.) and (2.) are the output and return from the game port of
  the computer.  At your game port there are pins looking like this,

                                _________________
                                \ * * * * * * * /
                                 \-------------/

  Counting from the left, number one pin is 5 volts, this goes to either
  (1.) or (2.) of the output side of the opto-isolator, transistor, relay,
  or whatever you use to pulse this voltage. Pin number three of the game
  port diagram is the return for the 5 volts.  As the comparator snaps out
  a response to your REM eye movement the 5 volts coming from and returning
  to the computer varys accordingly.



  SOFTWARE



  The program that I wrote to monitor the number of REM's during the night
  was written in Quick Basic.  I'm not posting it here as it is fairly long
  and this post is getting pretty big as it is.  The program, in short, starts
  by doing a loop which watches the system clock until a preset time is
  reached.  As soon as this time is reached it begins watching the game port.
  It will count the pulses at the game port for a specified time period.
  If the number of pulses is over a certain amount, it increments a variable
  and resets the counter to begin  fresh count.  If the variable reaches or
  exceeds a certain number within its own specified time frame the computer
  outputs a 5 volt pulse from the printer port to the green LED in the
  eyepiece. The program then waits so as not to keep prompting you with the
  LED and perhaps awaken you out of the dream it just informed you about.
  After this waiting period the program resets all counters and begins fresh
  counting.  If the above mentioned variable does not reach or exceed the
  specified number in order to qualify for a LED prompt to the sleeper, the
  program simply resets in the same way as above and begins watching again
  as this would signify that dreaming was not in progress and probably only
  random eye movement or system glitches were responsible for any count.


  That's it for me right now. :)  I am typed out.  If you have any questions
  email me and we can sort out details.  Hope this helps any of you wanting
  to build a cheaper version of a lucid dream prompter.  I am only guessing,
  but the cost for parts alone would probably only run around $20 to $30.
  This is sans the computer of course. :)



                                So Long For Now


                                John

Disclaimer: The file contained in the box above or displayed in a separate window from a link in the box above is NOT owned nor implied to be owned by BeYoND THe iLLuSioN. Most files at BeYoND THe iLLuSioN are originally from public Bulletin Board Systems (BBS) which were popular in the days before the Internet or from gopher, web, and FTP sites from the early days of the Internet which no longer exist today. Essentially, all files were acquired from the public domain in one for or another.

However, there have been occasions when copyright protected material has appeared on BeYoND THe iLLuSIoN without permission of the copyright holder. In these instances, we have and will continue to remove the copyright protected file as soon as it is brought to our attention. This can now be done using our Report Copyright Material form. Fill out the form, and the webmaster will be notified of the situation.

There are also times when files found on BeYoND THe iLLuSioN have a real home somewhere else on the Internet. In these instances, we will gladly replace the file with a link to its true home whenever it is brought to our attention. If you know of the true home of any of these files, you can use our Report Original URL form to bring it yo our attention.