loading
Hi,
This is my first instructable, so I hope everything is clear and hoping you find it interesting, and would appreciate any feedback, so here I go. I am sill testing this device with other people,  but  personally I have found  my dream recall has improved dramatically, wow! some of the dreams are totally amazing. 

WARNING. Because of the flashing Led this could pose a problem with people that are affected by epilepsy. One solution would be to connect a switch to the Led, therefore there would only be a sound as a dream trigger.

   If any one is interested in this project I can sell a kit of parts or sell a complete and tested device. Please contact me for prices at.  jeffbarnes311@googlemail.com  

Description.
The device will scan the closed eye using infrared and when movement is detected(REM) the PIC microcontroller will flash an LED and produce a sound on a piezo. This should wake one up into a dream. Useful for Lucid dreaming or if one wants to better their dream recall. I have found using this device, my dream recall has greatly improved.

Operation.
After switching on the device there will be a delay of approximately 60 seconds, to allow one to settle into bed. Then the device will scan the closed eye three times, to check functionality, after this the device will stop scanning for three hours. It will then go into a cycle of scanning the eye then delay for 15 minutes until the device is turned off or the push button is pressed. If button is pressed the LED will illuminate then flash once after which there will be a delay of 30 minutes then scanning is resumed. This is to allow you to interrupt the cycle eg. sleep was interrupted so as to allow you to go back to sleep or can be used for a nap.

Setup mode.
1/ Keep push button pressed then turn on and release button, the LED will flash and piezo will sound, this is to allow adjustment of the LED light intensity VR1 and piezo volume VR2,  also to check battery state of charge.
2/ Press button until LED only flashes and release, this will enter infrared functionality test.
3/ Pressing button again, the device will go into the main program or turn off device.


Summary of operation.
1/ When one is ready for sleep turn on device then count to 60(seconds approximately).
2/ Move the eyes under closed lids until the device has triggered three times. This is to test functionality.
3/ Device will go into a three hour delay until scanning starts.
4/ Then it will scan the eye, delay for 15 minutes and repeat until the device is turned off or the push button is pressed.
5/ If push button is pressed the Led will stay on until released then flash once, there will then be a delay of 30 minutes and continue as in 4/. The button can be pressed at any time.
6/Sweet dreams and or great lucids.
7/Turn off device with the slid switch. Good morning

   Jeff Barnes


Step 1: PARTS LIST


Parts list.
R1 = 3K3 1/4 WATT
R2 = 10K
R3 = 5K6
R4 = 150R
VR1 = 5K PRESET
VR2 = 100K PRESET

C1 = 1000uF 6.3V ELECTROLYTIC
C2 = 100nF CERAMIC
C3 = 22pF CERAMIC

IC1 = 12F675 PIC MICROCONTROLLER
INFRARED PHOTO TRAN 3mm OR 5mm
INFRARED LED 5mm
5mm LED
PIEZO 20mm

SW1 = MINATURE SLIDE SWITCH
PB1 = MINATURE PUSH BUTTON

8 PIN DIL SOCKET
AAA BATTERY HOLDER FOR TWO AAA BATTERIES
SLEEP MASK
DOUBLE SIDED STICKY PADS X 2
STRIP BOARD 25 HOLES X 18 STRIPS
1mm HEAT SHRINK SLEEVING
TINNED COPPER WIRE FOR LINKS, 7 IN TOTAL.
SLEEP MASK

  Jeff Barnes

Step 2: CONSTRUCTION

Construction.
   Please refer to schematic and board overlay
For the circuit board I have used Vero/stip board and the tracks cut using a spot face cutter or a 3mm drill bit, as indicated by  X's in the circuit board layout, 9 in total. I have also included a PCB lay out.

