• Lucid Dreaming - Dream Views




    Results 1 to 25 of 237
    Like Tree3Likes

    Thread: REM Detectors (again)

    Hybrid View

    1. #1
      Member Placebo's Avatar
      Join Date
      May 2004
      Gender
      Location
      Around the bend
      Posts
      4,193
      Likes
      11
      Oh, and that Hoana device looks great. But it's probably very expensive, because it's intended for medical purposes.
      Tips For Newbies | What to do in an LD

      Unless otherwise stated, views expressed in this post are not necessarily representative of the official Dream Views stance. Hell, it's probably not even representative of me.

    2. #2
      Member
      Join Date
      Jan 2008
      Posts
      9
      Likes
      0
      I was looking more at the schematic at the bottom. It could help, and certainly the blue tooth could be eliminated and surface mount componenets changed to dip components to cut costs. Or, it could just help us with another design...

    3. #3
      Member
      Join Date
      Jan 2008
      Posts
      9
      Likes
      0
      Alright, here’s my semi-analysis of the circuit contained at the bottom of the pdf at the website http://affect.media.mit.edu/pdfs/05.strauss.pdf for the gsr circuit. I would change the circuit so that in the first amplification stage, you have 2 1M resistors, a 500k resistor, and a 250k resistor in parallel. I probably made many mistakes, major or minor, so just correct me. An analysis is important before you build a circuit because, well, if you want to change a few factors, you have to know what you’re doing. Look at the schematic,
      or else you’ll have no clue what I’m talking about. So here it is…

      First, an overview of the circuit. There are two amplification stages. The first one has 4 gain stages. The first has a range of 0-5 uS, the second 4-10 uS, the third 8-20 uS, the fourth 16-40 uS. S stands for a Siemen, while the u stands for micro (10^-6). A siemen is equal to 1/resistance. Therefore, 5 uS = 1/(5*10^-6) ohms = 200,000 ohms. The corresponding ohmic ranges, from first to fourth gain stage, are 200,000 + ohms; 250,000 to 100,000; 125,000 to 50,000; and 62,500 to 25,000 ohms. The second amplification stage shifts the range of voltage into the 0-2.5 V range required by the PIC microcontroller for its Analog to Digital conversion.
      Let’s take a look at the first amplification stage. The input voltage to the + side of the op amp is .5 V. The capacitor on the – side is simply meant for noise filtering. The voltage gain of this noninverting amplifier configuration can be shown to be 1+R/Skin where R is the equivalent resistance of resistors R3, R4, R5, and R6 (depending on which ones are connected).
      The mode depends on whether the appropriate electronic switches are open or closed. The microcontroller controls the state of the switches . The switches are actually contained in the ADG712BRU integrated chip.
      In the second gain mode, the 2 1M resistors are connected in parallel. Therefore, R = (1*10^6)^2/(2*1*10^6) = 500,000 ohms.
      Therefore, the gain in mode 1 is 1+500,000/(100,000) to 1+(500,000/250,000) = 6 to 3. The output voltage range is therefore .5 * 6 = 3V to .5 * 3 = 1.5 V. The same calculations can be made for modes 1, 3, and 4.

      Mode 1: R = 1,000,000 ohms. Gain is 1+(1,000,000)/(200,000) = 6 all the way down to 1 (as skin resistance approaches infinity, R/Skin approaches 0). Therefore, voltage range is from 3V to .5 V.

      Mode 3: R =250,000 ohms. Gain is 1+(250,000)/(50,000) = 6 to 1+(250,000)/(125,000) = 3. Voltage range is from .5*6 = 3V to .5*3 = 1.5V

      Mode 4: R = 125,000 ohms. Gain can be calculated to be from 6 to 3, which in turn produces an output voltage of 3 to 1.5V.

      All right, to sum it up we have 4 modes that produce an output voltage from 1.5 to 3 V for stages 2,3, and 4 while producing output voltage of .5 to 3V.

      On to the second amplification mode! The voltage input into the second op amp can be seen to be 11/21V (V is output of first amplification stage) with only the 100k resistor in series with the 110k resistor going to ground.

      The voltage output of the second amp can be derived as V-20*10^3*((V1-V)/(26.4*10^3)+(V2-V)/(132*10^3)) where V = the input voltage into the + side of the op amp, V1 and V2 can be 3.3V or 0V, as controlled by the high and low state of the microcontroller (it is powered by a 3.3V regulator). Of course, the low voltage won’t really be 0 V and the high voltage won’t really be 3.3V. This probably means that, to get the best accuracy, you would have to record the voltage level of your individual microcontroller at home and change the computer software as appropriate.
      Anyways, since I’m getting tired already, and you’re getting tired of reading this stuff, suffice it to say that in order to subtract .5V from the first amplification stage you need a 100k resistor alone, while in order to subtract 1.5 and multiply by 5/3, you need the 100k resistor in parallel with the other two resistors that are also in parallel (24k and 91k. Atleast that’s what I think 24k||91k means in the schematic in the pdf file). The second part just mentioned is actually just an approximation, but the error is so small, that a 10 bit ADC won’t detect the difference.

      Now it’s time to calculate the accuracy of each mode!

      The minimum change in voltage the ADC can detect is 2.5/(2^10) = 2.5/1024 = .0024414 V. The output voltage for modes 2, 3, and 4 is (.5* (1+R/skin)-1.5)*5/3 = V, where V = output voltage. First, solve equation for skin resistance given output voltage. Skin = 5*R/(6*V+10) .

      Starting with mode 2, V max is 2.5 V, while minimum is 0 V. Letting R= 500,000 ohms, the error can be calculated at 2.5V (100,000 ohms skin resistance) to be
      5*(500,000)/(6*(2.5-2.5/1024)+10) -5*500,000/(6*2.5+10) = 58.6 ohms.
      At 0V (250,000 ohms skin resistance) error is Abs(5*500,000/(6*(0+2.5/1024)+10)-5*500,000/(6*0+10)) = 365.7 ohms. These errors correspond to percent errors of (365.7/250,000)*100 = .14628% to (58.6/100,000)*100 = .0586%.

      Next, mode 3. R = 250,000 ohms. V max is 2.5 V, while minimum is 0 V. Error is from 29.3 ohms (at 2.5 V) to 182.8 ohms (at 0 V). This corresponds to a percent error of (182.8/125,000)*100= .14624% to (29.3/50,000)*100 = .0586%.

      Next, mode 4. R= 125,000 ohms. V max is 2.5 V, min is 0 V. Error is 14.6 ohms (at 2.5 V) and 91.4 ohms (at 0 V). This corresponds to a percent error of (91.4/62,500)*100 = .14624% to (14.6/25,000)*100 = .0584%.

      Finally, the awesome mode 1. We need to derive a different formula for this, since in the second mode of amplification only .5 V is subtracted rather than subtracting 1.5 V and multiplying by 5/3.
      The formula is .5(1+R/skin)-.5=V, where V= voltage output. Solving for skin, we get
      skin=R/(2V)

      At 2.5V (200,000 ohm skin resistance), error is 1,000,000/(2*(2.5-2.5/1024))-(1,000,000/(2*2.5)) = 195.5 ohms.
      This corresponds to an error of (195.5/200,000)*100 = .09775%. Notice that we subtracted (2.5-2.5/1024) because this will give us a larger error than adding (2.5+2.5/1024). As V gets smaller, the error increases rapidly (the skin resistance measured gets larger).

      Let’s calculate the skin resistance that will produce an error of 1.0%. Set up the equation …
      ((1,000,000/(2*(x-2.5/1024)))-(1,000,000/(2x))) /(1,000,000/(2x))* 100 = 1
      Solving, x = .246582 volts. This corresponds to a skin resistance of 2.028*10^6 ohms. Unfortunately, 1% of this is a 20,280 ohm error! At x = .5 V, skin resistance would be 1*10^6 ohms. This level will correspond to an error of 4906.77 ohms. If we switch to a 12 bit ADC converter (you can get microcontrollers that have this level of ADC built in), the error that corresponds with a skin resistance of 2.028*10^6 would be 5031.57 ohms.

      Alright. Now it’s time for a preliminary part cost list of the integrated chips used (didn’t include resistors, capactitor, diodes, because I didn’t feel like it. So cost is higher. Also, it doesn’t include Bluetooth since we can just connect it serially to the computer)

      ADG712BRU: $2.00
      OPA2342EA: $2.36 *2 = $4.72
      PIC16LF88 = $5.33
      3.3 Voltage Regulator: $1.13
      Total: $13.18 + $8.00 (shipping, maybe more) = $21.18

      We could probably find a cheaper microcontroller than the PIC (somewhere around $2.00, say an atmel tiny) but I’m just going with what they used. Alright… Next, I shall look at the other possibility mentioned, using a frequency to voltage converter. Even if this way is not cheap enough, still some ideals concerning using the skin resistance to change the op amp amplification is good to know.

      It’d be good to discuss and generate more ideals, suggest improvements on this circuit to make it cheaper/more accurate, etc… Till then, au revoir!
      Last edited by Durett; 01-30-2008 at 04:08 AM. Reason: Better the format

    4. #4
      Member
      Join Date
      Jan 2008
      Posts
      9
      Likes
      0
      Woops... Didn't format when I copied from microsoft word...

    5. #5
      Member
      Join Date
      Jan 2008
      Posts
      9
      Likes
      0
      Just off the top of my head, it would be nice to study the techniques used in electrometers to get such accuracy.
      Oh, and I was taking a look at a previous ideal to use a voltage to frequency converter to measure the voltage, and by this, the resistance. I was just wandering, does anyone have any ideal on how to accurately measure high frequencies using a pc without sucking down the resources?

    6. #6
      Member Placebo's Avatar
      Join Date
      May 2004
      Gender
      Location
      Around the bend
      Posts
      4,193
      Likes
      11
      Nope sorry. Like I said before, I'd love to help, but my electronics knowledge is dangerous at best.
      It was a long technical post, so let's see if someone else (maybe Seeker) gets time to figure it out
      Tips For Newbies | What to do in an LD

      Unless otherwise stated, views expressed in this post are not necessarily representative of the official Dream Views stance. Hell, it's probably not even representative of me.

    7. #7
      Member
      Join Date
      Jan 2008
      Posts
      5
      Likes
      0

      piezo sensor for REM detection...

      Hello every body,

      I am new comer in this forum (and in lucid dream resarch), and i would like to know if it is the right place for debates about piezo sensors for eye movement detection. The start of the thread was a little general but it seems that you ve been focusing on GSR since a while, so if you want me to deplace my response, just tell me.

      I ve been actually awared by a specialist that IR could actually warm the liquid contained inside the eye ball without any alarm from our senses because illumination occurs behind the "right place" (i don't know the english word for it"). Then, for a home made device, i think this technologie is a little bit unsafe.
      So, i 've been looking for another way, and i found out that the NASA, has actually used piezo sensors, for eye movement detection, monitoring that way paradoxal sleep.
      Here is the kind of sensor i am talking about:

      http://www.meas-spec.com/advizia/v41...=Piezo&Rnd=124

      What do you think of it? any specialist around for a new dream mask generation (USB 2.0 required)
      Last edited by davidcaudron; 01-31-2008 at 08:01 PM.

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •