
Vol. 10: The Brain Machine
Get altered states of consciousness with this microcontroller-driven sound and light device.
+ Downloads & Extras:
Brain Machine Online
Click to download
Weekend Projects Video from the MAKE:Blog
+ LINKS
Brain Machine Kit in the Maker Shed Store
MAKE:Blog Video Podcast
See an interview with Mitch Altman and watch Bre Pettis make and use a Brain Machine.
AVR Freaks
Monroe Institute
The Anna Wise Center
MiniPOV3
Mouser Electronics
POV Kit
» MAKE: NOISE — Discuss this article
You must be logged in to post a talkback.[ Display main threads only] [ Oldest First]
Showing messages 501 through 572 of 572.
Previous Page
- More programming troubles.
You must be logged in to reply.
I'm pretty sure I have everything soldered correctly, but the programming instructions are just plain bad... i hooked up the headphone jack and no sound comes through. the red lights still do the VVVVV pattern though... can i get a step by step from someone?Posted by cdxnolan on June 18, 2007 at 13:28:46 Pacific Time
- More programming troubles.
You must be logged in to reply.
fixed it :DPosted by cdxnolan on June 18, 2007 at 22:15:36 Pacific Time
- More programming troubles.
You must be logged in to reply.
Posted by cdxnolan on June 18, 2007 at 13:26:27 Pacific Time
- soldering, great!! Programming, eh...
You must be logged in to reply.
Hi Mitch,
Things were moving along great until I got to the programming part. My command window doesn't seem to like the word "make". It says "not recognized as an internal or external command". What am I doing wrong?
jimPosted by jvanis65 on June 16, 2007 at 13:24:21 Pacific Time
- soldering, great!! Programming, eh...
You must be logged in to reply.
Hi Jim,
Are you using Windows? If so, did you download and install the January-2007 WinAVR, as instructed on the Ladyada website? Please make sure you did not download the latest version of WinAVR, as it does not work. When you install WinAVR it should let Windows know about "make."
Mitch.
Posted by maltman23 on June 16, 2007 at 23:49:19 Pacific Time
- soldering, great!! Programming, eh...
You must be logged in to reply.
yes got it to work and sound works great, now to make the glasses...thanks.
jimPosted by jvanis65 on June 18, 2007 at 15:00:05 Pacific Time
- The IC...
You must be logged in to reply.
I bought two minipov3 kits, one for practice and the other to build the slm. I successfully completed soldering both kits and then promptly mangled the pins on one of the integrated circuits as I was putting it in its socket. As I straightened out the pins, some of them broke off! I was wondering if I specifically need ladyada's IC with its preprogrammed info or will a "blank" replacement IC of the same type work with your firmware?Posted by evenmadderdawg on June 16, 2007 at 10:40:04 Pacific Time
- The IC...
You must be logged in to reply.
Hi evenmadderdawg,
2 chips -- how frustrating.
First, I'll say a bit about pins on new ICs. New ICs usually come with the pins bent outward a little bit, making them difficult to press into their sockets. Before placing ICs into a socket it is best to make sure that all of the pins are pointed straight down so that all of the pins on the left side of the chip are parallel to all of the pins on the right side. To do this I usually place the chip on its side on a table and gently press down, then turn the chip over on its other side and do the same. It takes a bit of a knack, but once you do it a few times it gets easy.
Note that it is not required that you have the Atmel chip in a socket, but you can solder the chip directly into the PCB. There are a few disadvantages to doing this, however:
- You can burn out the chip by heating it up too much with the solder iron.
- If you make a mistake (such as soldering it in backwards) it is difficult to unsolder the chip from the board to replace it.
- If the chip burns out (which is unlikely) it is difficult to unsolder the chip from the board to replace it.
OK, to answer your question:
You do not need to start with a pre-programmed chip from Ladyada. You can buy an Atmel ATtiny2313V-10PU from Mouser or Digikey, or anywhere else that sells them (they are popular chips).
If you have a new chip you must burn the fuses to set the chip up correctly for programming your firmware. (I mentioned this on the blog for the video, but I'll restate it here.) To burn the fuses, if you are using Windows (it is similar for Mac and Linux/Unix), type in the following command line from a Command Prompt window:
make burn-fuse
with the chip in the socket in the completed PCB, while the MiniPOV is connected to the serial port and with the battery pack switch powered on. Then your chip is ready for programming.
And then you'll be up and running!
Mitch.
Posted by maltman23 on June 16, 2007 at 11:52:35 Pacific Time
- Got it working
You must be logged in to reply.
I received the MiniPOV kit and the extra parts from Mouser, and got my SLM built. It works great.
At first I tried programming it on my Mac + Keyspan USB serial. Regardless of delay given to avrdude, it will not work. I'll look into this as this is my preferred platform. I next tried the January 2007 WinAVR package on a my windows box, and that worked.
The only odd thing is that when it runs the full sequence and the cpu is put into sleep mode, it will not restart at the next power toggle. I have to connect +V to pin 10 to reset, then it runs fine. If the power is toggled while the code is running, it restarts normally. FWIW, my chip is the attiny2313V-10PU. Anybody else have this problem?
Mitch, thanks for putting this project together!
-Brent
P.s. My kit came with 100 Ohm resistors, since a poster below said theirs came with 100k Ohm. 100 Ohm is given in some kits, according to ladyada.net.Posted by AustinMTB on June 14, 2007 at 18:24:16 Pacific Time
- Got it working
You must be logged in to reply.
Hi Brent,
I assume that the 100 ohm resistors are replacing the eight 47 ohm resistors for the red LEDs. This will make the LEDs less bright. That isn't really a problem.
I can't think of any reason why the AVR doesn't reset itself when you power it down and then power it up. The AVR has a built-in Power-On-Reset circuit that is supposed to do this. One thing that you can try:
After the brainwave sequence completes
turn off the power
wait 2 seconds
turn on the power
The added 2 second delay may help.
Mitch.
Posted by maltman23 on June 15, 2007 at 11:02:39 Pacific Time
- Got it working
You must be logged in to reply.
Sure enough, waiting several seconds after the program ends to power it back up works.
I also have it working on OS X now, through a PL2303-based serial adapter ($15 at Fry's), with the osx-pl2303 open source driver. Using a PC with onboard serial is superior, however.
Thanks again, Mitch, it's all working fine, and the light shows are quite interesting.Posted by AustinMTB on June 15, 2007 at 18:56:26 Pacific Time
- Got it working
You must be logged in to reply.
Hi AustinMTB,
It may be helpful to others using MacOS if you would describe what you did to get things working on your Mac setup. Could you?
Thanks,
Mitch.
Posted by maltman23 on June 16, 2007 at 01:43:53 Pacific Time
- Got it working
You must be logged in to reply.
Sure, but I didn't do anything different than the excellent directions on ladyada.net's software page.
Once I had the tools built and installed, the only software issue was the lack of support for "0b00101010" notation in the compiler. This discussion page here described the modifications required to use the B8() macros instead. After changing the slm.c file, slm.hex built fine.
I found that programming the chip on a Windows PC was vastly quicker than on a Mac because of how much slower the USB-Serial adapter is. On Windows with WinAVR, writing the flash is near-instantaneous. On the mac, it took 15-20 minutes, but it worked OK.
I could not get my Keyspan USA-19HS adapter to work at all. It seemed most PL2303-based adapters were sub-$20, so I picked up the cheapest one I could find at the local electronics shop (Fry's) for $15, and got lucky.
So that's basically it. A big thank-you to the Maker community for posting info and helping.Posted by AustinMTB on June 16, 2007 at 18:25:47 Pacific Time
- Program cd
You must be logged in to reply.
I finished soldering, and the lights flashed, but I'm having trouble programming it. When I type cd and hit enter it says "The system cannot find the path specified". I have tried changing the directory to other things and I keep getting the same message. Do you have any idea what the problem may be?
Posted by ice19berg on June 14, 2007 at 18:13:40 Pacific Time
- Program cd
You must be logged in to reply.
Here's a little primer on command prompt commands. I use Windows for this, so I'll be giving examples in it.
If you open a Command Prompt window, you will see a black box with a prompt that looks something like this:
C:\Documents and Settings\Mitch>
This line shows where you are looking at in your hard drive. In our case, we want to be looking in the "slm" directory, and not at "C:\Documents and Settings\Mitch". This is where the "CD" command comes in.
CD directoryname
Change Directory. It changes the directory you're looking at. A directory is a folder that files are stored in.
In our case, we want to look at a directory called "slm". But before we can look at it, we have to create it.
MD directoryname
Make Directory. It makes (creates) a directory that you can then move some files into. In our case, we want to create a directory called "slm", so you type in the following commands:
cd\
md slm
The "cd\" command looks at the lowest level of your hard drive. Then, "md slm" creates a directory called "slm".
After creating the "slm" directory, if you then type:
cd slm
you will be pointed to the "slm" directory, and will see this in the Command Prompt window:
C:\slm>
This is useful if you have some files in the "slm" directory. In our case we want two files in the "slm" directory. How do you get the files there?
The MAKE website has a file called "slm.zip". This zip file is a compressed version of two source files that we need:
slm.c
makefile
Use software such as WinZip to extract the two files from the "slm.zip" file. You can tell the software where to extract the files to. Or, you can just take note of where it extracts the two files and then move them yourself after extraction.
To move the files to the "slm" directory, you can use Windows Explorer, or you can use commands from the command prompt window.
MOV filename
Move file. This moves a file from one directory on your hard drive to another. Let's say that the files we want are in a directory called "mitch" and we want to move them to the "slm" directory that we created. This is what you type in the Command Prompt window:
mov \mitch\slm.c \slm
mov \mitch\makefile \slm
DIR
Directory command. This will list all of the files in a folder. Type in the following after moving the files to the "slm" directory:
cd \slm
dir
You will see something like the following in the Command Prompt window:
Volume in drive C is FRED
Volume Serial Number is 5804-253D
Directory of C:\slm
06/15/2007 10:53a <DIR> .
06/15/2007 10:53a <DIR> ..
04/08/2007 10:28a 88 makefile
09/10/2003 12:36a 79 slm.c
2 File(s) 167 bytes
2 Dir(s) 2,301,190,144 bytes free
Now you can proceed with programming the AVR chip as described in the article.
I hope that helps.
Mitch.
Posted by maltman23 on June 15, 2007 at 10:55:36 Pacific Time
- Using more LEDs
You must be logged in to reply.
>Question: Do you think it would be
>possible to fire the other spare LEDs as
>periphery in the glasses. Maybe have them
>'transition' to the next stage for the
>main center LEDs. Do you even think thats
>worth looking in to?
>
>Posted by radiorental on June 11, 2007 at
>10:21:43 Pacific Time
Yes, this is worth looking into.
Brains emit frequencies across a spectrum, from down to almost DC, up to about 100Hz. Not only that, but they emit varying amplitudes at these frequencies continuously, all at once.
The Brain Machine in this article simplifies things tremendously by only emits one brainwave frequency at a time, and the amplitude is either totally on or totally off. I am amazed at how well this works on almost everyone whose tried the ones I've built. And by now more than 1000 people have tried it.
But it can be even more effective if we model brainwave sequences closer to what the brain actually does when it goes from one state to another and all of the states in between (such as awake to meditation, awake to sleep, etc).
Adding more LEDs would allow emitting more than one brainwave frequency at a time. That makes it easier for your brain to entrain to the various frequencies. The trade-off is that this makes the firmware more complex. (I decided to make the firmware as simple as possible for this project so that it was easier to hack for people just starting out with microcontrollers).
I am currently working on a much more complex version of this Brain Machine. It has 4 LEDs, one for each brainwave type. I am actually using 4 different colored LEDs. The brightness of each LED can be adjusted independently by the firmware. So I can program the Brain Machine to vary the amplitude of each brainwave frequency over time throughout the sequence it produces. This more closely models what goes on in a person's brain. I am also doing something similar with the sound: instead of one pitch, I am using 4 pitches to create a musical chord, with one pitch per brainwave type, with the volume of each being independently adjustable by the firmware. I am finding that separating out the 4 brainwave types into 4 different colored LEDs and 4 different pitches makes this more complex Brain Machine extremely effective for peoples' brains to entrain to.
To study this further, I am building an EEG (an instrument for measuring brainwave frequencies and amplitudes), which will allow me to experiment with all this more rigorously. For those interested in building their own EEG, here is a online community that is working on an open source one that works really well:
http://openeeg.sourceforge.net/
Mitch.
Posted by maltman23 on June 11, 2007 at 12:50:28 Pacific Time
- Using more LEDs
You must be logged in to reply.
I'd like to BUY a Brain Machine. I have had the parts for months, but haven't had time to make it. Anyone interested in a sale?
Thanks, LeePosted by capelee on March 17, 2008 at 08:10:58 Pacific Time
- enviroment for windows
You must be logged in to reply.
Hi, in instructions, inc Ladyada, there's no mention of recomended tools for windows. hehe.. you both just jump from download samples then 'make' (o; I did manage to find a setup of gnu tools but it wont compile. Can you insert a link to a recommended download?
thanksPosted by radiorental on June 09, 2007 at 15:29:07 Pacific Time
- enviroment for windows
You must be logged in to reply.
The ladyada site has a link to the software on her Software page:
http://ladyada.net/make/minipov3/software.html
Here you will see where to download and install everything for Windows (pretty much all flavors), Linux & Unix, and MacOS X.
Please note that if you are using Windows, the software you will download is called WinAVR. Ladyada says that the latest version of WinAVR software has some problems, so please don't use the latest version of the software (20070525). I have been using the 20060421 version, but evidently the 20070122 version works well also.
Mitch.Posted by maltman23 on June 09, 2007 at 16:18:46 Pacific Time
- enviroment for windows
You must be logged in to reply.
Thanks Mitch, followed the instructions to the letter, AVRdude doesnt bring compiling abilities in to the DOS prompt.
Now working through the OSX install. More problems (o;
Also, in the kit I just received, there were 8 100K resistors. Not the 56K? as in the instructions. Dont know if this is an rev in the design or a slip up in packaging. One of the LEDs, the 4th actually, is not as bright as the rest.
Will try sourcing the part specified in the instruction on Monday. This 20 min project is turning in to quite the PITA to get running! (o;
Its a learning exercise - thanks for checking in and following up - appreciated - pauricPosted by radiorental on June 09, 2007 at 19:22:56 Pacific Time
- enviroment for windows
You must be logged in to reply.
After installing WinAVR you should be able to do everything you need to do from the Command Prompt window, including compiling and programming the chip.
What exactly happens when you type "make slm.hex"? Feel free to copy and paste the output.
Regarding the resistors: I guess it is possible that Ladyada made a mistake in putting your kit together. But are you sure you have 100k resistors? There should be no 56k resistors in the kit. The kit should come with eight 47k resistors (yellow - violet - orange - gold) and three 4.7k resistors (yellow - violet - red - gold), and no other resistors.
I have only tried programming the AVR chips with Windows, so I'm afraid I can't be of much help with MacOS or Linux/Unix. I hope someone else can give suggestions if you have questions with MacOS.
Don't fret, we will get your brain hopping to your Brain Machine!
Mitch.
Posted by maltman23 on June 10, 2007 at 01:59:45 Pacific Time
- enviroment for windows
You must be logged in to reply.
Mitch, I could not get the environment working of OSX at the weekend. However, good news: I'm a tool!! I downloaded the latest windows avrdude and no the Jan '07 version as instructed by ladyada.
I now have the make command.. but I left the kit at home (o;
thanks, looking forward to getting this running... and getting some peaceful sleep.
Question: Do you think it would be possible to fire the other spare LEDs as periphery in the glasses. Maybe have them 'transition' to the next stage for the main center LEDs. Do you even think thats worth looking in to?Posted by radiorental on June 11, 2007 at 10:22:18 Pacific Time
- enviroment for windows
You must be logged in to reply.
Mitch, I could not get the environment working of OSX at the weekend. However, good news: I'm a tool!! I downloaded the latest windows avrdude and no the Jan '07 version as instructed by ladyada.
I now have the make command.. but I left the kit at home (o;
thanks, looking forward to getting this running... and getting some peaceful sleep.
Question: Do you think it would be possible to fire the other spare LEDs as periphery in the glasses. Maybe have them 'transition' to the next stage for the main center LEDs. Do you even think thats worth looking in to?Posted by radiorental on June 11, 2007 at 10:21:43 Pacific Time
- enviroment for windows
You must be logged in to reply.
That is kinda strange that the latest released version doesn't work well. I'm glad you got it going with the release from January.
Thanks for the question with your ideas. I'll answer your question in a new thread (please see above).
Mitch.
Posted by maltman23 on June 11, 2007 at 12:12:30 Pacific Time
- Wow
You must be logged in to reply.
Just finished and tried it out. A little loud, but not painfully so. I'm not sure my brain waves changed much, but it was quite a light show! I was surprised at all the colors and patterns that my eyes & brain produced from two flashing LEDs. Just about every color you can imagine.
After I got it put together, I realized that changing batteries may be a bit of a problem. I guess I 'll have to cut the cable ties and maybe leave the battery cover off after installing new ones, so that I can just slip batteries under the cable ties in the future. Has anyone tried that?
Posted by Replicant on June 07, 2007 at 12:35:37 Pacific Time
- couple questions
You must be logged in to reply.
Most of the way built... need to finish last assembly bits. 2 questions:
1. Any thought to being able to change batteries? wire ties and silicone make it kinda hard with the arrangement shown in the magazine, at least it looks that way. I glued the battery lid vertically onto the side of the glasses, with the screw exposed above the top.. I think it might work and allow the battery part to detach. We'll see.
2. Seems rather loud from the hookup-test-drive, even with some largish headphones not ear-buds. Any ideas on quieting it a bit without messing up the RC cutoff?
Posted by edwinh on June 05, 2007 at 23:14:41 Pacific Time
- couple questions
You must be logged in to reply.
hehe,
I installed my battery pack and microcontroller in a small project box and ran a small control tether to the glasses. For me this kept the glasses light weight and allowed me to put the controller on my belt kind of like a walkman. Just open the box, remove the one screw to the batt pack and yer done. The only real down side is that now i have a cable and a box to keep up with but i think for future changes/expansions the project box will prove more than handy at housing additional controls etc.Posted by whc83 on June 24, 2007 at 21:21:24 Pacific Time
- couple questions
You must be logged in to reply.
Yeah, the batteries are not easy to replace with the battery pack positioned as in the photos in the article. Sorry about that! Funny that you're the first person to think about that. Doing as you say sounds like it would work. You could also try gluing the battery pack on to the temple of the glasses with the switch facing the glasses (instead of facing out), and with the switch sticking forward of the lenses. This way the top of the battery pack could slide off, through the cable-ties.
As for a volume control for the audio, you could add one if you like. You could do this using a potentiometer("pot," for short). I think that a 1K ohm dual-ganged audio pot would work well (one pot for each ear, with one shaft that controls both of them). Unsolder the two wires that go from the board to the headphone jack (but leave the ground for the headphone jack connected). Pots have three terminals: two on either end, and one in the middle. Here's what to do for each speaker: the terminal on one end of the pot goes to ground, the terminal on the other end goes to the board where the wire from the headphone jack used to go, and the middle terminal goes to the wire to the headphone jack. Here is a link to a schematic diagram:
http://www.tvbgone.com/volctrl.htm
You can get a dual-gang audio pot from an old junk audio amp, or buy it new for about $3. Here is one from Mouser:
http://www.mouser.com/search/ProductDetail.aspx?R=RV24BF-10-15R1-A1Kvirtualkey14860000virtualkey313-2420F-1K
Mitch.
Posted by maltman23 on June 07, 2007 at 02:16:55 Pacific Time
- couple questions
You must be logged in to reply.
All done. Very strange feeling after a few minutes in.... Need to try it a few more times. Changes I did:
Volume - tried a few mini pots but it seemed too bulky. Just added some 1k resistors in each path and the volume is more to my liking now. YMMV. Also modified the code to use 200.32Hz as a base and changed the others accordingly, it seemed less frantic to my brain.
Battery arrangement works for changing 'em out... I just silconed to the temple part vertically, no ties. Sturdy enough.
Used some felt to put some padding for the graphics as well as darken things.
Also used some black marker on the very tips of the LED's so now the light diffuses around the LED sides a bit rather than 2 superbright points.
Thanks Mitch, was a fun intro to AVR's too. And I hope it helps me relax and clear my head :)
Here's a small picture of my completed slm...
Posted by edwinh on June 07, 2007 at 22:23:01 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
I've got the miniPOV working and accepting miniPOV programs with no problem, but when I try to compile and send the slm firmware I get the following errors:
Compiling: slm.c
avr-gcc -c -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=slm.lst -mmcu=attiny2313 -std=gnu99 slm.c -o slm.o
slm.c:127:58: error: invalid suffix "b0000001" on integer constant
slm.c:139:14: error: invalid suffix "b00000011" on integer constant
slm.c:141:14: error: invalid suffix "b11111100" on integer constant
slm.c:229:12: error: invalid suffix "b01000010" on integer constant
slm.c:233:12: error: invalid suffix "b00000100" on integer constant
slm.c:246:12: error: invalid suffix "b01000000" on integer constant
slm.c:250:12: error: invalid suffix "b00001001" on integer constant
slm.c:255:12: error: invalid suffix "b00000000" on integer constant
slm.c:270:13: error: invalid suffix "b11111000" on integer constant
slm.c:271:13: error: invalid suffix "b11111000" on integer constant
slm.c:272:12: error: invalid suffix "b00100000" on integer constant
slm.c:273:12: error: invalid suffix "b00010000" on integer constant
make: *** [slm.o] Error 1
I'm running Mac OS 10.4.9. Any ideas? I've edited the makefile to my specs and like I said, there are no errors compiling and sending any of the miniPOV programs.Posted by TheCheatOSX on June 05, 2007 at 19:39:24 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
Ran into this. Some versions of the compiler don't have the binary constant patch applied.
See some of the minipov .c files for the "B8" and HEX functions, cut/paste that section into the slm.c. Then change all the 0bXXXXXXXX into B8(XXXXXXXX).
Posted by edwinh on June 06, 2007 at 06:28:39 Pacific Time
- Compiling/Loading Trouble MAC OS X
You must be logged in to reply.
Can you help?? : (
I did the "change 0bxxxxxxxx to B8(xxxxxxxx)"
thing which seemed to get me a step further along. Now I get this error:
make program-slm
avrdude -p attiny2313 -P PL2303-2B1 -c dasa -U flash:w:slm.hex
PL2303-2B1: No such file or directory
avrdude done. Thank you.
make: *** [program-slm] Error 1
Now, if I look in the slm directory, the "slm.hex" file as well as a "slm.ls" have been created, but I still get that error.
This is my first ever attempt at programming so please excuse my ignorance.
Thanks!
Eliot
Posted by eulett on June 12, 2007 at 19:12:30 Pacific Time
- Compiling/Loading Trouble MAC OS X
You must be logged in to reply.
Looks like it can't find your port. Make sure you have "/dev/PL2303-2B1" in your make file for the AVRDUDE_PORT. I forgot the "/dev/" part the first time I edited the make file and I think I got your error.Posted by TheCheatOSX on June 13, 2007 at 11:22:45 Pacific Time
- Compiling/Loading Trouble MAC OS X
You must be logged in to reply.
Thanks TheCheatOSX! Got it now, everything is Groooovvvyyyy!
E.Posted by eulett on June 16, 2007 at 16:23:49 Pacific Time
- Compiling/Loading Trouble MAC OS X
You must be logged in to reply.
Hi Eliot,
I'm not up on programming AVR chips on using MacOS. I hope someone else can give some insight here. In the meantime, there are two websites where you can look where there is info available. One is Ladyada's website:
http://ladyada.net/make/minipov3/software.html
The other is AVR Freaks, a user forum of people all over the world who love answering questions about using AVR micros -- and they answer questions 24/7! The site is very friendly to newbies and pros, and everyone in between. Give it a try:
http://www.avrfreaks.net/
Mitch.
Posted by maltman23 on June 13, 2007 at 00:09:55 Pacific Time
- Compiling/Loading Trouble MAC OS X
You must be logged in to reply.
Thanks Mitch! I'll give them a look.Posted by eulett on June 13, 2007 at 20:02:34 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
This worked perfectly. Thanks! Now if I just knew what any of it means... total AVR n00b but I'm having fun! Thanks Mitch for the project!Posted by TheCheatOSX on June 06, 2007 at 06:56:48 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
I'm glad you're having fun. :)
Binary numbers are also fun!
0bXXXXXXXX represents a binary number to most C compilers. Given that some compilers don't have knowledge of this, the "B8" function can be used in its place.
Binary is really simple, 'cause all you need to be able to do is count from zero to one. As with our "regular" counting (which is base 10), when you hit the max in one column, you change it to a "0", and then add one to the next column over to the left. So, "00" is zero, "01" is one, "10" is two, "11" is three. Cool, yes? Just keep going for 8 columns (which is 8 "bits", which is what the AVR uses, as well as many microcontrollers) and you can count from zero to two hundred fifty five. Or, when sent to an output port with 8 LEDs attached, the binary number can represent which of these LEDs are turned on. Make sense?
Mitch.
Posted by maltman23 on June 07, 2007 at 02:31:02 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
Got everything assembled and working last night and gave it a try. Wow. I was a little skeptical until the first frequency change and I was sucked into this spiraling checkerboard. Very cool. The sound volume was a little loud with earbuds. I found a pair of regular headphone and they worked much better. They also have a inline volume switch so that worked out nice. I brought the SLM into work this morning and everyone is getting a kick out of it.
I put up a completed pic in the Make Flickr pool: http://www.flickr.com/photos/92321539@N00/535459341/Posted by TheCheatOSX on June 08, 2007 at 08:21:28 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
Ran into this. Some versions of the compiler don't have the binary constant patch applied.
See some of the minipov .c files for the "B8" and HEX functions, cut/paste that section into the slm.c. Then change all the 0bXXXXXXXX into B8(XXXXXXXX).
Posted by edwinh on June 06, 2007 at 06:28:21 Pacific Time
- Error on compiling-Mac
You must be logged in to reply.
Thanks for that.
I wondered why Limor didn't use the straight-ahead binary constants.
Mitch.
Posted by maltman23 on June 07, 2007 at 02:20:01 Pacific Time
- Correction
You must be logged in to reply.
Sorry, that should be 30 awg magnet wire.Posted by ice19berg on June 04, 2007 at 15:35:34 Pacific Time
- Correction
You must be logged in to reply.
I think magnet wire is not insulated, except for that enamel. If so, that might cause you a problem. You're going to need more insulation than that provides. Look for 30 AWG wire with plastic insulation on it.
BTW, I had some problems with the wire breaking at solder connections. Seems okay now, though, with lots of RTV adhesive providing strain relief.Posted by Replicant on June 07, 2007 at 18:44:55 Pacific Time
- Correction
You must be logged in to reply.
I think magnet wire is not insulated, except for that enamel. If so, that might cause you a problem. You're going to need more insulation than that provides. Look for 30 AWG wire with plastic insulation on it.
BTW, I had some problems with the wire breaking at solder connections. Seems okay now, though, with lots of RTV adhesive providing strain relief.Posted by Replicant on June 07, 2007 at 18:44:39 Pacific Time
- Correction
You must be logged in to reply.
I wouldn't recommend using magnet wire for use as hook-up wire. It has a lacquer-like crust as insulation which is a pain to strip off. It is easy to scratch the insulation, which makes it pretty easy to unintentionally short out other electronic parts. I would recommend using solid or stranded wire with some sort of plastic insulation, with a gauge between 24 and 30. As I stated elsewhere, my favorite is 30 gauge wire-wrap wire (which is solid). But many other types of wire can be used.
Mitch.
Posted by maltman23 on June 05, 2007 at 00:49:32 Pacific Time
- 30 awg wire
You must be logged in to reply.
I just got back from radio shack where i found everything i needed except the 30 awg wire. They had 3 awg magnet wire and i bought it, but i don't think it's the right stuff. Can i use this, or should i just get lower awg wire?
Thanks,
SethPosted by ice19berg on June 04, 2007 at 15:22:37 Pacific Time
- 30 awg wire
You must be logged in to reply.
Any hook-up wire is fine to use. Other people have used wire from phone cable, stripping wires off of ribbon cables, 24 gauge wire, etc. Feel free to scrounge and use what you have (the electrons won't know the difference).
I like using wire-wrap wire because it is thin and flexible and the insulation doesn't melt and deform when you heat it up while soldering. The down-side of wire-wrap wire is that it is kind of expensive. But if you are going to be building other electronics projects in the future, getting some wire-wrap wire (also known as Kynar) is a decent investment. I'm still using the rolls I bought about 5 years ago (and I do lots! of projects).
Mitch.
Posted by maltman23 on June 04, 2007 at 15:29:19 Pacific Time
- Low-Tech Version of Brain Machine
You must be logged in to reply.
Back in 1959, rtist Brion Gysin and scientist Ian Sommerville created a similar flicker device they dubbed the "Dreamachine". It is simply a large cardboard tube with pattered holes cut into it, attached to a phonograph turntable and a light bulb hanging inside of it. You set the turntable at 78 RPM, turn on the light (the only light in the room), and sit in front of it with your eyes closed. The flashing lights will trigger your optic nerves. According to Gysin, instrumental music will help the effect, but vocal music will interfere since your brain will be trying to understand the lyrics. Wikipedia has a good article on the Dreamachine, as well as a number of related links:
http://en.wikipedia.org/wiki/Dreamachine
For those with no access to a turntable that spins at 78 RPM, 45 RPM plans are available:
http://www.permuted.org.uk/dmpdown.htmPosted by unidyne on June 02, 2007 at 11:23:10 Pacific Time
- Example audio done in ChucK
You must be logged in to reply.
The computer music folks at Princeton created a language called ChucK (http://chuck.cs.princeton.edu/) that does realtime synthesis and many other things. They have downloadable binaries if you want to try it out.
Binaural beats are easy to create by setting one channel to a base frequency, and the other channel to the base frequency plus X Hz, where X is the frequency corresponding to various brain waves (2.2, 6, 11.1, 14.4 are used). In code:
// Define left and right oscillators
SinOsc sl => dac.left;
SinOsc sr => dac.right;
0.75 => sl.gain;
0.75 => sr.gain;
// Define beat frequencies (in Hz)
2.2 => float delta;
6.0 => float theta;
11.1 => float alpha;
14.4 => float beta;
// Base tone: A
440.0 => float baseFreq;
// Define a shortcut function to set frequencies
fun void brainwave(float offset, dur length)
{
baseFreq => sr.freq;
baseFreq + offset => sl.freq;
length => now;
}
// Basic meditation sequence
brainwave(beta, 60::second);
brainwave(alpha, 10::second);
// continue per article's docs...
The code above worked fine on my mac.Posted by AustinMTB on May 29, 2007 at 22:50:03 Pacific Time
- wire wrap?
You must be logged in to reply.
This will be my first attempt at projects like this, and im just trying to clarify what the Kynar wire is. From what i can gather, its just a 30 gauge wire that you connect things with, right?Posted by darkarchives on May 29, 2007 at 17:37:16 Pacific Time
- wire wrap?
You must be logged in to reply.
You are correct. Kynar wire is a fancy name for wire-wrap wire. It is not necessary to use wire-wrap wire for this project, so feel free to use any kind of hook-up wire you like.
I like wire-wrap wire because unlike most hook-up wire, the insulation doesn't deform or shrink when it is heated up by the solder iron, making it easier to avoid inadvertent shorts on the circuit board.
The down side of wire-wrap wire is that it is expensive. But if you are going to be making other electronic projects, it is well worth the investment, as a couple of spools of this stuff could last you many years.
Mitch.
Posted by maltman23 on May 30, 2007 at 16:47:09 Pacific Time
- Other scripts or effects?
You must be logged in to reply.
ANyone know of any other scripts or effectst that would be compatible with this device (and a place to get the c files?)Posted by chembro84 on May 29, 2007 at 16:36:55 Pacific Time
- A Brain Wave Machine in 2 minutes
You must be logged in to reply.
The article says that the audio part alone can entrain the brain. I don't have a mini POV kit but I do have a computer so why not using it to generate the binaural beats.
I don't know whether the thing really induces hallucinations or not but here's a quick way for you guys with a Mac to check:
Audio ToolBox is a audio function generator for the Machintosh that can do the job required here. It can be downloaded
here as a trial version.
The really cool thing about it is that it can be controlled via AppleScript. You can write a script to generate the sequence of binaural beats.
I've posted a script here. It is a very simple sequence and my first Apple Script so... please be indulgent!
Posted by LeGazier on May 26, 2007 at 20:56:34 Pacific Time
- A Brain Wave Machine in 2 minutes
You must be logged in to reply.
You will not have visual hallucinations with only the audio, but you will be able to entrain your brain to an audio sequence without the blinking lights.
If you are not sensitive to blinking lights, please check out using it with them, since the visual hallucinations you see are fascinating!
If you would like to build a Brain Machine without buying a MiniPOV kit, here is a link to a sight that gives the plans for building a Brain Machine by connecting LEDs and headphone speakers on a parallel port, complete with software and schematic:
http://www.hackcanada.com/homegrown/wetware/brainwave/
Mitch.
Posted by maltman23 on May 30, 2007 at 16:52:17 Pacific Time
- A Brain Wave Machine in 2 minutes
You must be logged in to reply.
You might want to check this little app out as well. I've been using it for a while now:
http://uazu.net/sbagen/Posted by TentacleJoe on May 30, 2007 at 16:33:24 Pacific Time
- Entrainment?
You must be logged in to reply.
I searched this but didn't see much credible evidence on the subject. Has anyone tried this device or one similar to achieve altered brain states?Posted by buchacho on May 18, 2007 at 16:58:25 Pacific Time
- Entrainment?
You must be logged in to reply.
Unless you are sensitive to blinking lights, why not try it out and see how it works for you? At the Maker Faire several hundred people tried out the Brain Machines I had at my workshop. Most people had a great time with it, almost everyone enjoyed the hallucinations. Lots of people sat through the entire 14-minute meditation sequence and said that it worked great for them.
This is only anecdotal, but it's way promising.
I am in the process of building an EEG so that I can conduct my own double-blind experiments. I'm using the plans from OpenEEG:
http://openeeg.sourceforge.net/doc/
Some folks from Roboexotic.org were at the Maker Faire with one of their cocktail-mixing robots, complete with brainwave input using the OpenEEG (to determine the perfect ration of vermouth to gin for your state of mind!). After the Faire we hooked the EEG up to me while I was using the MAKE Brain Machine I built, and there was a very definite correlation between the amplitude of Alpha waves my brain produced when the Brain Machine was outputting Alpha waves on the LEDs and headphones.
Mitch.
Posted by maltman23 on May 30, 2007 at 17:03:10 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Hi Mitch,
I am an administrator at www.dreamviews.com/community. We are a lucid dreaming site and discussion often turns to brainwave entrainment, especially in regards to meditation and programming your mind to have lucid dreams. I invite you and all the readers of this magazine to visit us. I will also be posting a topic with a link to this article.
Mitch, have you ever given thought to developing a device similar to the Nova Dreamer?
Regards,
SeekerPosted by Seeker_dreamviews on May 18, 2007 at 09:44:00 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Hi Seeker,
Thanks for pointing me to your website, as well as the Nova Dreamer. I wasn't aware of either before.
I am currently working on a more complex Brain Machine. This one can output 4 brainwave frequencies at once (on both sound and light), and vary the amplitude of each independently. The Brain Machine I wrote about for the MAKE article seems to work really well for lots of people, but this more complex one shows even more promise with my friends who have volunteered to be guinea pigs.
I am currently building an EEG so that I can experiment with tweaking the various values of the more complex Brain Machine. I'm excited to get values that work on the most people.
I'm gearing this towards helping people sleep, since so many people have trouble sleeping in our crazy modern world.
If I can get values that work well, then adding a feedback mechanism to the Brain Machine would be fun for trying out lucid dreaming, as well as other bio-feedback experiments.
Mitch.
Posted by maltman23 on May 30, 2007 at 17:19:55 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Mitch,
Thanks a lot to you, for an additional device to fiddle with my brain!
I'm using the openEEG for my meditation, very invaluable. So thought I can contribute something here.
I have took some snapshots of my brainwave while using your SLM device. Wonderful result! It works!!
I hosted my images at my blogs at
http://induraj.blogspot.com/
I've planned to take a detailed time orientated screenshots along with SLM frequency tables, so it would be easy to compare the images with SLM's frequency table.
Thanks again. I'll post my next snaps with including Delta, Theta, Alpha and Beta.
-Aru
Posted by induraj on March 23, 2008 at 20:51:57 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Hi Aru,
That is way cool! Thank you for posting your results. I am very curious to see if your Theta and Delta also correlate with the Brain Machine sequence.
I also built the OpenEEG. What you have done is exactly what I would like to do with my OpenEEG. But I haven't had any luck getting electrodes to work (I couldn't get Pedro's active electrodes to work, and haven't had time to make any others yet).
If you wouldn't mind answering some questions for me, I'd appreciate it. What are you using for electrodes? Where do you place them on your head to get your measurements? Also, what software are you using?
Best regards,
Mitch.
Posted by maltman23 on March 26, 2008 at 19:59:43 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Hi Mitch,
I apologize for the delayed response! I was on a long vacation. Ive updated my blogs with OpenEEG box I build along with DIY passive electrode and cables/connecters etc.
I was using eval version of BioExplorer, I think I might go back to BrainBay which is equally powerful software.
The image that you saw in my blogs are taken with BioExplorer software and the electrode placement location where F3 to O3 (right hemisphere).
Currently, Im tingeing with an opensource game Super Tux Kart so that you can use the game for Biofeedback.
Thanks,
-Aru
Posted by induraj on April 25, 2008 at 10:21:11 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Hi Aru,
I hope you had a good vacation. I just got back from China, myself (to manufacture ready-made versions of the Brain Machine, and also to make TV-B-Gone Pro SHP, and also to enjoy my travels. :)
Thanks for the info. I'll be trying my OpenEEG with passive electrodes soon.
Please let me know the results if you try and correlate the timing of your brainwaves with the timing of the Brain Machine while your wearing it hooked up to the OpenEEG. I am way curious to see if there is a correlation.
Cheers,
Mitch.
Posted by maltman23 on April 29, 2008 at 06:33:08 Pacific Time
- Applications for Lucid Dreaming
You must be logged in to reply.
Mitch,
Thanks a lot to you, for an additional device to fiddle with my brain!
I'm using the openEEG for my meditation, very invaluable. So thought I can contribute something here.
I have took some snapshots of my brainwave while using your SLM device. Wonderful result! It works!!
I hosted my images at my blogs at
http://induraj.blogspot.com/
I've planned to take a detailed time orientated screenshots along with SLM frequency tables, so it would be easy to compare the images with SLM's frequency table.
Thanks again. I'll post my next snaps with including Delta, Theta, Alpha and Beta.
-Aru
Posted by induraj on March 23, 2008 at 20:51:06 Pacific Time
- minipov2 fixed
You must be logged in to reply.
Wouldn't you know it, ten minutes after I post, I get it fixed.
Change
AVRDUDE_PROGRAMMER = dasa
to
AVRDUDE_PROGRAMMER = dt006
change port to
AVRDUDE_PORT = lpt1
and in default target add slm.hex
all: begin gccversion \
minipov.hex all_leds.hex alt_leds.hex mypov.hex test_leds.hex \
largeimage.hex slm.hex\
finished end
this is all in the makefile supplied by Mr. Altman.
Now my MiniPOV2 is an SLM!
Posted by tenax8 on May 17, 2007 at 10:37:33 Pacific Time
- minipov2 fixed
You must be logged in to reply.
I'm glad you got it working. Thanks for posting how you did it.
Mitch.
Posted by maltman23 on May 30, 2007 at 17:21:07 Pacific Time
- SLM with miniPOV2?
You must be logged in to reply.
I have a miniPOV2 (which programs via the parallel port) that I am trying to make into an SLM, but I am running into problems with writing the slm.hex file to the chip.
In the makefile, I have changed the fourth line to:
AVRDUDE_PORT = lpt1
and I have a feeling that I should be changing the previous line
AVRDUDE_PROGRAMMER = dasa
to something else, but I don't know what. It seems that dasa is a programmer that utilizes the serial port, and I assume we are using it because we are writing to ROM on the chip? but beyond that I don't rally understand.
Suffice it to say, I am newb.
All of the source code for miniPOV2 from ladyada.net works fine, including her makefile. I have created slm.hex using her makefile, but still get errors when writing it to the chip.
Does anyone have any ideas about this? Or can we get code that works with miniPOV2?
thanksPosted by tenax8 on May 17, 2007 at 10:15:34 Pacific Time
- question about capacitors
You must be logged in to reply.
Hi ! looks like a cool experiment! I might give it a try...
I see that in the magazine the capacitors values are 1uF and that in the schematic that you put online at :
http://makezine.com/images/10/SLMschematic.pdf
they seem to be .1uF ...
what would be best to use ?
also does "bipolar capacitors" stand for regular electrolytic capacitors or is it something special that I don't know about ?
thanx good job for the article!Posted by phil.savard on May 17, 2007 at 10:15:10 Pacific Time
- question about capacitors
You must be logged in to reply.
The capacitor isn't really required, but it helps make the audio a bit less harsh by rounding out the square-waves into something closer to sine-waves. If you don't have these capacitors, you can just leave them out (though it is nicer with them in).
1.0 microfarad is the correct value. They don't really need to be bi-polar, but if you use regular electrolytic capacitors then you need to be sure to solder the negative lead to the negative trace of the MiniPOV board (which is at the edge of the board).
Mitch.
Posted by maltman23 on May 30, 2007 at 16:42:35 Pacific Time
- question about capacitors
You must be logged in to reply.
the schematic has info on how the RC combo creates a low-pass filter. It's important to preserve the cutoff frequency of the filter. The values that yield the 160Hz cutoff are 1000 Ohm and 1 uF. If you use 0.1 uF you'll end up with a cutoff of 1600Hz; you won't have a sine-like wave any more.Posted by theroz on May 22, 2007 at 19:02:58 Pacific Time
- question about capacitors
You must be logged in to reply.
the schematic has info on how the RC combo creates a low-pass filter. It's important to preserve the cutoff frequency of the filter. The values that yield the 160Hz cutoff are 1000 Ohm and 1 uF. If you use 0.1 uF you'll end up with a cutoff of 1600Hz; you won't have a sine-like wave any more.Posted by theroz on May 22, 2007 at 19:02:04 Pacific Time
- question about capacitors
You must be logged in to reply.
Bipolar=two poles, which would also mean electrolytic capacitors since they have two polesPosted by buchacho on May 19, 2007 at 23:06:07 Pacific Time
|
Showing messages 501 through 572 of 572. |
Join the conversation -- every MAKE article has an online page that includes a place for discussion. We've made these RSS and Atom feeds to help you watch the discussions: subscribe.