Construction of the board is pretty straightforward, just have to watch for the polarity of the electrolytic cap, IC1, infrared led, infrared tran(collector denoted by the short leg) and visible led.
  Some things to watch out for:-
  The push button legs will have to be straightened to fit into the correct position, as shown in the circuit board overlay.
  The two white rectangles by the side of the piezo are the double sided sticky pads for securing the battery holder.
   Piezo is glued to the circuit board with a small amount of adhesive.
   The battery holder:-
                                    Two lengths of tined copper wire are soldered onto the board at the points marked with a + and a _,  then pass them through the solder tags on the battery holder, stick holder in place after sewing to sleep mask with the two double sided sticky pads and solder wires to the solder tags, being careful not to use too much heat, are the plastic of the holder will melt.
   Led, infrared led and infrared transistor:- (infrared tran collector denoted by short leg)
                                                                         Use 1mm sleeving on the legs of these components and try to keep them as long as possible when soldering to board. The short lead on the infrared transistor indicates the collector. Bend these components out from the board and bend the heads so as to be able to shine on the eyes. Next stitch board to sleep mask, as indicated on the board overly, mark the position of the Leds and transistor on the mask, then cut small holes using a leather hole punch or something simular, press the heads of these components through so the leds protrude approximately 3mm and the photo tran 2mm, making shore the infrared led is slightly angle towards the photo transistor and then glue into place using supper glue. There is a photo of the templates I used showing the position of these components, there is another photo showing the ideal position of the infra red led and photo transistor in relation to the eye.   WARNING, ALLOW AT LEAST 3 HOURS BEFORE PUTTING MASK ON FACE, BECAUSE  FUMES FROM THE GLUE CAN IRRITATE THE EYES.
 The PCB software I am using is from  http://www.expresspcb.com/expresspcbhtm/download.htm

    Jeff Barnes
   
    

     

Step 3: ADJUSTMENT

    Adjust the two presets, lower right side of board, so as to wake you up in a dream but not totally, you will probably have to experiment with these settings. Please refer to intro for explanation of entering setup mode.
    To check for infrared detection functionality please refer to intro for explanation of entering setup mode.

   Jeff Barnes
 

Step 4:

This is the HEX code for programing the 12F675 PIC microcontroller.

    Jeff Barnes
<p>hi can you send me your ASM file(source of micro)??? i need it because if somebody write asm file for me i should pay money ...(much money in my country) </p>
<p>hi.... where you placed new program ??? and my programing language is visual basic v6.0</p>
<p>Hi, The new HEX file is down this page labled IRED(5)HEX. If you use visual basic for programing the ASM file will be no good to you as I program in machine code. Hope this is helpful.</p><p>Jeff</p>
<p>ok friend dont answer me not mind but note the cost of your plane for me about 90 dollar i pay about 90 dollar up to now i dont conclude and this is not mind for you i paddle and try about 2 months and now i am tired.... i just wanted you your original program just it ,ok goodbye and thanks for all your guides dear</p>
<p>Hi, Sorry you are having problems. The program that I have placed here for you should work ok with the circuit changes you have made, infact it should work with my circuit. Can you tell me what programing language you use.</p><p>Jeff</p>
<p>hi jeff i have questions :</p><p>now i dont have programmer ,in this new HEX file after 5 second delay after turn on device ,do the device go three hours delay and then start scan??? and cycles of scanning are 8 minutes ???</p><p>how about after push the PB1 ???</p><p>thanks jeff you are very kind</p><p>i am very very very sorry that pester you , please excuse me</p>
<p>Hi Ata0Ana,<br>Here is the HEX file you requested with the changes<br>made.<br>If PB1 is pressed there will be a delay of 30 minutes<br>and then scan the eye delay, continue until device<br>is turned off or PB1 is pressed.<br>Size of HEX file is 1.38KB,</p><p>Jeff</p>
<p>Hi Ata0An,</p><p>You are correct, the device will start a 1 minute scan after a three hour delay, then start scanning after every 8 minutes. </p><p>If the PB1 is pressed there will be a delay of 8 minutes then the scan cycle will start, 1 minute scan then 8 minutes delay and will continue until the device is turned off or PB1 is pushed</p><p> Hope this is clear.</p><p>I am glad and hope I have been of help to you.</p><p>Jeff</p>
<p>dear can you change program(hex file) again , i want after turn on start scan after 5 Seconds, not 60 Seconds and cycle of scanning be 8 minutes, not 15 minutes thank you</p><p>sorry that i cant change program(hex file) myself</p>
<p>Hi,</p><p>Here is the HEX file with the changes you asked for.</p><p>Please let me kown how you get on with it.</p><p>Jeff</p>
<p>hi jeff please tell me how many frequencies are there in out put of PIC(sixth base) for IR LED sender ??? 38 KHz ??? and give me your hex file original source i want change times of scan .... these are important for me please jeff...i wait you</p><p>thanks</p>
<p><br>Hi Ata0Ana,<br>Sorry for the misunderstanding, but I have replaced<br>the old HEX file with a new one and can be found at<br>step 4, named NEWIR.hex.<br>Please let me know if it works ok for you.<br>Regards,<br>Jeff</p>
<p>hi dear thank you , you are very kind</p><p>i am very very very sorry that pester you , please excuse me</p><p>i inform you certainly</p><p>thanks again</p>
<p></p>
<p>and there are many types of phototransistore but you didnt say me for example: LTR 4206E but i use photo diode(5mm) please say me what is your photo tran number and model exactly?? and dont forget that answer how many frequencies are there in out put of PIC for IR LED sender</p><p>i wait you thanks</p>
<p>Hi,</p><p>You could try a new HEX file(NEWIR.hex) in STEP 4.</p><p>Hope this will solve the problem.</p><p>Jeff</p>
<p>i find this ....what is your idea about it ...</p>
<p>Hi Ata0Ana,<br>I am sorry you are still having problems.<br>This circuit looks ok but I have had no problems with my circuit and I have built many.<br>This is a way to check the IR.<br>1) If you go into the IR testing part and use an <br> infrared television controller and press a button<br> while holding close to the IR tran, this should<br> flash the visible led and activate the sounder.<br>2) If you have a smartphone you can get an app<br> which will let your camera see infrared light,<br> there are a number of them at the app store.</p><p>These steps will show if the infrared part is working<br>correctly.<br>Please let me know what happens.<br>Jeff</p>
<p>and what is it ????</p>
<p>i want use PIR sensor instead of IR photo tran ,how can i do it without change circuit?? must i change circuit ?????</p><p>and this is my new circuit ...</p>
<p>oh i forgot a thing this is that i dont use battery rather i use power supply 3 volt , 500 mA</p>
<p>Hi Ata0Ana,</p><p>I would not recommend R4 lower than 82 ohms.</p><p>R3 will be ok at 3.3k ohm.</p><p>Would be better to bend the IR LED and IR photo tran slightly towards each other.</p><p>Hope this is helpful.</p><p>Jeff</p>
<p>o my god Jeff you finally came back but i deleted R4 and my IR led is healthy and work goodly !!!</p><p>1-can i continue without R4 or i put 27 ohm ??? </p><p>2-and i want decrease R3 to 3.3 kohm , is it ok ???</p><p>3-and do i must bend and recurve just IR led toward IR photo tran???</p><p>thank you Jeff for your attention</p>
<p>hellllo</p>
<p>please answer i cant wait more</p>
<p>i want change R3 of IR tran ????</p>
<p>i deleted R4 but nothing happened and i am sure problem is IR tran , it is not sensitive anywise i changed it with the new IR Tran but nothing happened again... i am very tired and disappointed for wait you if you dont answer me i will kill myself ..... i need my dreams </p>
<p>can i delete this resistor(R4) forever i mean 0 ohm..??? and how i put the IR led and tran together for be sensitive (the black detector in image is in IR transistor 5mm role)</p>
<p>helloooo, any body here ???? M.r Jeff Barnes are you here ??? i have more questions sir </p>
<p>oh excuse me i forgot two things, first i use which color LED ?(blue green or red )</p><p>and the LED how many times flashes(in rem status) ?</p>
<p>first i should say thank you for this reply but i have a question dear</p><p>if i were in &quot;non-rem&quot; Status and the device begins for scan and my eyes moving around slowly(non-rem) so the device will turn on leds and piezo and so i will wake up !!?? i think the IC1 should be adjusted someway that don't sensitive to slow movements,just sensitive to rapid movements ,do i say right my dear??</p><p>and whether i need press PB1 always ? i mean,only needs for press PB1 to be checked once a month</p><p>thanks</p>
<p>Excuse me ,what is the &quot;<a href="https://www.instructables.com/files/orig/F5D/6KKQ/GJHV8DZO/F5D6KKQGJHV8DZO.hex" rel="nofollow">DreamMach.HEX</a>&quot; file ???</p><p>Can i use this file for programming of &quot;IC 12f675&quot; ??? is this file enough?? my mean is dont i need write new program ???</p><p>and other question What is the function(task)of push button(PB1) ??? pleas explain </p><p>thanks dear</p>
<p>Hi Ata0Ana,</p><p>Thank you for showing a interest in my project.</p><p>Yes the file &quot;DreamMach.HEX&quot; is all you need to program the 12f675 PIC.</p><p>As for PB1</p><p>1/ Keep push button(PB1) pressed then turn on with slide switch and release push button(PB1),<br> the LED will flash and piezo will sound,<br> this is to allow adjustment of the LED light intensity VR1 and piezo volume VR2, also to check battery state of charge.<br> 2/ Press button(PB1) until LED only flashes and release, this will enter infrared functionality test, where by moving your eye under closed eye lid, as in REM, should flash the LED and sound the piezo.<br> 3/ Pressing button again, the device will go into the main program or turn off and on(slide switch) device</p><p>.</p><p>This procedure only needs to be checked say once a month, to check state of battery.</p><p>Operation of push button(PB1) when machine is on.<br>If push button(PB1) is pressed the LED will stay on until released then flash once, there will then be a delay of 30 minutes and then it will start to scan the eye a number of times, to check for REM, delay for 15 minutes and repeat until the device is turned off or the push button is pressed.<br>The push button(PB1) can be pressed at any time. This can be used if sleep has been interrupted or one wants to experience Lucid/Dream recall at any other time.</p><p>Hope this is helpful</p><p>Good luck,</p><p>Jeff</p>
<p>hello dear</p><p>dear i want make a &quot;dream machine&quot; just like your device and sorry In order that i can't buy this device of you because i am in Iran. can you help me that i make it ?first i should say i can't work with PIC so can i use AVR instead of PIC, of course with same function???</p><p>and i have an algorithm that i wrote this from your algorithm please check it if a part of this algorithm was not right please help me and edit it until i modify algorithm</p><p>this is my algorithm :</p><p>start</p><p>1- 20 second after turn on device start scan eyes for three times (20 sec delay then scan) and go Second step </p><p>2- 3 hours delay </p><p>3- (after 3 hours) start scan for 3 times if eyes are in rem state go fourth step and if eyes are in non-rem state go fifth step </p><p>4- turn on LEDs and piezo and go sixth step</p><p>5- 15 minutes delay and go third step </p><p>6- 30 minutes delay and go third step </p><p>end</p><p>i wait for your replay</p><p>thank you dear</p>
<p>But it still does not work :)</p>
<p>Hope you figured it out. think it could do with that big ass capacitor?</p>
<p>Hello, I have done some research now and this is the best project I have seen so far. Thank you for sharing it, I am very excited to build it. Has there been any updates since you made this, seeing that it was made in 2010 ? Best regards</p>
<p>Hi i have a problem with infrared triggering the machine is running but only the blink of an eye When moving eyes under closed lids machine not working!I have tried moving the infra red LED and transistor but without success.I also saw a separate picture settings Led and transistor but still without success.</p>
Hi Daksi,<br>Sorry you are still having problems.<br>You could try using different IR trans and leds or I can supply you with<br>the parts I use, say for 5 Euros this includes postage. If this is acceptable let me know
<p>Hi daksi990,</p><p>You could try decreasing the value the IR led resistor R4 to 100 ohms, this will increase the current and therefore increase the light intensity.</p><p>Hope this works out. Thank you for checking out my machine.</p><p>Jeff</p>
<p>Hi i put resistor 68R (68 ohms<a href="http://www.petervis.com/electronics/Standard_Resistor_Values/68R.html" rel="nofollow">http://www.petervis.com/electronics/Standard_Resis...</a>) But still not working!What to do?</p>
<p>I fixed it with this scheme http://217.26.67.168/uploads/3/4/3442892/-transmitter.jpg</p>
can you please provide the flow chart, i want to use avr attiny13. and by the way who writes in machine language these days?
I have a Problem, I don't know I choose transistor IR ? :{ <br> <br>Link: <br>https://www.elfaelektronika.pl/elfa3~pl_pl/elfa/init.do?toc=20389
I like this project. how much if I wanna buy the pre-programmed PIC only(2 pcs). I have all the other components and can solder kits well. I only don't know about PIC programming and so.
Hi goldenshuttle, <br>The cost of two PICs and postage will be 11Euros. <br>Hope this is acceptable. <br>Regards, <br>Jeff
Hi, thanks for this instructable, it looks great. I've never done electronics before but am willing to give it a try. Maplin is the main place to buy components in the UK and I see they are in Ireland too so hopefully you are familiar with them too. Looking at their website the range of components is quite daunting. I wondered whether u could do me a big favour and say what the Maplin product codes are for each component. Would be very much appreciated. Thanks<br>
Hmmm... You know I've always wanted to try one of these devices. Problem there is that I have ZERO experience with micro controllers. :/ What can I say, it's on my 'to do' list.<br><br>Say, I see that your were willing to sell of kits or even complete units. Are you interested in putting together one of these?
Hi Therealfatninja, <br>Glad you found the project interesting. <br>If you are interested in a kit this will cost 35 Euros including recorded postage and for a completed devise 70 Euros also postage included. Sorry I can not offer it at a lower price, the sleep mask is quite expensive. <br>Best regards, <br> Jeff <br>
This is an amazing project that I can not wait to build to assist me in my transition to becoming a more skillful oneironaut.<br><br>It would be even cooler if we could some how communicate with the machine to delay the cycle while we are lucid dreaming. For example a series of special eye movements.

About This Instructable

12,648views

40favorites

License:

More by jeffxxx:Lucid Dream/Dream Recall Machine using infrared. 
Add instructable to: