The Brain Machine
Read this article in MAKE:
10: Home Electronics, Page 88.
To get MAKE, subscribe or purchase single volumes.
Get altered states of consciousness with this microcontroller-driven sound and light device.
By Mitch Altman
Photos by Sam Murphy
Illustrations by Timmy Kucynda
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 1 through 250 of 423.
Next Page ![]()
- Arduino? again.
You must be logged in to reply.
Now... what if... i purchased the ATtiny2313 microcontroller and used it with the arduino, and programmed it with the arduino ide... how well would that work?Posted by lilbuzhr on July 01, 2009 at 21:56:20 Pacific Time
- Arduino? again.
You must be logged in to reply.
alas, not at all.Posted by foobert on July 03, 2009 at 05:50:22 Pacific Time
- Arduino?
You must be logged in to reply.
Would the firmware with this project work if i wanted to use the arduino instead of the POV modification? If not, is there something minor i could tweak to make it work?Posted by lilbuzhr on June 24, 2009 at 18:12:42 Pacific Time
- Arduino?
You must be logged in to reply.
couple of things to note. the big one is the clock rate. an arduino runs at twice the speed of a minipov3. pretty much everything in the brainmachine firmware is dependent on the clock. if you have an isp programmer, you can slow the arduino down and load the lilypad bootloader which is set up to run at the lower speed.
second thing is that the registers used to put the processor to sleep at the end of the sequence are different. the code to put the arduino to sleep will be -
SMCR &= ~((1 << SM2) | (1 << SM1) | (1 << SM0));
SMCR |= (1 << SE);
sleep_cpu ();
</code>
you won't be able to build the brain machine in the arduino environment, but you'll already have all the tools you need to build it from the command line.
you'll have to modify a couple of lines in the Makefile that is used to build the brain machine firmware.
the first three lines of Makefile should be -
MCU=atmega168
F_CPU=8000000
AVRDUDE_PROGRAMMER = stk500 -b 19200
once these changes are made you can just get to a command line and type
make program-slm
note that these suggestions are not tested, but are born of a good deal of experience playing with slm code for the arduino.
best of luck.Posted by foobert on June 26, 2009 at 06:31:36 Pacific Time
- Arduino?
You must be logged in to reply.
alas, i do grow weary of correcting myself. here are a couple of more trivial, but necessary changes.
oc0a moves from portb on the tiny2313 to portd pin 6 on the mega168. oc1a on the mega168 is on portb pin1, which is used for an led on the brain machine.Posted by foobert on June 29, 2009 at 05:44:51 Pacific Time
- Arduino?
You must be logged in to reply.
just a little more information.
to alter the arduino fuses to select the internal oscillator at 8MHz using a usbtinyisp from ladyada use the following from a command line -
avrdude -c usbtiny -p m168 -U lfuse:w:0xf2:m
then with the arduino still connected to the usbtinyisp start up the arduino environment and from the tools menu select boards, then lilypad arduino. then from the tools menu select burn bootloader then usbtinyisp.Posted by foobert on June 26, 2009 at 07:09:49 Pacific Time
- Arduino?
You must be logged in to reply.
sorry, the avrdude command line as given will give you a 1MHz clock. try this instead...
avrdude -c usbtiny -p m168 -U lfuse:w:0x62:mPosted by foobert on June 26, 2009 at 12:25:41 Pacific Time
- Programming the SLM with different tables
You must be logged in to reply.
How would I go about programming my slm to use a wider range of specific frequencies, which vary from 1 to 400hz?
Its a wide range I know, I think the number of different frequencies is about 40. The reason being that, specific frequencies have certain effects upon different areas of the body/organs which can affect healing etc.Posted by whc83 on May 15, 2009 at 22:43:17 Pacific Time
- Programming the SLM with different tables
You must be logged in to reply.
Hello, whc83,
You can easily create whatever frequencies you like by hacking the free and open-source firmware that is available for download from the above link, or the latest version from my website:
http://www.CornfieldElectronics.com
(click on the "maker faire" tab).
The firmware is well documented with comments, and there is further documentation in the link above.
Please feel free to ask specific questions if you have any during your hacking.
Happy hacking!
Cheers,
Mitch.
Posted by maltman23 on May 21, 2009 at 21:38:28 Pacific Time
- Programming the SLM with different tables
You must be logged in to reply.
Im trying to have fun:)
Im getting lost in the programming, in determining what is actual code versus strictly comment. Can you identify those sections of code that are used to calculate the frequency tables etc? is the language pretty standard or is it different for each chip? Can I buy a assembler for dummies book...lolPosted by whc83 on May 23, 2009 at 18:18:31 Pacific Time
- Programming the SLM with different tables
You must be logged in to reply.
The firmware is written in the "C" language. And there actually are a lot of good books on learning "C". There is also AVRfreaks.org, which is a great resource for all things AVR, including gcc, the version of C used for this project (and most AVR microcontroller projects).
In "C", sections of comments start with these two characters:
/*
and end with these two characters:
*/
Also, comments that are only on one line begin with these two characters:
//
(and the end of the comment is the end of the line).
Most of the firmware for this project is actually comments!
The frequencies for the sound are determined in the main routine and the do_brainwave_element function. The main routine determines the base frequency (the frequency in one ear the does not change, and the offset frequency is determined in the do_brainwave_element function. The number in the OCR0A register determines the base frequency, as described in the comments. The number in the OCR1A register determines the offset frequency, as described in the comments.
See if you can make sense of the firmware's comments. Feel free to ask specific questions (though, unfortunately, this blog is not really a good place for teaching and learning the "C" language).
Cheers,
Mitch.
Posted by maltman23 on May 24, 2009 at 07:22:41 Pacific Time
- sound
You must be logged in to reply.
Hi again Mitch,
Unfortunateluy I believe I am still having problems getting the brain machine up and running.
Sorry to be a pain but I get the distinct feeling the sound is wrong. Instead of a 'spacey' woo, wah noise I get an intrusive beeping pulse. If this is correct then thats ok but I do feel it's not so if perhaps you might know of an audio file of video out there that demonstates the correct sound that would be great.
Also I have been looking around at some of your other projects and thought you might be interested in mine. I'm a final year undergraduate multimedia student in Huddersfield UK and am creating an installation piece for my final project.
I am planning to use your brainwave kit as audio for the project and want to investigate the effects of different stimui on the body.
Funny because my project uses leds for its visual too (albiet far more) but it's only now i've come across this project.
Anyway here's my projects blurb, it's called sensation seeker:
Sensation Seeker is an installation project created to provide an abstract representation of an experience within a self-contained environment. A completely immersive and interactive portrayal of a physical act, presented in a custom built space in order to satisfy a need for variation in modern life. The initial experience used within this concept design uses biometric and geographical data recorded from a skydiver during a jump. This data is remixed to provide a visual, auditory and sensory journey through the flight offering a break from day to day reality.
Please feel free to check out the development blog @ www.gregpidgeon.com. Think it might interest you
Cheers
GregPosted by bigpidge on May 02, 2009 at 04:35:18 Pacific Time
- sound
You must be logged in to reply.
Hi Greg,
Did you burn the fuses of the microcontroller?
make burn-fuse
The "fuses" are a bunch of special bits in flash memory of the microcontroller that tells the microcontroller how to start itself up when power is applied. One of the important bits tells the microcontroller to start using the internal oscillator at 8MHz. If this fuse bit is not changed from the default, then all of the timing (including the audio) will be 8 times slower (since the default is for the microcontroller to start itself up with the internal oscillator at 1MHz).
The projects you are working on using RGB LEDs and binaural sound look very intriguing. If you have an installation, I'd very much like to check it out.
Personally, I try to encourage people to get into real reality, rather than escape it, which is a big motivation of why I do my projects. My hope is that people will find ways of making choices that effect their lives in ways they find fulfilling, helping make our every day reality cool enough to be something we do not want to take a break from. :)
Best,
Mitch.
Posted by maltman23 on May 03, 2009 at 11:48:52 Pacific Time
- sound
You must be logged in to reply.
Thanks Mitch I'll give it a go.
In response to your thoughts on engaging with life I absolutely agree.
I don't think it's absolutely clear from the blog perhaps but the installation is partly based upon the unrealistic claims of the 50's toward technology solving every problem of the our times. From robotics to solve domestic chores to flying cars. A great deal of those promises were never delivered. My piece is a retro idea that 'why participant when you can simulate', an outdated notion from the early technological revolution. I think true virtual reality is can sometimes be negative, as you say it stops people from fully engaging in life.
The piece is on exhibition in 3 weeks here in the UK, I imagine that you state side so I can certainly send you some promotional material and pictures after completion if you would like to send me you email. Mine is gregpidgeon51@gmail.com.
Thanks again, hope to keep in touchPosted by bigpidge on May 04, 2009 at 01:19:03 Pacific Time
- update
You must be logged in to reply.
I have left the minipov running to see if the audio stops after the 14 minute cycle as it should and it doesn't. Could it be something to do with the internal timer??Posted by bigpidge on May 02, 2009 at 05:23:55 Pacific Time
- compiling and programming the microcontroller
You must be logged in to reply.
Hi,
I have worked up to 1e / 1f of this project and have gotten a little stuck.
I have created the slr folder complete with MiniPov firmware in it and am looking to upload / compile to the MiniPov.
In the documentation it outlines the code that would be used under windows and directs those with other os to the MiniPov website.
I am running Mac OS X 10.5 (leopard) and am having trouble finding what code to use in terminal to compile the slr firmware instead of the standard 'minipovfirmware'.
I am a new terminal user so apologies if this is an obvious question but if anyone can help it would be much appreciated.
CheersPosted by bigpidge on April 30, 2009 at 15:54:50 Pacific Time
- compiling and programming the microcontroller
You must be logged in to reply.
Hi bigpidge,
Sorry you're having trouble. There are really good step-by-step instructions for setting up the software on MacOS, Linux, and Windows at:
http://ladyada.net/make/minipov3/software.html
Scroll down the page until you see where it says MacOS X
That should get you going.
Best,
Mitch.
Posted by maltman23 on May 01, 2009 at 11:26:07 Pacific Time
- compiling and programming the microcontroller
You must be logged in to reply.
Thanks for the swift reply and advice Mitch.
Think I've found the answer, it's to do with using the 'cd' - change directory command to identify the target folder before actioning any program commands.
I'm off to carry on now, i let you know how it goes
GregPosted by bigpidge on May 02, 2009 at 01:45:11 Pacific Time
- installing avrdude
You must be logged in to reply.
My avrdude program is not installing. Could u tell me what might be the problem?Posted by DaChosen on December 04, 2008 at 04:53:53 Pacific Time
- installing avrdude
You must be logged in to reply.
Installing the programming software is different depending on your Operating Sytem. Which OS are you using? Complete (and excellent, easy to follow) instructions for installing are on the Ladyada website:
http://www.ladyada.net/make/minipov3/software.html
See if that helps.
Mitch.
Posted by maltman23 on December 04, 2008 at 12:47:56 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
Hi guys,
I just build the SLM, its my first project in soldering. I bought the -20PU Atmel, of course the frequencies for the sound are not right (a buzzing sound). LEDs seem to be alright, I am not sure.
But anyway - the sound. In the slm.c file there is a value of 9637 (e.g. beta waves) at the channel OCR1A at 8 MHz. I divided by 2.5 (=20 MHz) and used 3854 for one ear. Sounded good, could be 400 Hz.
The other ear (OCR0A) has a value of 38... what the heck.. I dont really know how to change that... :-/ Anyone an idea?
Thanks!Posted by ollifreund on November 28, 2008 at 10:55:21 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
unless you added a 20MHz oscillator and altered the fuse settings, it should not be necessary to fiddle with the timers.
most likely what is going on is that you didn't change the fuses from the factory defaults. this will result in the chip running at 1MHz rather than 8MHz.
try "make burn-fuse" to set the fuses, then load the unaltered slm firmware.Posted by foobert on November 30, 2008 at 09:27:58 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
Yeah, the 20MHz chip really means that the chip runs at various speeds up to 20MHz. But both the 20MHz chip and the 10MHz chip will run at 8MHz when used with the internal oscillator, if you tell it to do so.
The main difference between the 10MHz chip and the 20MHz is that the minimum voltage for the 10MHz chip is lower, so the batteries will last longer. But with two AA batteries running the Brain Machine, they will last pleny long with your 20MHz chip.
As foobert said, you will need to program the fuse bytes to tell the chip to run at 8MHz on the internal oscillator. And to do that you do as foobert said:
make burn-fuse
That should get you going at the right speed.
You need to burn the fuse bytes since by default, the microcontroller runs at 1MHz on the internal oscillator, and changing the fuse bytes let's the chip know to run at 8MHz on the internal oscillator.
Mitch.
Posted by maltman23 on December 03, 2008 at 18:11:35 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
Okay, thanks guys, I needed to burn the
fuses.
Right now I'm trying to add several
frequencies (1-15 Hz, in 1 Hz increments),
but somehow it doesnt work. Can be
pretty frustrating (this is my first
electronic project).
I used super-bright LEDs, the normal
ones were not bright enough.
Tried the default program 3 times, didnt
notice anything. I am not experienced in
meditation. I will try to get into an
EEG laboratory next week and try the
program twice. If I get it done, I'll
post it here.
Is there any place on the net to download
alternate slm.c ?Posted by ollifreund on December 05, 2008 at 09:58:03 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
Okay, thanks guys, I needed to burn the
fuses.
Right now I'm trying to add several
frequencies (1-15 Hz, in 1 Hz increments),
but somehow it doesnt work. Can be
pretty frustrating (this is my first
electronic project).
I used super-bright LEDs, the normal
ones were not bright enough.
Tried the default program 3 times, didnt
notice anything. I am not experienced in
meditation. I will try to get into an
EEG laboratory next week and try the
program twice. If I get it done, I'll
post it here.
Is there any place on the net to download
alternate slm.c ?Posted by ollifreund on December 05, 2008 at 09:57:56 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
i built a slightly modified brain machine with the audio on the two middle outputs so they both could use timer1, then rewrote the firmware. beat frequencies of 2Hz to 16Hz are available in 1Hz increments. the firmware is designed for rgb leds, but connecting just the red will work fine. another advantage is that the brightness of the leds is controlled by the firmware. for more info, see http://forums.ladyada.net/viewtopic.php?f=25&t=6688
Posted by foobert on December 06, 2008 at 05:17:57 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
Cool -- glad you got the Brain Machine going. :)
So, now that you are trying to hack the original program by creating 1Hz increments, what, exactly, are you doing to try to make that happen, and what, exactly, does not work?
Everyone has different sensitivities to light. Some find the LEDs provided to be too bright, but most like them with this brightness. If you use super bright LEDs, they may be too bright. If you find that your eyes are feeling like they are fluttering or tearing, then the LEDs are too bright. If the lights are not comfortable it will be difficult to relax into the lights, as well as the ensuing hallucinations. Are you seeing any patterns or colors?
If you try out the Brain Machine with an EEG, please post your results here. It would be really cool to see if you can get some correlation between your brain waves and the Brain Machine's output.
Mitch.
Posted by maltman23 on December 05, 2008 at 10:23:01 Pacific Time
- programming the 20 MHz chip
You must be logged in to reply.
Hello.. I am wanting to program my 2313 to blink at specific frequencies other than those used for the SLM .. I am looking at frequencies between 1 an 180 hz. Any recommendations or examples of how to write that out?
Thanks
BillPosted by whc83 on May 05, 2009 at 21:35:22 Pacific Time
- programming using Mac OSX and serial-usb cable
You must be logged in to reply.
Hi - Great machine! I'm trying to get mine programmed.
I'm using a USB-serial cable, and going through mac osx. I've done everything instructed on the ladyada site for running on a mac, including installing xtools - and have managed to install the firmware and check the fuses, as described here http://ladyada.net/make/minipov3/software.html
So now, I'm at a point in your instructions where I run 'make program-mypov' and 'make program-slm'
In both situations I get a similar error, using program-mypov as an example:
----------------------------------------
make program-mypov
avrdude -p attiny2313 -P com1 -c dasa -U flash:w:mypov.hex
com1: No such file or directory
avrdude done. Thank you.
make: *** [program-mypov] Error 1
----------------------------------------
I'm assuming this doesn't indicate a successful program. Is there somewhere in the code that I can edit to tell it where the usb-serial is located? Something else?
The only clue I can offer is when installing the firmware I was supposed to type into the terminal window: avrdude -p t2313 -c dasa -P /dev/cu.usbserial-FTCYG5C --- which didn't work until I changed the "cu.usbserial-FTCYG5C" bit to read "cu.PL2303-0000201D" which was the name of my serial port when I ran that "ls /dev/cu.*" command. Is this a clue to getting the program-slm and program-mypov commands to work? Also, what would correct code look like?
Any help extremely appreciated. This is my first chip project and very unfamiliar with coding. Thanks in advance.Posted by m880 on October 29, 2008 at 09:09:53 Pacific Time
- programming using Mac OSX and serial-usb cable
You must be logged in to reply.
Hey - Just as an update, or for others needing this - i got it to work. Or it's writing right now.
What worked: Open the makefile with a text editor and change "AVRDUDE_PORT = com.1" to be "AVRDUDE_PORT = /dev/USBserialname"
... the "USBserialname" being the name given when you prompt ls /dev/cu.* in the mac install on this page http://www.ladyada.net/make/minipov3/software.htmlPosted by m880 on October 29, 2008 at 11:14:50 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
Posted by yavid on September 09, 2008 at 11:20:50 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
Hi yavid,
I've experimented with different colors, and haven't found anything too cool to happen. But that's maybe just me. Eyelids do seem to filter for red light. But if you try out different colors and get some interesting results, please post about it.
Cheers,
Mitch.
Posted by maltman23 on September 09, 2008 at 12:06:55 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
Sorry Mitch, my post seemed to have gotten cut off there. My idea is to make a brainwave machine with a dimmer and RGB LEDs. I'd mount the LED's behind light diffusing plastic. I am hoping that by doing this the user could use the machine with their eyes open and experience the colors.
On the software side of things I'd like to see the color of the LED to slowly transition from one color to the next as the machine transitions from one frequency to the next. The colors would be paired to the brainwave you are trying to achieve (as an example I read in another Make article that blue is good for alpha).
I think I have a good idea, trouble is I have no idea where/how to start. Can you point me in the right direction? Would I be able to accomplish this by adapting your schematic and firmware? I was also thinking maybe I could adapt a couple of BlinkM's to do this? I really don't know anything about electronics but I'd like to learn, just need some guidance.
Thanks in advance.Posted by yavid on September 11, 2008 at 13:24:03 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
yavid,
i finally got around to building a minipov rgb brain machine yesterday. only one bug in the tiny2313 version of the firmware. see this thread at lady ada's forums for a description. scroll down to the 9/23 entry for the minipov version.
last night i had it flashing blue instead of red and rather than the usual geometric visuals i was seeing washes of color and at the end was seeing forest scenes.
anyway, take a look. i think you'll like it.
bobbyPosted by foobert on September 24, 2008 at 07:39:24 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
Thanks Bobby. I noticed in the ladyada forum you say the led washes from green to blue while the red flashes? Is it possible to change the firmware to do what I'd like to attempt (colour slowly changing with the flashes).Posted by yavid on September 30, 2008 at 13:08:16 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
that should be possible. as mitch has pointed out red is the easiest color to see through closed eyelids. i've tried blinking blue, using a 3.3v supply with leds with a nominal vf of 3.4v on the blue and though i can see it, it's not nearly as bright as the red.
the reason i did one color blinking while two fade continuously is that it was easy to code to test the hardware, but i really liked it and never procreeded to do anything further.
the main trick to color fading is calculating a step size depending on starting and ending colors and the length of the fade. the numbers are usually pretty small, so integers don't really cut it.
the trick will be to make sure you always have enough light so that the blinking will be visible.Posted by foobert on October 06, 2008 at 01:54:38 Pacific Time
- Brainwave machine with RGB leds
You must be logged in to reply.
mitch,
i built an rgb brain machine that flashes the red while fading the blue and thr green in and out. it seems to me that the visuals are considerably more colorful. i used a 3.3 volt boost supply so the blue and green are very bright.
had one interesting experience. i was concentrating on my breathing as advised, but began to find breathing to be distracting and tried to stop. almost worked.
if nothing else the fading blue and green leds make it more interesting to watch someone else using it.Posted by foobert on September 09, 2008 at 18:05:08 Pacific Time
- Brain Machine workshop in Washington, DC
You must be logged in to reply.
If anyone happens to be in or around Washington, DC -- I'll be giving another Brain Machine making workshop at HacDC on Sunday, 6-September, at 2pm. The workshop is free, but I'm asking people to reimburse me $25 for the parts. You can successfully build and bring home your own Brain Machine! For directions and more details:
Brain Machine Workshop
Cheers,
Mitch.
Posted by maltman23 on September 06, 2008 at 11:20:36 Pacific Time
- sorry again
You must be logged in to reply.
To the following;
http://d.hatena.ne.jp/dissociation/20080831Posted by puppu on September 06, 2008 at 09:40:52 Pacific Time
- sorry again
You must be logged in to reply.
Hi puppu,
That's great that you got it going! The Brain Machine should work well with just the sound.
Without the lights, however, you will be missing out on the beautiful hallucinatory colors and patterns that you get with them.
Getting the lights going is a fairly simple task now that you have everything else working. Please let me know how that goes.
Cheers,
Mitch.
Posted by maltman23 on September 06, 2008 at 10:48:41 Pacific Time
- sound only but
You must be logged in to reply.
Hello
very unconscious awakening.
i labored pretty to make. anyhow, i made. To the following;
http://qrl.jp/?286103
next time, i'm going to make LED parts.
Posted by puppu on September 06, 2008 at 09:34:34 Pacific Time
- Problem with programming in the new firmware...
You must be logged in to reply.
Okay so I finally got the whole VVVVVV thing to work, which was awesome. But now when I change the directory (cd c:/etc.) to where the SLMFirmware unzipped contents are, I can't do the "del slm.hex" thing. The slm file is saved as a .C file. And so if I do "del slm.c" it deletes it or whatever, but then when I "make slm.c" it says "make: *** No rule to make target 'slm.c'. Stop."
And so now I'm trying to figure out if I need to change the slm.c file into a slm.hex file. I looked in the programming code and even replaced the slm.hex to slm.c to see if then cmd would recognize the slm.c file, but it doesn't. (I changed it back). Any help would be greatly appreciated. Thanks.Posted by David H 206 on August 21, 2008 at 19:58:58 Pacific Time
- Problem with programming in the new firmware...
You must be logged in to reply.
Hi David,
If you got the VVVV pattern, you are really there!
Leave the "slm.c" file named "slm.c". Then type:
make slm.hex
Then connect your Brain Machine (with the power off) to the serial port, then turn on the power to the Brain Machine, then type:
make program-slm
You will then have a Brain Machine!
Enjoy,
Mitch.
Posted by maltman23 on August 21, 2008 at 23:01:53 Pacific Time
- Problem with programming in the new firmware...
You must be logged in to reply.
WOW! It worked, haha. Thanks so much.
But just curious, why did I simply need to leave out the 'del slm.hex' step?
(Might as well learn it while I can...)Posted by David H 206 on August 22, 2008 at 00:20:28 Pacific Time
- Problem with programming in the new firmware...
You must be logged in to reply.
You actually didn't have to leave out that step. You just had to not care that the command window told you that it couldn't find "slm.hex". That step to delete the "slm.hex" file is there because the "makefile" won't create a new "slm.hex" file if there happens to be an old one present.
Here's more details on this:
The "slm.c" file is a text file, full of instructions that you want the Brain Machine's microcontroller to perform (this is the controlling software, known as firmware). But microcontrollers don't understand text, they understand machine code, and the "slm.hex" file is a representation of the machine code, converted from the text instructions in "slm.c" by the "makefile" (actually, the "makefile" invokes a bunch of software to do perform the necessary tasks), ready to be programmed into the microcontroller's memory. But if there is already a "slm.hex" file present, the "makefile" will keep the old "slm.hex" file (rather than create a new one), even if you change the "slm.c" text instructions. So, you need to delete the old one first.
Happy hacking!
Mitch.
Posted by maltman23 on August 22, 2008 at 08:00:00 Pacific Time
- hey mitch,
You must be logged in to reply.
this has been driving me nuts. which is usually a pretty short trip. it looks like your makefile is set up so that "make clean" deletes the source.
otherwise, it's been a blast.
bobbyPosted by foobert on August 05, 2008 at 08:27:24 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi Mitch
After building the kit the LED's (4) all light and are blinking at various speeds.
All software was downloaded and unzipped but that's as far as I can get it to work.From cmd.exe i get a message saying that "make is not recognized as an internal or external command, operable program or batch file" and nothing happens.
I have also noticed that all the files now seem to be saved as wordpad docs in machine code or something.
Hope you can throw some light on the subject.
no Pun intended
TomPosted by speedwayrider on August 03, 2008 at 11:02:38 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi bobby,
Sorry about that. I just left "clean" the same as from the MiniPOV3 firmware. I guess I should try these things before publishing them (embarrassment).
And it also just goes to show that you should always have backups of all you files.
I hope it's a short trip back to a fun life for you of making cool things.
Mitch.
Posted by maltman23 on August 05, 2008 at 10:03:50 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi Tom,
If the lights are blinking as you described, then you have probably built everything correctly. Yay!
It sounds like the software isn't installed properly. Sounds like you're using Windows. (Windows is actually the easiest for programming hardware.) Windows needs WinAVR. The complete, step-by-step instructions (very easy to follow) are on the Ladyada website:
http://ladyada.net/make/minipov3/software.html
You said that you unzipped the downloaded file. Did you double-click the setup file to install the software? Anyway, try following the instructions from the above link, and let me know if that helps.
Best,
Mitch.
Posted by maltman23 on August 04, 2008 at 11:44:08 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi Mitch
I followed the instructions from the website and the software seems to be functional, however it still did not do what it is supposed to do, I got this error message.
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Tomm>cd c:\
c:\>cd minipov3
c:\Minipov3>dir
Volume in drive C is S3A6022D501
Volume Serial Number is EE5D-DA63
Directory of c:\Minipov3
04/08/2008 07:22 PM <DIR> .
04/08/2008 07:22 PM <DIR> ..
05/05/2005 08:01 PM 289 all_leds.c
27/05/2007 02:13 AM 316 all_leds.hex
08/04/2007 03:33 PM 612 alt_leds.c
27/05/2007 02:13 AM 488 alt_leds.hex
27/05/2007 01:57 AM 2,760 digg.c
27/05/2007 02:14 AM 832 digg.hex
27/05/2007 02:13 AM 3,107 eyebeam.c
27/05/2007 02:14 AM 906 eyebeam.hex
27/05/2007 02:04 AM 2,999 largeimage.c
27/05/2007 02:13 AM 902 largeimage.hex
27/05/2007 02:05 AM 3,165 make.c
27/05/2007 02:14 AM 914 make.hex
27/05/2007 02:06 AM 3,468 makefair.c
27/05/2007 02:13 AM 963 makefair.hex
17/04/2008 06:29 PM 5,121 Makefile
27/05/2007 02:14 AM 3,164 makezine.c
27/05/2007 02:14 AM 914 makezine.hex
27/05/2007 02:12 AM 2,664 minipov.c
27/05/2007 02:13 AM 971 minipov.hex
27/05/2007 02:12 AM 2,217 mypov.c
27/05/2007 02:13 AM 820 mypov.hex
05/05/2005 02:09 PM 813 test_leds.c
27/05/2007 02:13 AM 754 test_leds.hex
05/05/2005 08:10 PM 470 test_sensor.c
27/05/2006 08:19 PM 1,444 test_serial.c
25 File(s) 41,073 bytes
2 Dir(s) 19,629,367,296 bytes free
c:\Minipov3>make program-minipov
avrdude -p attiny2313 -P com4 -c dasa -U flash:w:minipov.hex
process_begin: CreateProcess(NULL, avrdude -p attiny2313 -P com4 -c dasa -U flas
h:w:minipov.hex, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [program-minipov] Error 2
c:\Minipov3>
Also at some point do I follow the instructions that came with the kit,
they seem to indicate something different
TomPosted by speedwayrider on August 04, 2008 at 16:52:18 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi Tom,
It looks like you have the software installed OK now.
It also looks like you changed the line in the "Makefile" file to:
AVRDUDE_PORT = com4
Are you sure that your serial port is on com4? If the serial port is a different port than the one specified in the "Makefile" file, then you would get the error message you got.
You can see what your serial port number is by going to the "Device Manager":
Start -> Control Panel
double-click on System
choose the Hardware tab and click on the Device Manager button
If you have a serial port on your computer, then double-click on the Ports icon. If you have a USB-to-Serial converter, or some other kind of converter to put a serial port on your computer, then it may be listed somewhere else in the Device Manager list.
Not all USB-to-Serial converters work with the AVR chips. Be sure to get one that is recommended on the Ladyada website:
http://ladyada.net/make/minipov3/software.html
Please let me know if that helps, or if you have any further questions or problems.
Once you can program the microcontroller you continue to follow the instructions in the MAKE Magazine article, which hacks your MiniPOV into a Brain Machine.
Mitch.
Posted by maltman23 on August 04, 2008 at 18:11:02 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi mitch
Yes! I am using a USB to Serial port cable
( neXXtec part# 2608042 from The Source )
It does use Com port 4, as/device manager
so it looks like this one does not work.
Have to go searching again.
Thanks Mitch.
TomPosted by speedwayrider on August 05, 2008 at 06:27:32 Pacific Time
- Can't make it work
You must be logged in to reply.
Hi Tom,
You are really close to being able to program. Bummer that your USB-to-Serial converter is one of the ones that doesn't work with the AVR microcontrollers we're using. Ladyada suggests converters that are known to work near the top of this webpage on her site:
http://ladyada.net/make/minipov3/software.html
Please let me know what happens.
Best,
Mitch.
Posted by maltman23 on August 05, 2008 at 07:55:09 Pacific Time
- fuses verification error
You must be logged in to reply.
Hi,
I picked up a kit at Hope. Everything seemed fine, the
'VVVV' test went perfectly. Then I downloaded the slm
firmware, compiled it and typed 'make program-slm'
this is what I got:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x80 != 0x00
avrdude: verification error; content mismatch
avrdude: safemode: lfuse changed! Was e4, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: hfuse changed! Was df, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: efuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK
avrdude done. Thank you.
make: *** [program-slm] Error 1
What do I do now? I've tried re-running it several times, no-joy - and I can't reburn the minipov firmware either.
any help would be appreciated.
thanks,
-sandyPosted by saender on July 26, 2008 at 22:35:08 Pacific Time
- fuses verification error
You must be logged in to reply.
Hi sandy,
If you were able to program in the VVVVV pattern, then that's a great start. It means that everything worked at the time you did that programming.
My guess is that there is a solder connection (or two or three) that are intermittent. Try going over all of your solder connections again. With a clean solder iron tip, touch the tip to each pad, and let the solder melt and flow on each pad for about 1 second each. Another thing to look for is that there is a mound of solder at each pad (not flat, level with the board). If there are any pads without a small mound, then add a little more solder.
There are 3 qualities to a good solder connection:
1) the solder flowed nicely all around the lead and the pad (smooth all the way around the pad, with no lumps)
2) the solder is somewhat shiny (not pitty looking)
3) each pad has a small mound of solder (not flat against the board).
Also, make sure that the power from the two battery leads is still making a good connection, and that the power is on when you program.
See if that gets you going again.
Best,
Mitch.
Posted by maltman23 on July 26, 2008 at 22:58:46 Pacific Time
- More results?
You must be logged in to reply.
i'm interested in hearing about people's experiences with this gear. This project was my first (but definitely not last!) soldering attempt. The brain machine is very cool. I've had a lot of very positive feedback from users, with a couple being kinda tweaked out and ending the sequence early.
Is it possible that this device just isnt for everyone? I make it a point to ask people if they're prone to seizures or have been diagnosed with ADHD. I feel almost like a doctor when setting them up.
One issue I need to tweak is ambient sound. Folks are often distracted by the sound of events around them. How can I evade this/ I used a pair of ham radio headsets (because they look so dang cool), putting dollar store guts into them...
Thanks, Mitch, for putting this out there. One guy told me that he can't imagine why people would want to shoot up or snort stuff if they had this machine. The same guy said, "You're changing the world 14 minutes at a time!"Posted by WantonInn on July 22, 2008 at 15:47:25 Pacific Time
- More results?
You must be logged in to reply.
Hi WantonInn,
I'm very glad you like your Brain Machine, and are happy soldering and making things. :) Please make more cool things!
The Brain Machine isn't for everyone. Like you, I always warn people before they try it: blinking lights and epileptic people shouldn't mix -- most epileptic people agree! I've been in the presence of thousands of people using Brain Machines. I've found that about 90% really love it. About 5% really hate it. And the other 5% like it OK if they slide the glasses down their nose so that the lights are not as bright on their eyes.
I always ask people if the light is too intense, or if it feels too intense, and suggest that they can slide the glasses down their nose at any time if it's ever feeling too intense for them. This increases the number of people who like it.
Best,
Mitch.
Posted by maltman23 on July 26, 2008 at 22:51:19 Pacific Time
- More results?
You must be logged in to reply.
I'm afraid the design I 'm using doesn't allow for sliding the glasses down---we used welding goggles. I thought it would look cooler and block out more light (which they do). We put the led's on the inner lens' rather than the flip-up. Comfort is an issue for some people, I'm considering adding foam around the edges. And I want to figure out a way to encase the guts.
I think I saw a thread down here somewhere about a coin cell battery/ Anyone had success with that? I haven't done a lot of research yet, but it would definitely mske the unit more compact. I guess I'd need to figure out what houses the cell, as well as the On/Off switch.
Thanks again for sharing information. this meme lives...
Posted by WantonInn on July 31, 2008 at 15:54:06 Pacific Time
- More results?
You must be logged in to reply.
Hi WantonInn,
Your goggle design sounds really interesting. Care to post a link to any photos?
CR2032 coin-cell batteries work great to power the whole thing. They won't last as long as two AA batteries (which last many months of heavy use), but they are very light and small, and they last for about 200 complete sessions.
I've used this battery holder for the coin-cell, from Mouser (35 cents for one):
http://www.mouser.com/Search/Refine.aspx?Ntt=122-2420-GR
You can use any cheap, small switch for an on/off switch.
Best,
Mitch.
Posted by maltman23 on August 04, 2008 at 11:39:15 Pacific Time
- More results?
You must be logged in to reply.
I just uploaded the only decent pic I have of it:
http://www.flickr.com/photos/22512026@N00/?saved=1
The board and batteries were affixed with double-sided duct tape. It started losing tackiness so now I've got it rigged with regular duct tape. It's a mess. I really need to house that stuff.
I've been experimenting for years with lucid dreaming and 'psychic phenomena'. One problem I have is that, when I realize I'm dreaming, I start screwing around with flying and walking thru walls and whatnot. I want to see if I can bring back information from that state, which is why this machine caught my attention. so far, I'm just getting used to navigating that state, but am hoping my hunches will be fruitious...
Posted by WantonInn on August 08, 2008 at 15:55:53 Pacific Time
- More results?
You must be logged in to reply.
Hi WantonInn,
Thanks for the photo. Steam Punk -- looks great!
Duct tape is a great thing. For this case, however, the other great thing is even better: hot glue. Hot glue is your friend. Try it out. But neither are good for connecting to batteries. This is what battery holders are for. :)
If you end up taking your glasses apart to put them back together in a nicer form, you can take the opportunity to increase the resistance of R7 and R8 -- this will decrease the brightness of the LEDs. Try a few values to see what you like best -- I'd try 470 ohms as a first try. If the lights are too dim at 470 ohms, try 330 ohms; if the lights are still bright, try 560 ohms.
All the best with your experiments. If you find something interesting, please post -- I'm sure others will also be interested.
All the best,
Mitch.
Posted by maltman23 on August 08, 2008 at 16:39:33 Pacific Time
- More results?
You must be logged in to reply.
I dont think most people are having difficulty with the brightness, just being distracted by external sounds.
I'm thinking of adding some sort of volume control so that ear buds can be used. As it is, ear buds make it too loud. I think I saw on here somewhere about adding a potentiometer (?).
I also had a very farout idea of building one into a Victorian-style chair. It would have like a crank to lower the headset and knife-switch for power. I'd have to learn about upholstery, but it might be worth it...
Posted by WantonInn on August 09, 2008 at 08:37:25 Pacific Time
- More results?
You must be logged in to reply.
Making a Victorian electric chair is too wonderful! Please post photos if you do this!
Adding a potentiometer is very easy. You can use a single stereo pot, or two individual ones (either way, use audio-taper pots). Or, you can just put in two larger resistors for R5 and R6, and do trial and error to find a good volume for you earbuds. But headphones work better. If you want the steampunk look, find some clamp-like headphones and spray them silver or gold, with a few industrial-looking parts glued on? Or, for your Victorian chair, you can mount small speaker in the helmet?
Keep up the great thinking.
Cheers,
Mitch.
Posted by maltman23 on August 09, 2008 at 10:33:33 Pacific Time
- Possible new project?
You must be logged in to reply.
First off, I would like to say that this is an amazing project and introduction into the world of microcontrollers. What if we could do the same project, but as an intro to signal processing?
I am in the middle of this kit, and something occurs to me. Correct me if I'm wrong, but the brain machine needs only to A. Remember 2 frequencies: one for the left ear and eye, and one for the right ear and eye, and B. Express each of those frequencies as both a sine wave of an appropriate amplitude for headphones, and a square wave of an appropriate amplitude for LEDs.
My proposed idea is to satisfy A. and the first part of B. in a very simple way: simply create and play the frequencies through an MP3 player that supports stereo output, such as an iPod, computer, or $10 no-frills device. This device already outputs the desired frequency audio, and the only trick is to have it output the desired LED signal.
But wait! Aren't the 2 LEDs going at the same frequency as the 2 audio channels? If that's the case, can't we build a circuit that takes the audio signal, converts the sine wave into a square wave with appropriate amplitude, and outputs both the original sine wave (amplified if necessary) and the LED driving square wave?
This device would be easy to program with multiple tracks that could be chosen on the fly, it would be completely platform-independent (Macs would load the same audio files as any other OS users), and it would be a completely different lesson for the same device!
I am in no way an electrical engineer, so I ask those of you in the know if this is actually feasible. I have taken enough courses to believe that it should be, and it could be just as fun as the original! Let me know what you think!Posted by AdamTheMechE on July 01, 2008 at 18:51:42 Pacific Time
- Possible new project?
You must be logged in to reply.
Hi AdamTheMechE,
I'm glad you like the project.
There are ways of making an audio player become a Brain Machine. But it's a little trickier than you suggest. This is because the audio and the blinking LEDs work differently.
The two LEDs blink directly at brainwave frequencies (in the case of this simple Brain Machine, they blink at one of four frequencies, one for Beta, one for Alpha, one for Theta). For instance, for Beta, the LEDs on each eye blink at 14.4Hz
The two speakers, however, create the brainwave frequencies via binaural beats, which means that the brainwave frequency is the result of the difference between the slightly different frequencies in each ear. For instance, to create Beta waves, one ear gets 415.0Hz, and the other ear gets 400.6Hz, the difference being 14.4Hz, which is the low end of Beta.
Using audio editing software, it is very easy to create an mp3 file that generates a 400.6Hz sinewave on one channel, and then goes through a sequence of offset frequencies in the other ear -- this could create the exact same sequence as the Brain Machine.
Making an mp3 player do the blinking LEDS is not as easy. There are two reasons: 1) we need a third audio channel for the LED information; 2) mp3 players only play in the audio range, and brainwave frequencies are below this range -- so we would need a way to convert higher frequencies into lower ones. There are ways to do this -- such as a divide-by-256 counter, and then use a square-wave at 256 times the desired frequency. And, probably the easiest way to create the third channel is to use two mp3 players, and just start them at the same time (It is probably better, but it probably isn't way important that the LED blinking and the audio be exactly in synch.)
If you play with this, or other ideas like this, please post to the blog again and give your results.
Cheers,
Mitch.
Posted by maltman23 on July 02, 2008 at 15:16:01 Pacific Time
- Possible new project?
You must be logged in to reply.
Hi Mitch!
Thanks for the prompt response. As I said, I'm no electrical engineer, so I don't have the faculty to design such circuits on my own.
Has the "binaural" method been tested on the eyes? I assumed playing a different frequency in each eye would induce brain waves in the same way as in the ears. If this is not so, then I understand the limitations of my idea. Again, great project! I hope to update soon with pictures of my soft sleep mask results!Posted by AdamTheMechE on July 02, 2008 at 16:30:30 Pacific Time
- Possible new project?
You must be logged in to reply.
Hi AdamTheMechE,
As far as I know, no one has done any research on whether the binaural effect would work with vision. Although somewhat surprising, it somewhat makes sense that binaural beats would work with auditory input, since beat frequencies are a physical auditory phenomenon. The somewhat surprising aspect of binaural beats is that there is nothing physically happening to cause the beat frequencies -- it is only perceptual. People are very good at perceiving differences in pitch of sound, and that is presumably the part of the brain that is being used to perceive binaural beats. The analog with eyesite would be perceiving different colors (i.e., different frequencies of light). But I wonder what would happen if we gave each eye a slightly different blink rate? Worth a try! If you try it out, please let me know what you find out.
Best,
Mitch.
Posted by maltman23 on July 03, 2008 at 15:19:47 Pacific Time
- my kit assembled
You must be logged in to reply.
finally got my kit I bought at SF Makersfaire 2008 put together.
Thanks so much Mitch. I'll have to play with it more but i think the lights are a little too bright for me right now. Will try with wearing the glasses in different positions.
Also you were right about the cheapie headphones being preferable. I tried the brain machine with my Etymotics ER4Ps and it was unpleasant both in volume and tone.
Although now that I am reading this page again I see I used the old 400hz firmware.
My build:
http://flickr.com/photos/rkt88edmo/sets/72157605240499308/Posted by rkt88edmo on July 01, 2008 at 00:39:45 Pacific Time
- my kit assembled
You must be logged in to reply.
Hey rkt88edmo,
Glad you got yours going! And thanks for the photos. Looks cool in the Altoids tin.
If the lights are too bright you have a few options: slide the glasses down your nose so the LEDs aren't shining right at your eyes behind your eyelids, or change R7 and R8 to higher values (try 270 ohms and see how they feel), or get a cheap headphone with a volume control.
Using 200Hz instead of 400Hz isn't important, but most people like 200Hz better.
Cheers,
Mitch.
Posted by maltman23 on July 01, 2008 at 01:08:50 Pacific Time
- Brain Machine Kits
You must be logged in to reply.
Thanks for all your patience, we now have the Make version of the Brain Machine available online at the Maker Shed: http://www.makezine.com/go/brainmachine
Thanks again to Mitch!Posted by LJPRO on June 30, 2008 at 18:15:09 Pacific Time
- my attempt
You must be logged in to reply.
hello,
you can see my version of the machine here. made utilizing a stripboard.
i've used a few times and i found the visuals very nice, but didnt make me relaxed.
ive tried different LED colors:
- clear red LEDs - clear and bright concentric red ripple-like patterns
- diffused orange LEDs - as above, but the shapes were softer
- clear yellowish green - barely visible patterns
- diffused blue - LEDs didnt even blink,- probably voltage was too low to run them
cheersPosted by happybara on June 07, 2008 at 11:41:29 Pacific Time
- my attempt
You must be logged in to reply.
Hi happybara,
Thanks for posting your version of the Brain Machine.
I've also had the best visuals with Red LEDs. I think this is because our eyelids filter for red.
If you want to use Blue LEDs, you will need to use a 4.5v power supply (three AA or AAA batteries) instead of 3v, since, as you pointed out, Blue LEDs need more voltage to make them work (often 3.6v).
If the Brain Machine got you seeing nice visuals, but didn't make you relaxed, then I'd guess that the LEDs were too bright for your eyes. Try sliding the glasses down your nose while using them -- the further down your nose, the less intense the light. There should be a range of positions where you see nice visuals, and where the light isn't uncomfortable for you. With nice visuals and no discomfort, you should feel very nicely relaxed about half way through the sequence (about 5 or 6 minutes).
Cheers,
Mitch.
Posted by maltman23 on June 09, 2008 at 01:14:20 Pacific Time
- Question about kit
You must be logged in to reply.
I was one of the lucky ones to get the kit at the maker faire, and I'm just getting around to putting it together now. I noticed that the kit includes two 2.2Kohm resistors (for R5 and R6) instead of 1Kohm. I imagine this won't be a problem, it will just make the audio quieter, but was this intentional?
Also, I'm modifying this in a couple of ways. Instead of the glasses I'm using a comfy padded eye mask with built in headphones, designed for business travelers. I will also change the firmware so it goes down to delta waves and then stops without coming back up. I am hoping this will thus function as a sleep aid.Posted by erics1 on May 28, 2008 at 16:03:40 Pacific Time
- Question about kit
You must be logged in to reply.
Hi erics1,
The 2.2k ohm resistors are intentional. The original firmware (from the above link) uses 400Hz for the audio. Since that was a bit too much like buzzing mosquitos, I changed it to 200Hz, and 2.2k ohm resistors work better with this lower frequency. The latest firmware is available from my website:
http://www.CornfieldElectronics.com
click on the "maker faire" button, and then click on "the latest SLM firmware".
Modifying it to go down to to Theta, with occasional pulses of Delta would be great for helping you sleep. Putting it in a comfortable sleep mask is also a great idea. This is what I'm doing (along with using a more complex model of brain waves) in the sleep mask I've been working on.
Please post the results after you try things out.
Cheers,
Mitch.
Posted by maltman23 on May 28, 2008 at 16:54:18 Pacific Time
- Question about kit
You must be logged in to reply.
Thanks for the fast reply, and it's cool to know you are also working on a sleep version!
I'll be happy to post the results when I have them. One more modification I'm attempting to make these more sleep-friendly: I'm putting the battery pack and controller into a teddy bear, with a long umbilical to the sleep mask.Posted by erics1 on May 28, 2008 at 17:09:03 Pacific Time
- USB Version
You must be logged in to reply.
I've built my first brainwave machine and have been very happy with the results. My only complaint is that I don't like the serial interface on the minipov (my serial port is in the back of my computer and is not nearly as handy as the USB port in front). I'd like to build another brainwave machine with the following changes:
-USB instead of serial
-Volume Control and fader (I am nearly deaf in one ear so I'd like the ability to make that ear louder)
-make use of the extra outputs by adding different colored LED's (prob red, yellow and blue)
-use a 9V battery instead of the AA's.
Now here's the problem: I've only just started getting interested in electronics and I am not sure how to accomplish all this (although the forums at ladyada have discussed the USB problem so I have some idea what to do there). I'm not asking anyone to figure all this out for me but I thought many people have probably already suggested or tried these changes and could offer some advice/help.
Thanks Mitch for the great project. How's the more advanced design coming?Posted by yavid on May 27, 2008 at 10:22:14 Pacific Time
- USB Version
You must be logged in to reply.
Hi yavid,
If you would like to use USB instead of a serial port, you can buy a USB to serial converter for about $15. Though programming is much quicker directly through a serial port. Alternatively, to add USB support to the MiniPOV kit is possible, but not a beginner's project.
Adding a volume control is pretty easy. Just add two potentiometers. Search through this blog (you might have to search through both pages) for "volume".
Using a 9v battery isn't a good idea. You can do it, but you'll need a DC-to-DC converter or a voltage regulator. If you want smaller batteries, try a CR2032 coin cell.
Using different colored LEDs may be fun to play with.
I've been working on a bunch of projects, including TV-B-Gone Pro, as well as making the Brain Machine into a ready-made manufactured product that people can buy (I'm calling them Trip Glasses). Doing Maker Faires and other geeky conferences has also taken lots of time and energy (but way worth it!). These and other projects have slowed down my progress with the advanced version of the Brain Machine that will help people sleep. But I hope to have a version of it ready this summer.
Best of luck with everything! Please post back to this blog with any results.
Mitch.
Posted by maltman23 on May 28, 2008 at 17:02:42 Pacific Time
- KITS!!!??!??!?
You must be logged in to reply.
so ive been looking all over and i read on an earlier post that these kits may be available soon on the maker store but in all actuality im tired of waiting!!!! is there anywhere or any way i can buy a kit?Posted by Rody21 on May 20, 2008 at 20:58:12 Pacific Time
- KITS!!!??!??!?
You must be logged in to reply.
Brain Machine kits sure have been popular. All 120 of the ones that were available at the Maker Faire sold out.
Rob, the guy who runs the Maker Store, emailed me yesterday saying that he is in the process of putting together more Brain Machine kits so that people can get them from the online store. Hopefully they will be ready within a few days, so please check back soon.
Mitch.
Posted by maltman23 on May 22, 2008 at 00:28:48 Pacific Time
- KITS!!!??!??!?
You must be logged in to reply.
Hi Mitch
I have been reading a lot about Brain Wave generators and ended up on this forum. The Brain Machine project seems very fascinating and I am very keen on trying this out. I am however located in Mauritius Island (Indian Ocean) and I am not too sure how I could get my hands on one of these. Would appreciate any help please........
Thanks
AshrafPosted by Ashraf_Esmael on May 25, 2008 at 04:39:55 Pacific Time
- KITS!!!??!??!?
You must be logged in to reply.
Hi Ashraf,
If you want to build a Brain Machine, all of the parts are available on the web, and they will ship anywhere in the world.
You can download the article here:
http://www.CornfieldElectronics.com/
Click on the "maker faire" button, and then click on the link for "Make a Brain Machine". (There's other fun projects there that you can hack from a MiniPOV3 kit, too.)
The article shows all of the parts you need and where to buy them on the web.
If you want to wait until they become available at the Maker Store, you can buy a kit for the Brain Machine all in one box, from makezine.com
Of course, when you build it, you can ask any questions you may have on this blog, and I'll answer them.
Cheers,
Mitch.
Posted by maltman23 on May 25, 2008 at 10:47:35 Pacific Time
- Brain Machine Kit
You must be logged in to reply.
Hi Mitch
I picked up a Brain Machine Kit at the Maker Faire. My wife and I just love the Brain Machine! I programmed a sleep mode and we use it daily to fall asleep.
I wanted to purchase the kit as gifts. Do you know where I can purchase them online? I didn't see them in the Maker Shed. Sure, I know I could piece a kit together but the kit sold at the Maker Faire was well packaged. The kit included everything (although I did run out of wire) and at a great price.
Anyways, hope you know something about these kits.
Thanks.
-garagemonkeysan
Posted by garagemonkeysan on May 17, 2008 at 08:58:46 Pacific Time
- Brain Machine Kit
You must be logged in to reply.
Hi garagemonkeysan,
I'm glad you're enjoying your Brain Machine. Would you be into posting the firmware you used to help you and your wife sleep? I'm sure there are others who would be into benefiting from that.
Lots of people have been asking me if they could buy a Brain Machine kit. Up till now they've only been available at Maker Faires and at workshops I've been giving at hacker conferences and for other groups (for the same price as it would cost if you bought all the parts on your own).
But I just asked the Make Magazine people if they would be into having them at their online Maker Store. I'll let you know what I find out.
Mitch.
Posted by maltman23 on May 17, 2008 at 09:45:55 Pacific Time
- Brain Machine Kit
You must be logged in to reply.
Hi Mitch -
Thanks for the quick reply.
As recommended in the other post, I roughly cut your meditation sequence in half.
//sleep sequence
{ 'b', 600000 },
{ 'a', 100000 },
{ 'b', 200000 },
{ 'a', 150000 },
{ 'b', 150000 },
{ 'a', 200000 },
{ 'b', 100000 },
{ 'a', 300000 },
{ 'b', 50000 },
{ 'a', 600000 },
{ 't', 100000 },
{ 'a', 300000 },
{ 't', 200000 },
{ 'a', 300000 },
{ 't', 300000 },
{ 'a', 150000 },
{ 't', 600000 },
{ 'a', 150000 },
{ 'a', 150000 },
{ 't', 600000 },
{ 'd', 30000 },
{ 't', 300000 },
{ 'd', 100000 },
{ 't', 200000 },
{ 'd', 200000 },
{ 't', 300000 },
{ 'd', 300000 },
{ 't', 200000 },
{ 'a', 10000 },
{ 't', 200000 },
{ 'd', 100000 },
{ 't', 500000 },
{ 'd', 200000 },
{ 't', 600000 },
{ 'd', 800000 },
{ '0', 0 } //last element to stop main_loop
}; //end of table
We usually drift off to sleep before the sequence ends. It's a little abrupt at the end because the light and sound instantly stop. But that's okay, it's a signal to remove the unit and place it aside. The current construction isn't exactly bed-friendly. I'm thinking about building a Brain Machine utilizing a sleep mask, surface mount LEDs and a long single cable that runs to a box that contains the MiniPOV and batteries.
So hopefully, the Maker Store/Shed will begin stocking the Brain Machine Kits.
For those not familiar with the Brain Machine Kit, it comes with all the parts: safety glasses, 30awg wire, resistors, MiniPOV kit, caps, headphones, instructions and even the crazy artwork. I had a blast building it!
- garagemonkeysan
Posted by garagemonkeysan on May 17, 2008 at 11:20:00 Pacific Time
- Brain Machine Kit
You must be logged in to reply.
Thanks for posting your sequence. Taking out the short amount of Beta after Theta starts was a good idea.
I like your idea of making a sleep mask. Please be careful with wires while you're asleep, since if you roll over you want to ensure that it won't limit the amount of oxygen you take in -- I'd hate to see you wake up dead!
I'm working on a more complex version of the Brain Machine that is specifically for helping people sleep. Like your proposed project, mine will use a comfortable fabric sleep mask and use surface mount LEDs. I'll have all the electronics sewn into the mask, including a rechargeable battery and small speakers. The firmware for this version will use PWM to enable the sound to fade out at the end (as well as independently vary the amplitude of all of the generated brainwave frequencies during the sequence).
All the best with your project!
Mitch.
Posted by maltman23 on May 17, 2008 at 11:57:55 Pacific Time
- Brain Machine making workshop in Philly
You must be logged in to reply.
For folks in the Philly region, I'll be giving a Brain Machine making workshop at The Hacktory, a new hacker space in Philadelphia. The workshop is on Saturday, May 10th, from 10am to 5pm.
http://thehacktory.org/classes/brain-machine-workshop
Mitch.
Posted by maltman23 on May 08, 2008 at 00:53:39 Pacific Time
- OCR1A
You must be logged in to reply.
What's OCR1A and what does it do?Posted by Always Tired on May 04, 2008 at 17:57:37 Pacific Time
- OCR1A
You must be logged in to reply.
Hi Always Tired,
OCR1A is the Output Compare Register for Timer1. It can do a bunch of things, but the way the firmware sets things up for this project, when Timer1 counts up to the value in OCR1A, the Timer1 output pin toggles (i.e., goes high if it was low, or goes low if it was high), thus generating a square-wave output on that pin. We use it to generate audio, at the frequencies that we want.
The details are described in the firmware documentation I wrote up -- to access that documentation click on the link, above (above the photo), that says, "SLM Documentation".
Mitch.
Posted by maltman23 on May 08, 2008 at 00:48:26 Pacific Time
- sound problem part 2
You must be logged in to reply.
Hi again,
I have an update. I used a multimeter and could not find any issues with it. I decided to go on a youtube search to see if I can see the various stages of the project. I found a link called "brain machine party" This features a bunch of people and Mitch assisting a group of people with making the brain machine. I am able to do the "V"s step as Mitch demonstrated. I still believe my sound is not right. However, after listening very carefully with high end headphones, the volume is lower in one ear. It does seem to make some subtle tone changes as well! However, it never stops, it is looping constantly. I was able to find a youtube link where someone has made a brain machine and shows the unit in action! Again, I tihnk my sound is different from his, I hope I am wrong! I just wonder if I have made some error with the headphone steps. I used some thicker wire than the 30gauge recommended in the parts list. Could that be the problem? The pictures posted in my other post show the thickness of the wires used in the connecting of the speaker connector. I wonder if the capacitors must be placed in a certain way? I figured they had to be and just mimic the same setup for the LEDs beside them. The step of updating the microcontroller for sound requires the downloading of special firmware made my Mitch. The firmware posted on this website only contains two files the makefile and the slm.c. There is no slm.hex. The delete step fails obviously since no slm.hex exists. The next step creates the slm.hex. I wondered if this is just to make sure that the wrong slm.hex does not get programmed onto the brain machines microcontroller. I also downloaded the alternate firmware on Mitch's offical website and noticed a lower tone volume but still doesn't sound right. Hope this description is more helpful. Thanks again.Posted by a2lloyd@gmail.com on April 25, 2008 at 07:50:18 Pacific Time
- sound problem part 2
You must be logged in to reply.
Hi a2lloyd,
Sorry for the delayed response -- I just got back from China.
I think that your Brain Machine may be working -- in any case, it is very close.
The wire thickness is not a problem at all. And the capacitors can go in either way -- so no problem there, either.
You mention that when you programmed in my updated firmware that the pitch was lower. That is a good sign, since the only difference with my updated firmware (on my CornfieldElectronics.com site) is that the frequencies are all an octave lower than the original firmware from this webpage. (I did that because the higher pitch was a bit too much like buzzing mosquitos.)
The firmware should take about 14 minutes to go through the entire sequence of brainwaves (with the pitch of the sound and the blink rate of the LEDs changing every so often along the way) and then stop. Could you time yours and see how long the entire sequence takes before it turns itself off?
If the timing is OK, then the only thing that can be wrong is the way you connected your headphone jack. Make sure that the ground wire is connected to ground on the board, and make sure that the ground wire is connected to the ground terminal on the headphone jack. Then the two other terminals on the headphone jack each go to one of the leads of the capacitor -- make sure that each terminal is connected to a different capacitor, and that there is no short between the capacitor pads.
Please let me know how it goes.
If by any chance you will be at the SF Maker this weekend (May 3rd and 4th), then come by my booth, and we can make it work.
Mitch.
Posted by maltman23 on April 29, 2008 at 06:25:57 Pacific Time
- sound problem
You must be logged in to reply.
Hello!
I am currently stuck with my brain machine project! I got stuck on step 2f. You say that you will hear sounds, well I hear the same sound on both left and right speakers of the headphones! I think I am doing something wrong. I had no trouble with the flashing of the firmware. I thought that I screwed up the R5 and R6 because I put them in backwards (brown on the right side of the r5 and brown starting on the left side of the r6) I have extras, so I pulled out one and put a fresh back in the same way. This did not solve the problem. I am including a large amount of pictures to help diagnose the problem. I had a ton of fun building this amazing invention! Great job!
Here is a zip of 6 closeup pictures.
http://www.sendspace.com/file/6lc3h8Posted by a2lloyd@gmail.com on April 20, 2008 at 15:07:07 Pacific Time
- sound problem
You must be logged in to reply.
Thanks for the prompt reply. I checked the various threads and I believe something is wrong with my setup. Possibly bad soldering? I looked at someone who posted the audio/video to google videos, my sound is nowhere near the output on mine! Its the exact same sound! I guess I should check the connections with a multimeter. Thanks for your help.Posted by a2lloyd@gmail.com on April 21, 2008 at 05:00:30 Pacific Time
- sound problem
You must be logged in to reply.
Hi a2lloyd,
Sounds like you have almost everything working. And maybe you actually have everything working.
The sound should be coming out of both speakers, and the pitch out of each speaker should be close, but slightly different -- with one ear having a very slightly higher pitch than the other. Is this possibly what you are hearing?
Resistors are not polarized, meaning that it does not matter which way you solder them into the board.
But it does matter how you solder the wires on to the three terminals of the headphone jack. The headphone jack has one terminal that is offset from the other two, and this terminal is the one that needs to connect to ground (the blue wire in the photo in the MAKE article). The other two are the left and right speaker, and it doesn't matter which is which for this project.
Unfortunately, I am not able to get your pictures. Maybe it is because I'm in China at the moment?
Does what I wrote help you out?
Mitch.
Posted by maltman23 on April 20, 2008 at 22:57:50 Pacific Time
- can't program my kit :(
You must be logged in to reply.
I've built the minipov3 kit precisely to the ladyada website design, save LEDs 1-4, R5 and R6. The lights flicker in sequence with a short pause after each cycle.
I then installed the January 07 version of AVRdude and unzipped the firmware files to C:\slm.
I turned off the kit, plugged it in to one of my two serial ports, then turned it back on.
When I get to typing "make program-mypov", howevever, I get an error message. Here's what my screen says:
C:\slm>make program-minipov
avrdude -p attiny2313 -i 10 -P com2 -c dasa -U flash:w:minipov.hex
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override this check.
avrdude done. Thank you.
make: *** [program-minipov] Error 1
I've tried changing the com port in "makefile", but that hasn't helped. I've looked at every post in response to the project here, and none seem to address this specific issue. Does anyone have a clue why I can't program this kit, and thus why I can't see some sweet visualizations?
Thanks :DPosted by Travoid on April 13, 2008 at 13:50:51 Pacific Time
- can't program my kit :(
You must be logged in to reply.
There could be a few things that might be wrong. But you got the test firmware working, so you are mostly there.
There may be some bad solder connections on the programming parts: the 9 pins of the serial port connector, R10, R11, R12, D1, D2, D3. Also, are any of D1, D2, and D3 in backwards? All of these parts need to have the black bar on the diode match up with the white bar on the board.
You may be using the wrong com port. Check out what com ports are available on your computer, and make sure that the com port number is correct in the makefile. If you are using Windows, you can find the com port number(s) in the control panel, and look under System -> Hardware -> Device Manager -> Ports (COM & LPT.
Please make sure that power is supplied to the MiniPOV Kit when you run the make command.
Mitch.
Posted by maltman23 on April 15, 2008 at 01:58:06 Pacific Time
- LED2 port is dead- need to recode SLM to another port
You must be logged in to reply.
Everything works, the brain machine is ready to go... but the LED2 port (PB1) never worked from the get-go. I soldered the left eye LED to the LED7 port (PB6) instead.
This is fantastic, except that the SLM code points to the non-working PB1.
How do I change the SLM code to reflect my left eye LED on PB6 now?
Thanks so much for the help.
-valeriePosted by valerievergen on April 09, 2008 at 12:38:25 Pacific Time
- LED2 port is dead- need to recode SLM to another port
You must be logged in to reply.
Well, I took a guess at which was PB6- they seem to both be blinking at the same rate, though difficult to tell. Please let me know if I have done the right thing before I give someone a seizure:
{
PORTB |= 0b01000001; // turn on LEDs at PB0, PB6
delay_one_tenth_ms(onTime); // for onTime
PORTB &= 0b10111110; // turn off LEDs at PB0, PB6
delay_one_tenth_ms(offTime); // for offTime
}
It's just a matter of on and off, right? Does it need to change anywhere else in the code?
-valeriePosted by valerievergen on April 09, 2008 at 13:01:04 Pacific Time
- LED2 port is dead- need to recode SLM to another port
You must be logged in to reply.
Hey valerie,
Yay, you got it going! You did exactly the correct thing to change from PB1 to PB6.
Strange that PB1 didn't work. But I'm glad you'll be tripping on your brainwaves with PB6.
Cheers,
Mitch.
Posted by maltman23 on April 09, 2008 at 13:14:53 Pacific Time
- LED2 port is dead- need to recode SLM to another port
You must be logged in to reply.
Hi Mitch,
Thanks, I'm not too great at all this- it feels good to accomplish. One last thing- the sound in the left ear (PB2) is MUCH quieter than the right ear (PB3). We're talking explosive sound vs. whisper sound. Luckily, my earphones can adjust volume per ear, but the disparity is still quite noticeable.
Is it supposed to be this way, or do I have another damaged port? If so, which of the next ports should I resolder the left ear to? (Oooh... soldering ears now.)
-valeriePosted by valerievergen on April 09, 2008 at 13:51:03 Pacific Time
- LED2 port is dead- need to recode SLM to another port
You must be logged in to reply.
Hi valerie,
The volume from the two ears should be the same. Are R5 and R6 both the same? They should either both be Brown-Black-Red-Gold, or both Red-Red-Red-Gold. Also, try checking your solder connections (if they're not already covered in glue).
For the sound you don't have an option of using other port pins, since PB2 and PB3 are the only two pins that output the two times used to generate the sound.
If you reverse the headphone, does the low-volume side switch ears? (Or, is one of your ears way less sensitive than the other?)
Mitch.
Posted by maltman23 on April 09, 2008 at 13:59:01 Pacific Time
- very loud, not much of a 'beat'
You must be logged in to reply.
hey mitch, i built it (hooray for me!) and the lights blink with a tight pattern (looks to be about right) but the sound is not what i expected. one ear is certainly a slightly different pitch than the other, but the noise is somewhat harsh -- it's LOUD, to say the least. Kinda sounds like tonal guitar feedback or like something from an older sci-fi movie (e.g. 2001/Andromeda Strain/Alien). the binaural beat is imperceptible, as to me it just sounds like on (loud) long tone (near the dial tone in frequency, i'd say).
ANother person posted similar results i think, so i'm just asking, This is normal?
Thanks mitch!Posted by geodonuts on March 24, 2008 at 14:35:46 Pacific Time
- very loud, not much of a 'beat'
You must be logged in to reply.
Hi geodonuts,
The sound should be a constant pitch in one ear, with the other ear shifting pitch up and down (slightly) as the lights change blink rate.
If the sound is too loud, then you should slide the headphones to the side of your ears until it isn't so loud. If the sound is annoying then it won't be very relaxing (clearly). You can also try some other headphones, since some are louder than others (I wouldn't recommend ear buds, since they'll probably be too loud). You can also try replacing R5 and R6 with a larger value, which will decrease the volume.
(Similarly, if the lights are too bright, then you should slide the glasses down your nose until the light is not uncomfortable. You can also exchange higher value resistors for R7 and R8 to make the LEDs blink dimmer.)
Also, you can try programming in my latest firmware, rather than the firmware from the "official" link near the top of this page:
http://www.CornfieldElectronics.com
click on the "maker faire" button, and then find "the latest SLM firmware" link. This firmware is almost the same as the original, but the pitch is an octave lower, which is a nicer pitch than the original 400Hz, which is almost like mosquitos. I recommend using 2.2K ohm resistors for R5 and R6 with the latest firmware (though it doesn't matter too much).
Mitch.
Posted by maltman23 on March 26, 2008 at 19:46:16 Pacific Time
- well never mind
You must be logged in to reply.
actually whatever, i just tried it and it seems about right. thanks anyhow!Posted by geodonuts on March 24, 2008 at 20:32:58 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
Anyone interested in selling their Brain Machine?
Thanks,
LeePosted by capelee on March 17, 2008 at 08:16:17 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
I've had so many requests for people who want to buy a Brain Machine already made that I decided to make 10,000 of them. I'm hoping they'll be ready for sale at the Maker Store this summer, maybe as soon as May. If you would like to keep informed, feel free to opt-in to my email list (I send out a newsletter once every month or two or three):
http://tvbgone.com/cfe_optin.php
Mitch.
Posted by maltman23 on March 17, 2008 at 22:10:28 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
Would you recommend this to someone for use in hypnosis induction? and would you know of a good frequency to use?Posted by Always Tired on March 22, 2008 at 15:48:46 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
Hi Always Tired,
I am not a hypno-therapist, but I would think that this could be helpful. Use half of the sequence to get you deeply relaxed, and then if you want to be, you could be much more susceptible to being hypnotized. Try it and see how it works. And please let me know.
If you really are always tired, then meditating may be helpful for you. I used to be tired all of the time, and meditating has been helpful for me to have more energy in my life. (I also had to be more aware of what I ate, and avoid foods that I felt more tired afterwards).
Mitch.
Posted by maltman23 on March 22, 2008 at 16:59:09 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
Yay, it came in the mail today. I might have some results for you by tomorrow.Posted by Always Tired on March 28, 2008 at 21:16:11 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
Now that i'm done procrastinating this, I built it, it works, but it doesn't really doesn't affect me in the ways I thought it would. It's too weak.
I went for an EEG once, and when they put a strobe to my eyes and got to a certain frequency I started feeling myself go under. I'm just not getting anywhere near the results I was hoping for. D:Posted by Always Tired on May 03, 2008 at 01:06:42 Pacific Time
- I Want to Buy a Brain Machine
You must be logged in to reply.
By the way,
My email is capelee@gmail.comPosted by capelee on March 17, 2008 at 08:17:11 Pacific Time
- not using kynar wire
You must be logged in to reply.
can i use 20-24 gauge wire that i found lying around or do i absolutely need the 30 gauge stuff? will the voltage be that much different with slightly fatter wire?
just trying to save myself about six bucks. thanks!Posted by geodonuts on March 15, 2008 at 11:53:43 Pacific Time
- not using kynar wire
You must be logged in to reply.
Hello geodonuts,
I like the 30 guage mostly for aesthetic reasons -- it's small and not very obtrusive (I also like that its insulation doesn't deform when you heat it). But the electrons won't care if you use larger wire. I'd still recommend using at least two different colors so that you don't accidentally wire up things incorrectly.
Mitch.
Posted by maltman23 on March 15, 2008 at 15:01:24 Pacific Time
- To Slow
You must be logged in to reply.
I build the machine, but the blink rate is about once a second.
pls helpPosted by paul32 on March 13, 2008 at 06:58:20 Pacific Time
- To Slow
You must be logged in to reply.
Hey Paul32,
It might help if you gave me a bit more to go on. What else does it do. What steps in the project did you complete? Did you program in the SLM firmware? What does the audio sound like? Give me a bit more to go on.
Mitch.
Posted by maltman23 on March 13, 2008 at 09:00:20 Pacific Time
- Frequency measurements
You must be logged in to reply.
Hi Mitch. Here are the results of my oscilloscope measurements:
6734-6,749 Hz
12,48-12,5 Hz
~2,49 Hz (short time to measure in the standard-program)
16,18-16,23 Hz
Youre a bit too fast most of the time. Perhaps you could use an external clock source in order to achieve more accurate timings.Posted by Pink_Goblin on March 03, 2008 at 11:25:50 Pacific Time
- Frequency measurements
You must be logged in to reply.
Your measurements are pretty close to the target frequencies of 14.4Hz, 11.1Hz, 6.0Hz, and 2.2Hz. Your Brain Machine is less than 1% too fast, which is pretty good. Each measurement is still well within the range of Beta, Alpha, Theta, and Delta, respectively. There is no need, but if you would like to get more accurate, then you can add an external crystal or ceramic resonator. You'll then need to change the fuse byte in the microcontroller to let it know how to power on with the external source instead of the internal oscillator.
Mitch.
Posted by maltman23 on March 03, 2008 at 19:41:51 Pacific Time
- Frequency measurements
You must be logged in to reply.
Sorry, I meant to say 11%. The timing is still within bounds of working well.
Mitch.
Posted by maltman23 on March 03, 2008 at 19:45:10 Pacific Time
- Brainwave Sequence Editor
You must be logged in to reply.
Many thanks to Armin Bajramovic, who emailed me with software he wrote that makes it incredibly easy to create your own Brainwave Sequences for your Brain Machine.
With this software you can create a Brainwave sequence visually, and at the click of a button it will create the firmware code that you just copy and paste into your Brain Machine firmware file (slm.c).
Here is a screen shot:
http://www.tvbgone.com/mfaire/slm/ArminBajramovic/screenshot.png
And here is a link to the software (for Windows and Linux):
http://www.tvbgone.com/mfaire/slm/ArminBajramovic/SLM_Sequence_editor.zip
Enjoy,
Mitch.
Posted by maltman23 on February 25, 2008 at 23:19:28 Pacific Time
- Brainwave Sequence Editor
You must be logged in to reply.
That *zip-file only contains an *exe file. I wonder where's the program for linux?Posted by bmicro on March 22, 2009 at 12:14:48 Pacific Time
- Brainwave Sequence Editor
You must be logged in to reply.
If you contact Armin and ask him nicely, maybe he can share his source with you?Posted by maltman23 on March 22, 2009 at 12:35:22 Pacific Time
- New project
You must be logged in to reply.
I plan on using my spare parts left over from this project for my own little idea, but I don't know enough about electronics to figure it out on my own. I'm working for a new independant coffee shop called BrewNerds and I want to wire my name tag to have a few blinking LED's on it. So, I have some of the LED's, the same ones used for the Brain Machine. I also have a bunch of capacitors and resistors. If I want to make a circuit so that a LED in my name tag can have a wire that runs down through/behind my apron and into my apron pocket, where the batteries and whatever necessary components would go, how would I wire the circuit? I have a case thing for 2 AA batteries (same as the one in the brain machine) should that run to a resistor, then a capacitor, then the, lets say, 2 LED's and then back down to the batteries? Would this succesfully make it blink?Posted by cdxnolan on February 23, 2008 at 20:38:23 Pacific Time
- New project
You must be logged in to reply.
Your want to make LEDs blink using only a battery, a resistor and a capacitor? Sounds like McGyver to me, dude. You can't do that unless you use two Transistors (http://en.wikipedia.org/wiki/Multivibrator) or an NE555 (http://www.kreatives-chaos.com/images/157t.png) or something like that.
What about using blinking LEDs?
http://www.lumex.com/pdf/SSL-LX5093BID.pdfPosted by Pink_Goblin on February 24, 2008 at 02:01:48 Pacific Time
- New project
You must be logged in to reply.
Yeah, using 555 chips is a cool way to blink LEDs. Or, now that you know how to use microcontrollers, and since they're so inexpensive and fun to use, why not buy another ATtiny2313 and program it to blink all sorts of LEDs, and you can really go to town?! :)
Mitch.
Posted by maltman23 on February 25, 2008 at 22:07:42 Pacific Time
- Firmware runs too fast
You must be logged in to reply.
Hi!
I progged my Tiny2313 using
make burn-fuse
and then
make program-slm
Works fine, no errors.
Problem: The LEDS blink like HELL, the sound is way to high.
The program ends after ~13 mins.
What's wrong?
Posted by Pink_Goblin on February 22, 2008 at 15:22:32 Pacific Time
- Firmware runs too fast
You must be logged in to reply.
I just filmed the whole mess. The LED-frequency is so high that the cam could not even capture it, as you see
http://video.google.de/videoplay?docid=-3217452404356142787Posted by Pink_Goblin on February 24, 2008 at 05:31:14 Pacific Time
- Firmware runs too fast
You must be logged in to reply.
Hi Pink_Goblin,
13 or 14 minutes is about right. The audio I heard on the video sounded correct. I can't tell from the video if the LEDs are blinking incorrectly. I would guess that they are correct, since the rest seems correct. During your Brain Machine's 13-minute sequence, does the blinking change rates? After about 6 minutes, are there short periods where the blinking slows way down? If so, then it is probably working fine. It isn't easy to count lights blinking at 14 times a second.
Have you tried using it (with your eyes closed)? If the LEDs are blinking at brainwave frequencies you should start seeing some really cool colors and patterns within the first minute, and after a minute, when it kicks into Alpha waves, you should really see cool stuff (that's when most people involuntarily say, "Wow!").
Mitch.
Posted by maltman23 on February 25, 2008 at 21:45:23 Pacific Time
- Firmware runs too fast
You must be logged in to reply.
In your vids, the LEDs seemed to blink waay slower. I think I will measure the frequency with the oscilloscope at our university. And yes, the LEDs slow down for short times during the sequence. I can't test the glasses themselves, because I'm about to modify them. The eye->LED-Distance has to be increased (In my case, it's about 1/2 Millimeter), so I figured out some fancy mirror-assembly to get a distance of about 50 millimeters. Some wiring has to be done. I'll post the results here. TX Mitch!Posted by Pink_Goblin on February 27, 2008 at 11:05:53 Pacific Time
- Firmware runs too fast
You must be logged in to reply.
The videos usually show the LEDs blinking at Alpha or Theta, which are considerably slower. I would guess that your LEDs are blinking at the correct rate, since the timing for everything comes from the functions that blink the LEDs, and your other timings are pretty close. But if you do measure the blink rates on a scope, please post the results.
Posted by maltman23 on March 02, 2008 at 01:01:38 Pacific Time
- More programs?
You must be logged in to reply.
Is there a place that people are collecting scripts to try out? I'm not much of a programmer, but would love to see how others are modifying the initial code and try out other programs for various 'states'.
Thanks for the awesome project. I've been looking for one of these for years since I last tried one and didn't really want to spend the hundreds of dollars that they usually cost pre-made.
Posted by DaytimeDreamer on February 15, 2008 at 16:00:17 Pacific Time
- More programs?
You must be logged in to reply.
Hey DaytimeDreamer,
It would be nice to have one place to see what different programs people have tried out. But no one (including me) has done this. But check the listings on this blog page, and you'll see links to other peoples' software, which includes a few different sequences that people have tried. There are also links to other projects using similar technology that have sequences you can try out.
Modifying the brainwave sequence table (called "brainwaveTab") in the firmware that I wrote is very easy. Take a look at it, and you'll see. It is just a list of brainwave types and how long to play each one -- 'b' for Beta, 'a' for Alpha, 't' for Theta, 'd' for Delta. The duration is in 10,000 microsecond intervals, so, for example, a 600,000 duration means 60 seconds. Feel free to ask questions if you want.
Cheers,
Mitch.
Posted by maltman23 on February 15, 2008 at 18:10:55 Pacific Time
- More programs?
You must be logged in to reply.
Wow! Fast response! I'll do all that. Thanks for the tips.
And thanks again. I LOVE this site.Posted by DaytimeDreamer on February 15, 2008 at 21:16:25 Pacific Time
- LED's
You must be logged in to reply.
Hi!
Have just completed the construction of my very own brain machine [am waiting for the adhesive to dry atm, heh heh].
Everything went fine during setup. However now upon turning it on, I notice that one of the LEDs has a much more noticeable flicker [to the effect of which it looks dimmer then the other one].
Is this supposed to happen? Or is there a problem I have made somewhere?
Any help would be greatly appreciated. Cheers!
EdPosted by edenist on February 14, 2008 at 07:42:58 Pacific Time
- LED's
You must be logged in to reply.
Just saw a video of it [with sound] and its not even making the right noise. Its more of a rough pulsing sound than the tone that it should be....
:sPosted by edenist on February 14, 2008 at 08:07:26 Pacific Time
- LED's
You must be logged in to reply.
Whoops, sorry..... I stuffed up with the programing, forgot to make a new hex file :s
Sorry for the spam. And thanks for this awesome machine!Posted by edenist on February 14, 2008 at 08:38:59 Pacific Time
- LED's
You must be logged in to reply.
Hey edenist,
Glad you got it going! Have fun tripping out to your brainwaves. And I hope you didn't get any glue in your hair.
Cheers,
Mitch.
Posted by maltman23 on February 15, 2008 at 18:03:48 Pacific Time
- .hex & Fusebits needed
You must be logged in to reply.
Hi Mitch!
Great project, I saw the vid of your talk at the CCC-Congress in Berlin. I do not use the MiniPOV-Kit and I would'n like to mess around with the C-compiler because I use other languages. I just want to see my BrainMachine running.
So it would be really cool if you could add the compiled hex-file of the firmware into the .zip-file of this project and also the settings for the fusebits (screenshot should be ok), so I/ppl can just burn the firmware onto any Tiny2313 without using the C-compiler.
Thank you very much!
Pink_Goblin from GermanyPosted by Pink_Goblin on February 03, 2008 at 12:13:52 Pacific Time
- .hex & Fusebits needed
You must be logged in to reply.
Hi Pink_Goblin,
You'll need to download and install some sort of free software to burn your microcontroller chip (even if you have the hex file already). So, why not download the free, very easy to use software? You don't need to learn C to use the software -- just install it, and then type in these magic commands in a command window:
make burn-fuse
and then
make program-slm
and the firmware will automagically compile and burn into the chip.
That said, here is the fuse info:
lfuse is E4
hfuse is the default
And here is a link to the hex file:
http://www.tvbgone.com/mfaire/slm/hex200/slm.hex
Mitch.
Posted by maltman23 on February 03, 2008 at 13:41:27 Pacific Time
- .hex & Fusebits needed
You must be logged in to reply.
I already have a bunch of burning-software, that's why I didn't want to install even more µc-stuff. Anyway, thanx for the file!Posted by Pink_Goblin on February 04, 2008 at 04:58:24 Pacific Time
- BrainMachine with ATTiny2313-20PU
You must be logged in to reply.
Hi,
i have built the brain machine. It works fine but the program doesn't stop after 14minutes and also not after 60minutes ....
my question: should i change the frequency value in sim.c file or is this normal?
Are there any other problems with the 2313-20PU instead of the v-edition?
ThomasPosted by chiemera on January 15, 2008 at 15:01:28 Pacific Time
- BrainMachine with ATTiny2313-20PU
You must be logged in to reply.
Hi Thomas,
Probably what's happening is the microcontroller is resetting itself. If you are using the non-V version, the Brown Out Detector (BOD) is being triggered by the voltage dipping below 2.7v, which resets the microcontroller, which starts the firmware over from the beginning, which means that the firmware will never end. You can try using two new alkaline AA batteries, which should keep the voltage above 2.7v. Or you can use the V version of the micro, which has a BOD of 1.8v instead of 2.7v.
Mitch.
Posted by maltman23 on January 27, 2008 at 21:29:06 Pacific Time
- Brain Hacking.
You must be logged in to reply.
Hi there Mitch. I built your Brain machine from a mini-POV3 kit, and I had no problems with it. The directions were great and the machine is great.
For the past couple of days (I built it 3 days ago), I've been trying to figure out how to make it end nicer, so I opened up the code, and looked around. I can't really figure anything out. I wanted to make the volume and brightness fade out at the end instead of just stopping so abruptly. But I've been told that it's impossible, so I'm still trying.
Anyway, I also thought it would sound nicer if the audio transitioned from one phase to the next. So I wrote a function to do that. And then I kept reading about people changing the frequencies it ran at, so I decided to just make some predefined variables that will set up the frequencies so it's alot easier to find what's best for someone. Well, I really don't have any complaints, just wanted to let you know that everyone i know likes it.
Oh yeah, and if yo8u happen to know how I can make it fade out at the end, or some other way to make it less abrupt, that would be awesome.
Oh, and feel free to take a look at the changes I made. I'll keep the C source up at http://www.chibu.net/slm/Posted by DLanigan on January 06, 2008 at 09:01:38 Pacific Time
- Brain Hacking.
You must be logged in to reply.
Sorry about the typos :P
~ DanielPosted by DLanigan on January 06, 2008 at 09:02:25 Pacific Time
- Brain Hacking.
You must be logged in to reply.
Hi Daniel,
Thanks for posting your changes so that everyone can check them out.
Fading the audio and the blinking lights is certainly possible. But it is not a simple modification of the original code. The way I would go about it is to use PWM (Pulse Width Modulation). This blog is not a really good place to discuss how to use PWM. There are probably some good tutorials on the web on how to use it. Conceptually PWM is not very difficult: you change the duty cycle of a square-wave, which gives a perception of greater amplitude when the duty cycle is greater (and perception of lesser amplitude when the duty cycle is lesser). Try typing in "pwm tutorial" into google and see if you can find something you like.
Best,
Mitch.
Posted by maltman23 on January 08, 2008 at 09:56:28 Pacific Time
- Brain Hacking.
You must be logged in to reply.
Well, I couldn't find any good code examples of how to use the PWM on the chip. Apparently people use assembly alot (or like, BASIC =\) So, I ended up writing my own after reading about the theory of how it works. The new code is up at the link in my first post. It works pretty well to fade the LEDs, but I don't think it will work for the Audio because I'm pretty sure pretty sure it would make the frequency of the audio just go up since people can hear up to like 20KHz. I'll keep thinking about it and trying things to see if i can figure out a way to make the Audio get quieter, but until then, feel free to play with the Fading LED code.
Have a good one,
~ DanielPosted by DLanigan on January 11, 2008 at 14:03:18 Pacific Time
- Brain Hacking.
You must be logged in to reply.
Hi Daniel,
If you want to see how someone else used PWM to fade the audio, do a search for cmock on this blog page -- he has a link for using PWM with the audio on his Brain Machine.
Keep in mind that although some people can hear up to 20KHz, most headphones can't reproduce frequencies that high. Cheap headphones (which is all you need for this project) can only go up to about 14KHz or 15KHz.
Mitch.
Posted by maltman23 on February 03, 2008 at 13:48:03 Pacific Time
- standing on the shoulders of giants...
You must be logged in to reply.
based on this project, I made some improvements, like sine-wave audio and import of gnaural "schedule" files, to be seen at http://www.tahina.priv.at/electronics.html
thanks, mitch, for the inspiration and starting point!Posted by cmock on December 24, 2007 at 15:56:34 Pacific Time
- standing on the shoulders of giants...
You must be logged in to reply.
Hey cmock,
Thanks for posting your improvements! Using PWM to create sin-waves makes the audio much more pleasant.
Best,
Mitch.
Posted by maltman23 on February 01, 2008 at 16:49:17 Pacific Time
- beta makes me flinch
You must be logged in to reply.
Mitch--
Great project, thanks for putting it out there!
I've been able to get mine to work, and have re-programmed it using the updated firmware.
I'm encountering what may be a "meatware" issue:
I'm sometimes finding the "beta" stretches to be very unnerving, especially the first few times the sequence returns from alpha to beta. The sensation I get is a sustained version of the momentary feeling I would have if I had just spotted a rock flying towards my head. Rationally, I know this isn't the case, but the feeling can be extremely powerful, and sometimes I have to just turn the SLM off. Has anyone else reported results like this, or is it just me?
I have a theory. The audio beat-frequency seems straightforward enough, but I'm wondering about the LEDs. Is it possible I'm reacting to an on/off cycle as two transitions rather than one cycle? That would double the effective frequency and might be inducing gamma waves instead of beta: that would account for my anxiety. Is there an edit I can make to slm.c to leave the audio as-is but halve the blink frequency?
Has anyone tried monitoring someone with an EEG while they're using the SLM?
Posted by hubieillin on November 20, 2007 at 15:38:28 Pacific Time
- beta makes me flinch
You must be logged in to reply.
Hi hubieillin,
I'm glad you got your Brain Machine going. Sorry about the rocks, though.
I've shown the Brain Machine to thousands of people by now: at Maker Faires and hackers conferences and parties and out in public. Most people really like the Brain Machine. But a small percentage of people are very sensitive to the bright blinking lights (which can feel somewhat harsh). Most of those people are fine if they slide the glasses down their nose to decrease the brightness till it's comfortable, and then they can get into it as well as everyone else. You should be able to find a brightness level for which there are no rocks flying at you. Why don't you give that a try? Similarly, if the sound seems too loud, you can slide the headphones off your ears a bit till the sound is comfortable.
Please try this out and let me know if that helps.
My guess is that the discomfort you are experiencing is due to being sensitive to the bright blinking lights. But if you want to experiment with halving the light blinking frequency, that is very easy to do by modifying the firmware that I wrote. In the firmware is a function called "do_brainwave_element" that contains calls to another function called "blink_LEDs" (one call per brainwave type: Beta, Alpha, Theta, Delta). The last two arguments for "blink_LEDs" are onTime and offTime. If you double both of those numbers in the call to "blink_LEDs" then you halve the frequency of the blinking.
If you try halving the blink frequency, please let me know how that works for you.
I tried using an EEG on me once while using the Brain Machine. I was only looking at Alpha, but it correlated well with the Brain Machine sequence.
I am building an EEG using the OpenEEG hardware and software. I'd like to do a whole bunch of experimenting once I get the EEG going.
Mitch.
Posted by maltman23 on November 21, 2007 at 14:28:25 Pacific Time
- beta makes me flinch
You must be logged in to reply.
I wanted to bring up that the eye is not the only part of the human body that is sensitive to light.
The popliteal region (hollow spot behind your knee) contains photo sensors and people have used bright lights for the treatment of SAD and jet lag. You may need something that is much brighter, and potentially a different colour, but experimentation is half the fun right?
It would be interesting to have an EEG hooked up and seeing if flashing patterns cause any change, how profound, and whether or not certain brain wave patterns are done this way. It would certainly be more discrete to have something going off if its under your pants than if its over your eyes, and it would enable you to still see things perhaps while walking to work.
So far the only things I know are are affecting circadian rhythms (biological clock) but I am unsure how many are actively researching this little known anatomical fact. There was a device about a decade ago that was supposed to help with jet lag specifically designed to do this by changing the intensity of the light to simulate dawn/dusk. A flashing pattern may also work.
I also wonder what would happen if you had conflicting patterns from the now 4 places that are known to be light sensitive. An MRI would actually be more helpful in seeing what is going on while light is on the back of the knee and seeing if that is really activating the same places in the brain, it may be that it ends up being a different area that is more/less/same effectiveness.
There is much to play with ...Posted by trixternospam@0xdecafbad.com on January 20, 2008 at 04:44:05 Pacific Time
- beta makes me flinch
You must be logged in to reply.
Hey caffeine lover!
If the blinking beta makes you flinch, then try sliding the glasses down your nose to make the lights dimmer on your eyes. Keep sliding the glasses down until your eyes are OK with the blinking lights. Most people who sensitive to light can comfortably use the Brain Machine this way.
Your idea about other photosensitive areas of the body is intriguing! Have you experimented with it? I'd be very interested to hear what results anyone has had with bright lights behind the knees.
Mitch.
Posted by maltman23 on February 03, 2008 at 13:56:00 Pacific Time
- beta makes me flinch
You must be logged in to reply.
Not yet. One thing I dont know is if you can do anything other than circadian rythms or not. So experimentation on that level should happen first. It would be somewhat interesting.
While they dont know why it works, there is a theory that it has to do with the quantity of blood vessels near the surface at the back of the knee which causes blood chemistry to change, and finally triggering a change in the brain. It may however be something else entirely.
Here are some links about it for those that are interested.
http://news.bbc.co.uk/1/hi/sci/tech/47947.stm
http://www.nfbcal.org/nfb-rd/1458.html NY Times reprint
http://www.sciforums.com/light-on-the-back-o-fyour-knee-help-jetlag-t-41352.html forum with some urls, one of which quotes a harvard study that did a modified study and didnt get the same results as the original
There are many more, google is your friend, but that should give people enough terms to locate more information easily, such as names of the researchers, etc.Posted by trixternospam@0xdecafbad.com on February 03, 2008 at 18:04:47 Pacific Time
- design changes
You must be logged in to reply.
So I finally got a chance to work on the glasses, and decided to modify them for lucid dreaming. I glued the LEDs into holes drilled into a half of a 1.5" PVC pipe to give my eyes some space. I bought one of those fabric sleep masks (about $3), cut two holes for the PVC halves and then used the silicone adhesive to glue the LEDs on the PVC pipes into the mask. I also extended the wires for the LEDs to about three feet.
In the slm.c file, add another brainwave type:
else if (brainChr == 'n') {
delay_one_tenth_ms(pgm_read_dword(&brainwaveTab[index].bwDuration));
return; // Null (simply delay)
}
This is just a delay. In the values table, create another set for five-hours of the new wave (a five hour delay). this is so that by the time the unit turns on, you are deep asleep. You may also want to just program the glasses to only run the second half of the pre-programmed sequence so that your brain can "warm up." I also tripled all of the values in the time field so the dream session lasted longer.
I found that with this setup the glasses work better for normal use because the sleeping mask shuts out any interfering light.
I used these the other night; I had the most realistic dreams I have ever had, although I don't clearly remember what they were about. I was aware of the dream, but did not was not able to control it.
I ordered some different colored LEDs a few days ago; when they arrive I will put them in and tell everyone if there was any difference.
Posted by chennate on November 17, 2007 at 13:46:27 Pacific Time
- lucid slm firmware download
You must be logged in to reply.
can someone post a link to download the lucid dream version of the firmware? I am new here and aren't REALLY good at computers in the terminal. i can do some stuff but if someone can post a download link or give really good instructions that would really help!Posted by taehC on May 04, 2008 at 23:06:54 Pacific Time
- lucid slm firmware download
You must be logged in to reply.
can someone post a link to download the lucid dream version of the firmware? I am new here and aren't REALLY good at computers in the terminal. i can do some stuff but if someone can post a download link or give really good instructions that would really help!Posted by taehC on May 04, 2008 at 23:05:55 Pacific Time
- design changes
You must be logged in to reply.
The wires need reinforcement where they meet the pcb and on the other end, where they meet the LEDs. They had fallen out on both ends when I woke up. The blue LEDs seemed to have no real effect at all, because I couldn't see them with my eyes closed, awake. I thought my brain might be more susceptible to the light when I was asleep, so I gave them a try anyway. I don't know if the reason they had no effect was because they were not bright enough or because the wires had fallen out. I'll give them a try tonight.Posted by chennate on November 19, 2007 at 14:46:47 Pacific Time
- design changes
You must be logged in to reply.
One of the things I've discovered is the wonders of hot glue! Hot glue is your friend! It does not conduct electricity, so you can use it to reinforce the connections of the wires to the PC Board -- put a good glob around each wire and make sure that the glob is surrounding the pad on the board. There are other ways, but this way works great. And if you get the colorless translucent glue sticks, then it doesn't look bad, either.
There are two reasons (besides for broken wires) that the blue LEDs my not be very visible: blue LEDs often need more than 3v to make them bright, and your eyelids are pretty good red filters.
Happy dreaming...
Mitch.
Posted by maltman23 on November 19, 2007 at 15:02:32 Pacific Time
- design changes
You must be logged in to reply.
Hi chennate,
Cool mod. Please post any results of your lucid dreaming and colored LED experiments so everyone (including me!) can benefit from your experience.
Mitch.
Posted by maltman23 on November 19, 2007 at 11:51:04 Pacific Time
- Brainwave Glasses
You must be logged in to reply.
Hey Mitch, I know the brainwave glasses work by inducing certain states via light pasing thru the eyes.. where would i find information on the effects of modulated light on living cells and or the resonant frequencies of cells in relation to the applied light source?? Can applying such light to living tissue affect regeneration and or degeneration?Posted by whc83 on November 02, 2007 at 19:01:20 Pacific Time
- Brainwave Glasses
You must be logged in to reply.
Hi whc83,
My field of interest has been with physiology of the brain, and brainwave research in specific. This is really different than the field you are asking about. I don't really know anything about how blinking lights of various frequencies effect living tissue. It makes sense that there could be some effect. Some people have pointed out commercial products that claim to do all sorts of healing with blinking lights. Some of these are clearly high-tech snake-oil, but maybe some have a basis in a our consensus reality. I am not up in the field, so I don't know what the underlying research is.
Mitch.
Posted by maltman23 on November 03, 2007 at 10:46:16 Pacific Time
- Austin Maker Faire 2007
You must be logged in to reply.
Hi Everyone,
I just returned from the Austin Maker Faire (October 20th and 21st). What a great time! I think there were 20,000 people there. And hundreds of Makers had booths and workshops. Lots of people built their own Brain Machines at my workshop, many of whom had never built anything at all before. And everyone got theirs going.
I took pictures of 231 of the thousand, or so, people who tried out the Brain Machine at my workshop. Most people really liked it, as you can see from the photos I uploaded to my Flickr page:
Austin Maker Faire photos
As you can see, there were a lot of happy people tripping out to their inner world.
Mitch.
Posted by maltman23 on October 24, 2007 at 14:59:08 Pacific Time
- What am I doing wrong?
You must be logged in to reply.
make slm.hexdoes not make the .hex file.
make slm.hexreturns:
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 1Posted by Wyrd on October 20, 2007 at 04:06:37 Pacific Time
- anyone else using Linux?
You must be logged in to reply.
Here's the solution:
http://www.ladyada.net/forums/viewtopic.php?t=3751Posted by Wyrd on October 23, 2007 at 05:19:32 Pacific Time
- new error message
You must be logged in to reply.
What's happened here?
/slm$ make program-slm
avrdude -p attiny2313 -i 10 -P /dev/ttyUSB0 -c dasa -U flash:w:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 2.21s
avrdude: Device signature = 0x1e910a
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file ""
avrdude: error opening : No such file or directory
avrdude: input file auto detected as invalid format
avrdude: can't open input file : No such file or directory
avrdude: write to file '' failed
avrdude: safemode: Fuses OK
avrdude done. Thank you.
make: *** [program-slm] Error 1Posted by Wyrd on October 18, 2007 at 17:51:04 Pacific Time
- new error message
You must be logged in to reply.
What happened here is no hex file.Posted by Wyrd on October 22, 2007 at 05:33:06 Pacific Time
- new error message
You must be logged in to reply.
What happened here is no hex file.Posted by Wyrd on October 22, 2007 at 05:31:58 Pacific Time
- LEDs don't light
You must be logged in to reply.
I have a problem with the LEDs in the glasses not lighting.
I desoldered the leads and connected them right at the terminals for the battery leads and they light - so I know the LED are OK and the wires are properly connected to the LED itself, but when they're soldered at the LED pad 1 & 2 they will not light.
After checking my joints I decided that the capacitors may be the problem.
My invoice from Mouser says these are 50v 1uF 5x11 Bi-Polar Aluminum Electrolytic Capacitors.
I'm no electronics tech but my research tells me the Bi-polar caps have no polarity requirement but electrolytic caps do.
So could I have them stuffed backwards or does my problem lie elsewhere... and where might that be?
The first steps went flawlessly and Ladyada's firmware compiled, loaded and ran (the VVVVV's) right off the bat.
I'm stumped - anyone have a clue?
TFYTPosted by Wyrd on October 18, 2007 at 05:50:27 Pacific Time
- LEDs don't light
You must be logged in to reply.
Hi TFYT,
The capacitors are bipolar, as it says in the article, meaning they can be put into the pads in either direction. However, the capacitors are only for the sound, and won't effect the lights.
If you were able to program the microcontroller with the VVVVV pattern, then you have almost everything working!
In order to get the lights for the Brain Machine to light up, you first have to program in the SLM (Brain Machine) firmware. Did you do that? If so, do you get any sound from the headphones? If so, then there must be a problem with the connections to the LEDs. Did you stuff (insert and solder) R7 and R8 into the PCB? Please double check your solder connections with R7, R8, and the wires for the two LEDs. Be sure that the LEDs are connected correctly -- unlike the biploar capacitors, it does matter which way you connect LEDs to a circuit (if they are in backwards, they will not light).
Also, please be careful when you connect an LED to power. If you connect it directly to a battery with no series resistor (which limits the current that can flow through the LED), you can burn out the LED. It is possible you may have burned out the LEDs by connecting them directly to the battery. Please test them again by connecting them to the battey-pack again, but with one of the extra resistors in series with one of the leads (the MiniPOV kit comes with eight resistors, of which you only stuff six -- the value of these eight resistors is either 47 or 100 ohm). If the LEDs won't light any more, then you can replace them with the two unused LEDs that came with the MiniPOV Kit.
I hope that gets you going.
Cheers,
Mitch.
Posted by maltman23 on October 18, 2007 at 08:03:42 Pacific Time
- LEDs don't light
You must be logged in to reply.
Hi Mitch,
Thanks for the great project - I'm looking forward to actually using it rather than building and troubleshooting - LOL
I was able to get the chip programmed with the slm firmware and upon disconnecting from the computer and turning it back on only the 4 LEDs on the board light.
I could hear a clicking noise as I plugged in the headphones but no other noise.
I do have the resistors in R7 & R8 and the polarity is correct for the wiring going to the LEDs in the glasses.
The leads to the mounted LEDs aren't connected to the board right now - I'm just using a spare LED to check to see if there's juice at the LED pads 1 & 2 but so far no luck - or pads 3 & 4 also for that matter.
To test the pads at LED 1, 2 3 & 4, I touched one of the extra LEDs to the terminal (making sure the correct poles were touching the correct sides of the terminals) and they don't light - but if I touch them to the last four pads (5,6,7 & 8) they do light.
To test the LEDS in the glasses, I just now touched the leads to the back of the board at pad 3 and they lit - so I got lucky there and didn't burn them out.
All of my solder joints look ok to me, and a friend with much soldering experience looked at them and said they look pretty clean to him - I can't see what else might be causing the problem.
This is my first project in 30 years or so - it was nice that everything worked in the first phase, it's been fun and I'm looking forward to some mods when I build the next one.
Thanks For Your Time
Curt
Posted by Wyrd on October 18, 2007 at 08:41:16 Pacific Time
- LEDs don't light
You must be logged in to reply.
Hi Curt,
I'm glad you're making things again after all this time. What took you so long? :)
Debugging can be frustrating, but once you get it working, it is a very satisfying feeling!
If the 4 LEDs on the board are lighting up, then the programming for the SLM firmware didn't work. When you wave the PCB back and forth, do you still see a "VVVVV" pattern? My guess is that you do. Please try programming the SLM firmware again. Do you get three lines of ####### and no errors and then it says "thank you" at the end? If not, what are you getting?
So you know: the SLM firmware only pulses the microcontroller outputs for the two ears and two eyes, and doesn't touch the outputs for the 4 LEDs on the board.
Mitch.
Posted by maltman23 on October 18, 2007 at 09:40:30 Pacific Time
- LEDs don't light
You must be logged in to reply.
Hi Mitch,
Thanks for the great project - I'm looking forward to actually using it rather than building and troubleshooting - LOL
I was able to get the chip programmed with the slm firmware and upon disconnecting from the computer and turning it back on only the 4 LEDs on the board light.
I could hear a clicking noise as I plugged in the headphones but no other noise.
I do have the resistors in R7 & R8 and the polarity is correct for the wiring going to the LEDs in the glasses.
The leads to the mounted LEDs aren't connected to the board right now - I'm just using a spare LED to check to see if there's juice at the LED pads 1 & 2 but so far no luck - or pads 3 & 4 also for that matter.
To test the pads at LED 1, 2 3 & 4, I touched one of the extra LEDs to the terminal (making sure the correct poles were touching the correct sides of the terminals) and they don't light - but if I touch them to the last four pads (5,6,7 & 8) they do light.
To test the LEDS in the glasses, I just now touched the leads to the back of the board at pad 3 and they lit - so I got lucky there and didn't burn them out.
This is my first project in 30 years or so - it was nice that everything worked in the first phase, it's been fun and I'm looking forward to some mods when I build the next one.
Thanks For Your Time
Curt
Posted by Wyrd on October 18, 2007 at 08:36:21 Pacific Time
- LEDs don't light
You must be logged in to reply.
Well... this is some progress, I think.
Here's the output from "make program-slm":
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
Posted by Wyrd on October 18, 2007 at 11:01:52 Pacific Time
- LEDs don't light
You must be logged in to reply.
Sorry.. entered the wrong command.
It's working now.
Thanks for the tipsPosted by Wyrd on October 18, 2007 at 12:02:57 Pacific Time
- LEDs don't light
You must be logged in to reply.
Something's still wrong.
I'm getting flashing in the LEDs and sound from the headphones but the 4 LEDs on the board are also flashing 1 & 2 are quite dim and 3 & 4 are brighter.
Still a programming issue?
I did get the three hash lines and:
avrdude: verifying ...
avrdude: 336 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.Posted by Wyrd on October 18, 2007 at 12:24:45 Pacific Time
- LEDs don't light
You must be logged in to reply.
did u download the firmware for SLM a the top of this page, and then use make program-slm?Posted by unreal-dude on November 06, 2007 at 08:34:21 Pacific Time
- LEDs don't light
You must be logged in to reply.
sounds as if you are running the mypov project, make sure u downloaded the SLM firmware from http://makezine/10/brainwavePosted by unreal-dude on November 06, 2007 at 08:32:53 Pacific Time
- Audio question
You must be logged in to reply.
Hi!
Great project. I completed it as soon as I got the mini POV kit. One issue though: The audio does not seem to vary in pitch. I couldn't find the exact caps that you used, so I used a 1uf Tantalum polarized cap from Radio Shack. I got no errors in any step of the process, I made sure that they were wired up correctly, and I hear a tone out of each ear. But there does not seem to be any modulation in pitch. any ideas?Posted by spudtech on September 20, 2007 at 20:52:27 Pacific Time
- Audio question
You must be logged in to reply.
Hi spudtech,
The cap you used should be fine.
Were you able to program the microcontroller with the SLM.c firmware (without using the -F option in the command line)?
If you were able to program the microcontroller, are the two LEDs for the eyes blinking at the correct rate (60 seconds for Beta rate of 14Hz, followed by 10 seconds for Alpha rate of 11Hz, etc.)?
If the LEDs are blinking at the correct rates, then my guess is that the audio is doing the correct thing, but it's just not what you are expecting. One of the ears stays constant at about 400Hz, and the other ear changes pitch when the LEDs change the rate that they blink (60 seconds of about 414Hz for Beta, followed by 411Hz for Alpha, etc.) If this is not happening, then try checking the wiring from the MiniPOV kit to the headphone jack. Look carefully at the photo and be sure everything is just as shown there.
I hope that helps. Please let me know how it goes.
Mitch.
Posted by maltman23 on September 20, 2007 at 21:01:54 Pacific Time
- Audio question
You must be logged in to reply.
Thanks for the quick reply!
The LEDs do change and the wiring is correct. I have the two audio wires going to the positive leads of the two caps and the ground is going to the cap lead closest to the edge of the board, which is traced into the ground for the rest of the LEDs. Does right vs. left matter when wiring up the speaker leads to the caps?
Thanks!Posted by spudtech on September 20, 2007 at 21:09:46 Pacific Time
- Audio question
You must be logged in to reply.
As I wrote in the article, it doesn't matter which channel is left and which is right.
You hooked up the caps correctly.
Do you hear different pitches out of each ear? If not, can you tell me approximately what frequency you hear (or what note on a piano keyboard or guitar)?
Mitch.
Posted by maltman23 on September 20, 2007 at 21:14:21 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
Hey Mitch, thanks for a great project. I heard about this from 2600, and it got me to dust off my soldering iron and do my first PCB project ever. I built the miniPOV a few days ago and finished off the Brain Machine tonight.
I have 2 questions.
1) I wasn't able to readily find 1uF caps, so instead I used the closest I could find, 2.2 uF caps. It seems to work, but if anything the tones are a bit loud and harsh - would this be related to not using 1uF capacitors?
2)I don't know C nor microcontrollers so I'm blindly asking this - since the 4 LEDs from the miniPOV setup are left on the board, it seems these could be used to indicate which routine the machine is in, a, b, t, or d. I don't know what the usefulness of this would be except perhaps of interest to an observer. I'll try to figure this out on my own, if possible. But if I'm barking up the wrong tree, please let me know :)
Thanks again. Cool stuff.
Posted by OblivionRatula on September 10, 2007 at 19:43:44 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
I figured out the answer to Question #2 on my own. Got it working. Cool.Posted by OblivionRatula on September 10, 2007 at 20:42:37 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
Hi by OblivionRatula,
I am happy to be part of the cause for you to start making things again. :)
The raw sound for this project is just square waves, as they come out of the microcontroller. The 1uF caps, along with the 1k resistors form a Low Pass Filter to round off the harsh corners of the square waves. Yet it still doesn't make the sound wonderful. Using a 2.2uF cap will actually reduce the volume because it cuts off even more of the corners of the square waves. If the sound is too loud, then you can either build a volume control (do a search for "volume" on this page and you'll find some discussion on this), or just slip the headphones a little bit off of your ears.
Using the 4 extra LEDs on the PCB is a fine idea. It shouldn't be difficult to program this. You can look in the firmware to see how to turn LEDs on and off. Check out the blink_LEDs function and you'll see these two lines:
PORTB |= 0b00000011; // turn on LEDs at PB0, PB1
PORTB &= 0b11111100; // turn off LEDs at PB0, PB1
Can you generalize from these two lines to see how to turn individual LEDs on and off?
The 4 extra LEDs are on PB7, PB6, PB5 and PB4 (the top 4 bits of Port B).
So, go ahead and try out some firmware programming! You can't hurt anything by doing something "wrong" in the firmware. You can always re-program the working firmware and you're back to where you started from.
Happy experimenting!
Mitch.
Posted by maltman23 on September 10, 2007 at 20:25:01 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
Thank Mitch, I'd missed your reply when I posted mine. I have since realized that you had the code I needed in there already in your commented out debugging lines. Not very bright of me to notice beforehand, but at least I learned something from the exercise.
I expect I'll be putting in a volume control. With e ear buds I'm using, it's just a bit too loud - even if the caps I'm using brought it down some. One thing I noticed is that the page referenced elsewhere in these comments has a broken IMG link: http://www.tvbgone.com/volctrl.htm Can you please make that schematic available again?
One last thing (for now). One thing I have noticed each time I've used the brain machine is that it makes my tinnitus very noticeable. After four years, I think, of constant ringing in my ears, I'm pretty good at tuning it out, but something about the tones in the SLM really bring it to the fore. I'm going to experiment with some alternate base frequencies and see if that helps, because it really does distract from the experience. I wonder if anyone else has experienced this.
Thanks again for the instruction and more importantly the inspiration.
Posted by OblivionRatula on September 11, 2007 at 08:41:10 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
Thanks for pointing out the broken link on the volume control schematic. Sorry about that. Try it again -- it should be OK now. If you have trouble finding a stereo pot, you can use two single ones.
Regarding your tinnitus: I think that your suggestion about changing the base frequency should help. If you choose a base frequency that is not related to the ringing frequencies in your ears (not near the frequency, and not a musical interval of the frequency), then I hope that it will not interfere with your tinnitus. Please let me know what you find out.
Mitch.
Posted by maltman23 on September 11, 2007 at 13:56:36 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
Mitch, just a follow-up - I did try a lower base frequency and at the very least it's less grating on my ears, but the tinnitus still interplays with the tones and beats. I'm going to look around some more to see if another freq. is even better but I seem to be on the right track.Posted by OblivionRatula on September 20, 2007 at 19:30:05 Pacific Time
- Alternate caps/status LEDs?
You must be logged in to reply.
Cool. I hope you can find a frequency that works well for you.
Do you know the frequency (or frequencies) of the ringing from your tinnitus? For most people the ringing is a particular frequency (or particular frequencies).
You can find the frequency (or each frequency) by sweeping slowly through frequencies from very low to very high, and noting where you hear the beat frequencies slow down to a stop.
To create the sweep of frequencies, you can use audio editing software such as CoolEdit. Or, you can program the sweep by hacking the firmware for the Brain Machine.
Once you know the frequency (or frequencies) of your tinnitus, then you know exactly which frequencies to avoid. (You should also avoid multiples of these frequencies).
Mitch.
Posted by maltman23 on September 20, 2007 at 20:24:37 Pacific Time
- Wire Gauge
You must be logged in to reply.
The first brain machine I built seems to have a short in it (which is nearly impossible for me to find after glueing the stereo jack on top of several connections.) I think that somewhere along the lines of stripping the 30 gauge Kynar wire, I must have put a kink in one of the wires that shouldn't be there. I am about to build my second brain machine and was wondering if I could use a heavier gauge wire (I have speaker wire that I believe is 24-gauge). Will this affect the machine? Is there anything other can Kynar wire that I can use to make the machine a bit more sturdy?
Thanks,
Zythe84Posted by zythe84 on September 08, 2007 at 09:33:43 Pacific Time
- Wire Gauge
You must be logged in to reply.
Nevermind! Sorry! Found the answer to my own question below... oops!Posted by zythe84 on September 08, 2007 at 09:36:56 Pacific Time
- Wire Gauge
You must be logged in to reply.
Nevermind! Sorry! Found the answer to my own question below... oops!Posted by zythe84 on September 08, 2007 at 09:36:50 Pacific Time
- Wire Gauge
You must be logged in to reply.
I'm glad you got things going.
For the record, I find Kynar wire easy to use, but it's a matter of personal taste. Any wire is fine to use in this project. Please do a search on this page for "wire" and you'll see some discussion about this.
Mitch.
Posted by maltman23 on September 08, 2007 at 12:44:57 Pacific Time
- troble unzipping and text editor
You must be logged in to reply.
I cant figure out how to unzip the files. Am I to open the slm or make file. I tried to open it with win zip. I dont know where to find or what to do with the text editor. Please help me.
ThankyouPosted by atnekn on September 05, 2007 at 19:33:37 Pacific Time
- troble unzipping and text editor
You must be logged in to reply.
Hello atnekn,
Sounds like you are on the right path.
If you are new to making things with microcontrollers then some of these may seem a bit scary. But please don't fret, as many hundreds of people have successfully built this project who have never played with any electronics ever before! You can do it too. :) And I'm here to help.
If you are using Windows, then WinZip is a good program to open zip files. What happens when you try to open the zip file?
What step are you on where you want to use the text editor? Is it the step where you are changing the MiniPOV pattern to a bunch of "V"s?
You can use Notepad or Worpad as a text editor. These come with Windows and are under:
Start -> Programs -> Accessories
If this is not enough info to get you going, please write again with more details, and what step you are on in the MAKE article.
Mitch.
Posted by maltman23 on September 05, 2007 at 21:53:13 Pacific Time
- Awesome BrainMachine
You must be logged in to reply.
Cool ass...just built the "brainmachine" I saw some cool stuff. It really does work. Not quite like trippin but saw some really cool colors/patterns....and it changes up.
Worth the effort to buy/build.Posted by thecybologist on August 20, 2007 at 22:30:49 Pacific Time
- Stepping Down Frequencies
You must be logged in to reply.
I found a piece of software called BrainWave Generator that slowly fades from higher frequencies to lower ones seamlessly. I wanted to recreate this effect using my brainwave machine, so I copied the code defining each frequency and created intermediate frequencies, so that instead of jumping back and forth, it gradually stepped to a lower frequency, and then back up.
However, when I ran the make program-myslm, there was an error. I'm guessing I don't understand the programming well enough, and there is probably something I need to define somewhere in order to make this work.
Here is what the section I edited looks like:
"
void do_brainwave_element(int index) {
char brainChr = pgm_read_byte(&brainwaveTab[index].bwType);
if (brainChr == 'b') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b10000000;
// Beta
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 18628; // T1 generates 214.719Hz, for a binaural beat of 14.4Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 34.7ms, offTime = 34.7ms --> 14.4Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 347, 347 );
return; // Beta
}
else if (brainChr == 'l') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 18768; // T1 generates 213.117Hz, for a binaural beat of 12.8Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
else if (brainChr == 'a') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 18919; // T1 generates 211.416Hz, for a binaural beat of 11.1Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
else if (brainChr == 'c') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19145; // T1 generates 208.921Hz, for a binaural beat of 8.6Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
else if (brainChr == 'k') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19293; // T1 generates 207.318Hz, for a binaural beat of 7.0Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
else if (brainChr == 't') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b00100000;
// Theta
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19386; // T1 generates 206.324Hz, for a binaural beat of 6.0Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 83.5ms, offTime = 83.5ms --> 6.0Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 835, 835 );
return; // Theta
}
else if (brainChr == 'i') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19567; // T1 generates 204.415Hz, for a binaural beat of 4.1Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
else if (brainChr == 'e') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19672; // T1 generates 203.324Hz, for a binaural beat of 3Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
else if (brainChr == 'd') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b00010000;
// Delta
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19750; // T1 generates 202.521Hz, for a binaural beat of 2.2Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 225.3ms, offTime = 225.3ms --> 2.2Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 2253, 2253 );
return; // Delta
}
else if (brainChr == 's') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b01000000;
// Alpha
// start Timer 1 with the correct Offset Frequency for a binaural beat for the Brainwave Type
// to Right ear speaker through output OC1A (PB3, pin 15)
OCR1A = 19868; // T1 generates 201.319Hz, for a binaural beat of 1Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 45.1ms, offTime = 45.0ms --> 11.1Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 451, 450 );
return; // Alpha
}
// this should never be executed, since we catch the end of table in the main loop
else {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b00000010;
return; // end of table
}
}
"
Then in the meditation part i had it go like this:
"
char bwType; // 'a' for Alpha, 'b' for Beta, 't' for Theta, or 'd' for Delta ('0' signifies last entry in table
unsigned long int bwDuration; // Duration of this Brainwave Type (divide by 10,000 to get seconds)
} const brainwaveTab[] PROGMEM = {
{ 'b', 30000 },
{ 'l', 30000 },
{ 'a', 30000 },
{ 'c', 30000 },
{ 'k', 30000 },
{ 't', 30000 },
{ 'i', 30000 },
{ 'e', 30000 },
{ 'd', 30000 },
{ 's', 30000 },
{ 's', 30000 },
{ 'd', 30000 },
{ 'e', 30000 },
{ 'i', 30000 },
{ 't', 30000 },
{ 'k', 30000 },
{ 'c', 30000 },
{ 'a', 30000 },
{ 'l', 30000 },
{ 'b', 30000 },
{ '0', 0 }
};
"
Please help!Posted by zythe84 on August 20, 2007 at 12:05:34 Pacific Time
- Stepping Down Frequencies
You must be logged in to reply.
Hi zythe84,
I don't see anything obvious that would give you any compiler errors. Could you copy the output from your command window that shows the errors you're getting?
Your approach will give a smoother transition from one brainwave to another. The approach that greyskale suggested will be even smoother.
I'll be interested to hear from you (once you get your code working) how well it works for you.
One thing to keep in mind is that a sequence (meditation, for example) is more than going from Beta to Delta. Brains output a complete spectrum of frequencies, from Delta up through Gamma (though I've only been using up to Beta). To go from awake to deep meditation requires that Beta, Alpha, Theta, and Delta are stimulated throughout the sequence. Otherwise, when you reach Delta (with no Beta or Alpha or Theta stimulation) you will tend to fall asleep. A deep meditation is a combination of all four brainwave frequencies. Same goes for most states.
That said, there is nothing wrong with smoothly going from Beta to Delta and then up again. Play around and experiemnt. And please let everyone know how it goes.
Mitch.
Posted by maltman23 on August 24, 2007 at 08:56:12 Pacific Time
- Stepping Down Frequencies
You must be logged in to reply.
I'm not sure it will be as easy as a cut and paste to do what you want. A simple way of doing it would be to interpolate the LED flash freq when there are "x" amount of ms left before the next wave type.
I think something like:
if("timer" < 50){
"current freq" += "next freq" / "rate of change";
}
Posted by greyskale on August 21, 2007 at 17:45:00 Pacific Time
- Adding switches to control the Brain Machine
You must be logged in to reply.
For those interested in adding switches to their Brain Machine, here is some firmware that I wrote that will read switches added to D1 (pin 3) and D2 (pin 6) of the microcontroller.
DDRD = 0b11111001; // Set PD1 and PD2 as inputs
PORTD = 0b00000110; // Activate pull-up resistors on PD1 and PD2
while(1) {
// turn on LED at PB6 if PD1 is High, else turn off LED at PB6
if (bit_is_set(PIND, 0)) PORTB |= 0b01000000;
else PORTB &= 0b10111111;
// turn on LED at PB7 if PD2 is High, else turn off LED at PB7
if (bit_is_set(PIND, 1)) PORTB |= 0b10000000;
else PORTB &= 0b01111111;
}
The switches should be connected between the PortD pins and ground, so that when the switch is closed, the pin is grounded (and when the switch is open the pin will be high because of the internal pull-up resistors that we activated).
You can modify the above code to make the Brain Machine start do different sequences, turn it off quickly, or whatever you like.
Mitch.
Posted by maltman23 on August 17, 2007 at 15:21:50 Pacific Time
- Adding switches to control the Brain Machine
You must be logged in to reply.
Hi Mitch,
thanks for that code. I am not very good im programming (microcontrollers) (rather in english language ;-)). I wonder how it would be possible to add some buttons to the brain machine to choose the program before starting. I want to have 3 programs on my brain machine. So how to connect buttons and make the code for it? Im very glad for some more hints!! best wishes, microPosted by bmicro on March 22, 2009 at 12:28:49 Pacific Time
- Adding switches to control the Brain Machine
You must be logged in to reply.
I can't say a whole lot more than has been said (since I'm on a deadline for getting the new version of TV-B-Gone out!), but if you can read a switch, and if you have three tables of brainwave sequences instead of one, then the firmware can pick which of the three brainwave sequence tables to use depending on which button you press. Make sense? This part of the firmware is really just C language -- there are ways in C to choose a section of code based on the value of an input. So, do some poking around on the web, and you'll find ways of doing what you like. Happy sequencing...Posted by maltman23 on March 22, 2009 at 12:41:30 Pacific Time
- Adding switches to control the Brain Machine
You must be logged in to reply.
Thanks a lot. I'll do some research and when i am ready ill post my results. Its the fastest response to a post i had in my life ;-) thx. microPosted by bmicro on March 22, 2009 at 12:58:24 Pacific Time
You must be logged in to reply.
Hello Everyone,
Greetings from Berlin. Sorry for the delay in responses to questions over the last two weeks. I've been at the Chaos Communications Camp in Berlin, which is a fantastic outdoor hackers conference. I had a great time!
About 800 people tried out the Brain Machine at the Camp, and most people really loved it. Check out some photos, if you like:
http://www.flickr.com/photos/maltman23/sets/72157601504498401/
40 people built their own Brain Machine at the workshop that I held (and 10 people built open source TV-B-Gones, which is an upcoming article in MAKE Magazine). It was a very common thing to see people around Camp wearing bizarre glasses with blinking red lights before their eyes. The presentation I gave about the Brain Machine was very popular and well received. Here is some French press on the event:
http://www.lexpress.fr/info/quotidien/reportage-photo/default.asp?id=459241
Check out the photo on the lower left corner. :)
I'll be answering questions on this site again over the next few days as I have time.
Best,
Mitch.
Posted by maltman23 on August 17, 2007 at 05:31:40 Pacific Time
- Homebrew machine advice
You must be logged in to reply.
I'm trying to build my own machine like this from a PIC 18F452 that will allow for brain entrainment, as well as lucid dreaming. Its going well (when I have time to work on it at least), but I wanted to ask about the pre-programmed sequence on this brain machine.
I see that you toggle between multiple brain wave types instead of going directly from one to the other. I understand the reason for doing this, but is it wholly necessary? Can I achieve the same effects by simple going from say, Beta for 5 minutes directly to the next level down with no transitions?
Mainly I'm curious to reduce my code :PPosted by H4T on August 16, 2007 at 11:32:25 Pacific Time
- Homebrew machine advice
You must be logged in to reply.
From my experimenting I have found that it is more effective if you go back and forth between frequencies. What I would really like, for example, is to slowly decrease the amplitude of the Beta at the beginning, while slowly increasing the amplitude of the Alpha. But since this simple Brain Machine can only create one brainwave frequency at a time, and we have no ability to change the amplitude (it is always full on), going back and forth for varying lengths is an OK enough way to accomplish the "fades". Also, if you do Beta for 5 minutes, say, and then Alpha for a long while, then Theta, if you don't keep stimulating at Beta and Alpha occasionally, you may find yourself falling asleep (without Beta to keep you awake).
That said, go ahead and experiment. See what happens for you. And please post your results here so we can all learn from your work (play).
Mitch.
Posted by maltman23 on August 17, 2007 at 15:28:04 Pacific Time
You must be logged in to reply.
I was wondering how critical it is to have the freqs. for the lights and sound running at say 14.2hz as opposed to just 14hz? I am writing your sequence into an arduino sketch and it can make all the difference in the world efficiency wise using a "byte" instead of a "float"Posted by greyskale on August 10, 2007 at 17:08:09 Pacific Time
You must be logged in to reply.
Please go ahead and try it with integer values for frequencies. The values I chose are not the only ones that will work. Part of how I chose the values was determined by the actual frequency you get when using integers for values in the hardware timers in the ATtiny2313 microcontroller. Brains output a continuous spectrum of frequencies, and the four brainwave types come from dividing the spectrum up into four bands. So, if you choose 14.0Hz, that should work OK, since that is also (along with 14.4Hz) in the band for Beta. Play around with values, and see what works and what doesn't for you. If you can, please post your results so we can all learn from your experience. That's the cool thing about open source. :)
Mitch.
Posted by maltman23 on August 17, 2007 at 15:05:07 Pacific Time
- arduino sketch
You must be logged in to reply.
Hi, please can you tell me if you were succesfull with your arduino sketch???Can you share with your sketch please??? Thanks!!!Posted by ionash on August 16, 2007 at 08:33:01 Pacific Time
- arduino sketch
You must be logged in to reply.
hello... although I'm still working on the audio portion of the sketch, the timing for the LEDs is spot on as far as I can tell. I tried it out and did get some very interesting patterns etc. however I did not have a plain jane LED on hand and used a blue... I don't recommend this as it's a bit harsh on the eyes (even closed). I will post my sketch on the arduino forum in a few days or so.Posted by greyskale on August 21, 2007 at 15:53:06 Pacific Time
- compiling problems
You must be logged in to reply.
I got the minipov put together last night. Played around with it for about an hour and started to work on putting the slm firmware on. I ran into a problem with the binary notation and fixed that as per instructed. There was also a problem with the fact that my avrlibs did not have the function sleep_cpu(), i replaced this with the function sleep_mode() and it programmed fine. Tonight i plan on wiring up the headphones and place the eye led's. I will keep all updated on how well it works. I am working on ubuntu 6.06, gcc 4.0, with a keyspan usa-19hs usb/serial converter. Great project mitch. I have had tons of fun so far. My first intro to microcontrollers.Posted by krazylink on August 10, 2007 at 12:17:59 Pacific Time
- Let us all Post our Experiences USING the glasses!
You must be logged in to reply.
It is so hard not to post twice. Sorry!
Hey Guys, now that over a thousand people have used Mitch's Glasses, why not use This Thread to post what happened when we put them on and how we have enjoyed them.
I will go first.
When I first put them on, I did not see any shapes, only colors. But, they were beautiful colors and at one point it looked like an undersea scene. The same thing happed for about six sessions. After that, for some reason, I did not see any colors anymore , it was just dark. I opened my eyes to see if the LEDs were not working and they were working fine. I was wondering if this is normal. Does a person get de-sythisized to this? I changed the battery to a fresh battery and moved the LEDs so they where closer to my eyes, but same thing. Go Fish!!! But, even though I don't see the colors, I still get the benefit from wearing them. I also pulled them back away from my eyes and saw a little bit of the colors. But, they always relax me and make me feel good to wear them.
I was thinking of making another pair or pairs using different plans on the chipset. And, making the glasses more comfortable. You tell me how. I think placing the battery and board away from the glasses is a good idea. I even thought of a headband to keep glasses on might be a good idea. I intend to LUCID dream with this setup. But, I thought I would use this program the way it is until I get comfortable programming for a different setup.
Hats off to Mitch Everyone! for introducing us to a new concept!
I am going to try to click the mouse only once now so as not to double post.
:-)Posted by MovieMaker on August 09, 2007 at 06:34:47 Pacific Time
- Let us all Post our Experiences USING the glasses!
You must be logged in to reply.
Hi MovieMaker, good idea! I hope more people post their experiences using the device.
I met Mitch at Maker Faire in Austin last weekend and got the kit from him (Thanks Mitch!)
I finished assembling it last night (my first PCB soldering project went without a hitch). Still have some work to make it prettier, and the battery pack is pretty heavy for the glasses, I may relocate.
Anyway, I've run the program twice now. No serious hallucinations, but I did see some very nice colors and geometric patterns. Colors are predominantly red and blue, with some white and less definable colors.
The coolest part is when the program changes from one mode to another. The geometric pattern switches and becomes very distinct on the change, then gradually melds into a less-identifiable pattern.
Patterns include: circular vibration/ripple effect, infinite tube with checkerboard walls, infinite square tube, and giant X pulsing red and blue.
Each mode seems to consistently associate with one of those patterns for me (I think they're beta, alpha, theta, delta, in order).
What else have you guys seen?Posted by xand3r on October 23, 2007 at 07:43:12 Pacific Time
- Let us all Post our Experiences USING the glasses!
You must be logged in to reply.
Hi xand3r,
You're very welcome.
I'm not sure what you consider serious hallucinations, but if you were seeing infinite tubes I'd say you were hallucinating pretty nicely! :)
BTW, the sequence for the meditation in the firmware that I wrote can be seen in the table at the beginning of the file that you can download from the makezine website:
SLM Firmware
Feel free to check it out, change it, play with it, and trip out to your own sequences.
Best,
Mitch.
Posted by maltman23 on October 24, 2007 at 14:50:27 Pacific Time
- Let us all Post our Experiences USING the glasses!
You must be logged in to reply.
Just so everyone knows, MovieMaker posted to the Ladyada forum that the reason that he stopped experiencing the hallucination effects from his Brain Machine was that the felt he used on the nose-piece of the glasses (to make them more comfortable to wear) raised the LEDs so they no longer pointed at his eyes. (MovieMaker, please correct me if I'm wrong.)
Mitch.
Posted by maltman23 on August 18, 2007 at 06:54:53 Pacific Time
- Let us all Post our Experiences USING the glasses!
You must be logged in to reply.
That is correct. When I lowered the LEDs back down to the place were they were in front of my eyes, everything went back to normal and worked better.
P.S. I can't wait for you to come out with your multi-Wave model. Yeah!!!Posted by MovieMaker on August 18, 2007 at 14:38:22 Pacific Time
- A few BETTER mods
You must be logged in to reply.
I got mine built. I started building it the way it was in the article but I relized that the side of my glasses were to big. So I did some mods.
1. Took off the Board and battery pack from glasses.
2. Extended LED power cords so I could put device in my pocket.
3. I put pieces of shrink tubing on the big four-wire cable ( for LEDs) and the cables for the head phones (Permanent now instead of using different head phones).
4. I will put the board and battery pack inside a project box for the sake of making everything look pretty.
I did run into 30 mins worth of trouble because there was a short that I should have checked for first but instead 29 mins fiddle-fartin' with a damn resistor trying to figure out what was the issue. But everything is good now.
Im afraid to take this out in public, I may get arrested for suspected terrorism...Posted by dannydutton on August 08, 2007 at 17:44:30 Pacific Time
- A few BETTER mods
You must be logged in to reply.
I used HOT Glue on mine because I could not wait overnight to test the units.
Look forward to seeing your pix. I want to make more units and improve mine also. (Not that mitch's design was bad.) It is just the Gemini in me.
:-)Posted by MovieMaker on August 09, 2007 at 06:23:42 Pacific Time
- A few BETTER mods
You must be logged in to reply.
I used HOT Glue on mine because I could not wait overnight to test the units.
Look forward to seeing your pix. I want to make more units and improve mine also. (Not that mitch's design was bad.) It is just the Gemini in me.
:-)Posted by MovieMaker on August 09, 2007 at 06:23:38 Pacific Time
- A few BETTER mods
You must be logged in to reply.
I'll post some pics tomarrow of mine.Posted by dannydutton on August 08, 2007 at 17:46:00 Pacific Time
- Glue
You must be logged in to reply.
Is it possible to use hot glue instead of the Silicone Glue you said to use in the article? Because I got everything working and I not sure.
Did anyone else get a piece of double-side foam tape in thier kit? Can i use that instead?Posted by dannydutton on August 08, 2007 at 06:34:42 Pacific Time
- Finally got things a goin'
You must be logged in to reply.
Well, I ditched the stupid RadioShack Usb2Serial cable (Expensive!), and finally programmed the chip.
I understand now, from reading your other posts that the capacitors are for making the squarewave smooth into a sign wave for easier listening.
My only concern now is the unit was supposed to be programmed for about 14 minutes and my wife guessed it at about 10 minutes. I have to get a stop watch on that.
I had only one session so far, I had all kinds of colors and stuff. I did not see any shapes yet. But, it was relaxing and enjoyable.
I salute you, Mitch for a Job Well Done!
:-)Posted by MovieMaker on August 05, 2007 at 20:46:34 Pacific Time
- Finally got things a goin'
You must be logged in to reply.
Hey,
Sorry for the delay in responding to you -- I have been traveling, on my way to an outdoor hackers conference near Berlin (Chaos Communications Camp),
http://events.ccc.de
where I'll be giving a presentation, and a workshop on the Brain Machine. It should be way fun!
I'm glad you go your Machine going!
You can use the 1uF caps with leads on either end (these are called "axial"): install them verically, with the bottom lead in the pad below it on the PCB, and with the top lead bent down, along the side of the cap, and into the other pad. Make sense?
Most people see lots of colors besides red! Even though your eyes are only seeing blinking red lights, your brain is telling you that you are seeing colors and patterns like crazy. This is what your brain can do. :) Cool, yes?
Don't worry about the exact length of time of the sequence. Now that you know how to program the Brain Machine, you can make the sequence longer or shorter to suit your desires.
Enjoy,
Mitch.
Posted by maltman23 on August 06, 2007 at 04:48:24 Pacific Time
- Programming?
You must be logged in to reply.
In he magazine, you tell us to change the array in mypov.c by adding 1's on the first six lines (blue box on the side). WHen you say "pattern", do I just do the first six lines:
B8(10000000)
B8(01000000)
B8(00100000)
B8(00010000)
B8(00100000)
B8(01000000)
B8(00000000)
B8(00000000)
B8(00000000)
Or do I continue them something like this:
B8(10000000)
B8(01000000)
B8(00100000)
B8(00010000)
B8(00100000)
B8(01000000)
B8(10000000)
B8(01000000)
B8(00100000)
Can you please help me? Everything else is very well explained but this (or maybe its obvious and Im just an idiot...).Posted by dannydutton on August 05, 2007 at 05:07:17 Pacific Time
- Programming?
You must be logged in to reply.
To test the "VVVVV" pattern, you need to wave the POV very fast back and forth, otherwise they blink so rapidly that they all loklike they are just continually on. It took me a long time to get that; I downloaded the software twice and felt like an idiot after having reprogrammed the chip numerous times to no avail.
Good luck!Posted by chennate on August 06, 2007 at 16:10:03 Pacific Time
- Programming?
You must be logged in to reply.
Someone correct me if I am wrong, but that image array is just to test if your POV is working properly, it doesn't matter what you put into the file at all, just so long as you know the device is working before you proceed.Posted by chennate on August 05, 2007 at 13:06:05 Pacific Time
- Programming?
You must be logged in to reply.
You are correct. The V pattern is a test to be sure that your MiniPOV is working correctly, and to see that you have the free software dowloaded and installed correctly, to be sure that you can program the microcontroller well.
The pattern that I recommended in the article is one that is eaily recognizable, so that is a good one to use. It is one occurance of a "V", that takes up the 4 LEDs that you installed on the PCB. If things are working well, then you will see VVVVVV when you wave your MiniPOV back and forth.
To do this, replace the image table with the following:
const static int image[] = {
B8(10000000),
B8(01000000),
B8(00100000),
B8(00010000),
B8(00100000),
B8(01000000)
};
It's cool that you were able to find the parts at Digikey. Mouser, Jameco, and Digikey are my 3 favorite places for parts.
Mitch.
Posted by maltman23 on August 06, 2007 at 05:01:33 Pacific Time
- Mitch, Help with capacitors,Please!
You must be logged in to reply.
Hi Mitch,
I thought I was going to have to wait two or three weeks before I got my POV3. It was going to KILL me, but guess what??? The next day, it arrived in the mail. That day was today. I had previously purchased two 1uf caps. But, they were way to big to put on the unit because they had leads in oposite directions. Anyway I did find two 470 caps. A little small ,but I installed them. Now my lights are blink in sequence and it sounds a little like a heart beat through the headsets. I haven't programmed anything yet. My question is: should I just remove those caps from the circuit all together? and is it normal for that sound to be so low (barely audible? A prompt reply would be apreciated because I am fixing to seal everything in place.
Thanks for your help in the past. and Thanks in Advance for this.
:-)Posted by MovieMaker on August 04, 2007 at 18:53:06 Pacific Time
- Mitch, Help with capacitors,Please!
You must be logged in to reply.
Oh, I forgot to mention that the unit is pulsing going from one LED to another about once a second with no programming. Is this normal? It will be Sunday P.M. before I have time to work on it again. I am please so far. God Bless You for comming up with stuff like this and sharing with everyday people. It was enjoyable to work with the kit.
Posted by MovieMaker on August 04, 2007 at 19:49:31 Pacific Time
- Mitch, Help with capacitors,Please!
You must be logged in to reply.
I finally took both caps out of the circuit. My only concern is that the audio is really low. But, maybe after I program it , it will be fine. I have it all sealed and stuff. It looks neat!Posted by MovieMaker on August 04, 2007 at 19:46:40 Pacific Time
- Mitch, Help with capacitors,Please!
You must be logged in to reply.
Sorry about the double post. I did not do this on purpose.
Posted by MovieMaker on August 04, 2007 at 18:55:12 Pacific Time
- Mitch, Help with capacitors,Please!
You must be logged in to reply.
Hi Mitch,
I thought I was going to have to wait two or three weeks before I got my POV3. It was going to KILL me, but guess what??? The next day, it arrived in the mail. That day was today. I had previously purchased two 1uf caps. But, they were way to big to put on the unit because they had leads in oposite directions. Anyway I did find two 470 caps. A little small ,but I installed them. Now my lights are blink in sequence and it sounds a little like a heart beat through the headsets. I haven't programmed anything yet. My question is: should I just remove those caps from the circuit all together? and is it normal for that sound to be so low (barely audible? A prompt reply would be apreciated because I am fixing to seal everything in place.
Thanks for your help in the past. and Thanks in Advance for this.
:-)Posted by MovieMaker on August 04, 2007 at 18:53:04 Pacific Time
- Side LEDs?
You must be logged in to reply.
What do the LEDs on the side of the glasses exactly do? Do they light up as well or are the just a waste of solder and time?Posted by dannydutton on August 02, 2007 at 19:01:25 Pacific Time
- Side LEDs?
You must be logged in to reply.
The 4 LEDs on the PCB are for testing and debugging. When you first solder the parts to the PC Board, how do you know that the thing works?
With these 4 LEDs soldered in, when you turn on the power for the first time, if you soldered in everything correctly, the 4 LEDs will light up with half of the programmed image in the MiniPOV. Then you can program in a VVVVV image into the microcontroller to see that the programming circuitry on the PCB works well, and to see that you can successfully use the software tools that you downloaded.
If you are experienced at building microcontroller projects, and feel confident, then go ahead and leave the 4 LEDs out. Experienced as I am, I found it useful to use them when I first hacked the MiniPOV into a Brain Machine, 'cause I like testing things after each step as I go along.
Mitch.
Posted by maltman23 on August 02, 2007 at 19:49:52 Pacific Time
- What voltage is VCC ???
You must be logged in to reply.
I have looked hi and lo and do not see the kind of voltage. I am assumming either 3,6, or 9. But it would be nice to know in order to make the battery holder.
:-)Posted by MovieMaker on August 01, 2007 at 17:23:56 Pacific Time
- What voltage is VCC ???
You must be logged in to reply.
The MiniPOV kit comes with a battery holder that fits two AA batteries. The Vcc is 3 volts.
Mitch.
Posted by maltman23 on August 01, 2007 at 19:07:04 Pacific Time
- What voltage is VCC ???
You must be logged in to reply.
Thanks! :-)Posted by MovieMaker on August 01, 2007 at 19:24:35 Pacific Time
- Using 24 guage Kynar wire?
You must be logged in to reply.
So, my local Radio Shack only has 24 guage and lower Kynar (wire wrap) wire. Can I use this or does it have to be 30 guage? I'd order over the internet but unforunately I need it tomorrow.Posted by aenikolopov on August 01, 2007 at 12:35:15 Pacific Time
- Using 24 guage Kynar wire?
You must be logged in to reply.
You can use any wire you like -- it won't make any difference in the operation. Please do a search for "wire" on this page, and you'll see some comments about using different kinds of wires.
Best of luck with the project!
Mitch.
Posted by maltman23 on August 01, 2007 at 13:20:42 Pacific Time
- How to change unit for Lucid Dreaming
You must be logged in to reply.
Hi Mitch,
Your unit looks Fantastic. I would like to build one. But, my need is to LUCID DREAM. It is almost the same technology. What resistors, capacitors, diodes, etc. do I have to change in order to do this? Or do I justl have to change to C program? Any help would be apreciated.
yhmmc@yahoo.com is my email address.
Posted by MovieMaker on August 01, 2007 at 08:15:41 Pacific Time
- How to change unit for Lucid Dreaming
You must be logged in to reply.
Thanks Mitch, for the Fast Reply. I am a Technician But I have never worked with this type of stuff. I expect it will be a lot of fun. I wanted to work with project IMPScope from heathkit. But, when I ordered the scope, it was discontinued. (OOps, I gave my age away)Posted by MovieMaker on August 01, 2007 at 14:49:58 Pacific Time
- How to change unit for Lucid Dreaming
You must be logged in to reply.
To use the Brain Machine to help with lucid dreaming, there is no need to change the hardware at all! You'll probably want to change the firmware to start making some sound and light after a few hours, when you think you'll be dreaming, so it can give you a reminder to do something in your dream. Please do a search on this page for "dream" and you will see another person's firmware modifications for lucid dreaming.
Happy dreaming!
Mitch.
Posted by maltman23 on August 01, 2007 at 13:23:52 Pacific Time
- Changed the program
You must be logged in to reply.
Hi,
I changed the program to make smooth linear transitions between the frequencies.
BrainwaveElement:
struct brainwaveElement {
char bwType; // 'a' for Alpha, 'b' for Beta, 't' for Theta, or 'd' for Delta ('0' signifies last entry in table
unsigned long int bwDuration; // Duration of this Brainwave Type (divide by 10,000 to get seconds)
} const brainwaveTab[] PROGMEM = {
{ 'b', 600000 },
{ 'z', 800000 },
{ 'a', 600000 },
{ 'r', 800000 },
{ 't', 300000 },
{ 'm', 900000 },
{ 'd', 100000 },
{ 'n', 900000 },
{ 't', 300000 },
{ 's', 800000 },
{ 'a', 600000 },
{ 'x', 800000 },
{ 'b', 600000 },
{ '0', 0 }
};
Add this procedure after the blink_LEDs procedure:
/*
Function to slowly decrease or increase frequency over a period of time
*/
void linearSlope(unsigned long int duration, unsigned long int startAudio, unsigned long int endAudio, unsigned long int startLed, unsigned long int endLed) {
unsigned long int countDown=duration;
unsigned long int audioFrequency=startAudio;
unsigned long int ledPeriod=startLed;
while (countDown>0)
{
OCR1A=audioFrequency;
PORTB |= 0b00000011; // turn on LEDs at PB0, PB1
delay_one_tenth_ms(ledPeriod); // for onTime
PORTB &= 0b11111100; // turn off LEDs at PB0, PB1
delay_one_tenth_ms(ledPeriod); // for offTime
//recalculate values
if (countDown<2*ledPeriod)
{
countDown=0;
break;
}
else
{
countDown-=2*ledPeriod;
}
if (endAudio>startAudio)
{
audioFrequency=((duration-countDown)*(endAudio-startAudio))/duration+startAudio;
ledPeriod=((duration-countDown)*(endLed-startLed))/duration+startLed;
}
else
{
audioFrequency=startAudio-((duration-countDown)*(startAudio-endAudio))/duration;
ledPeriod=startLed-((duration-countDown)*(startLed-endLed))/duration;
}
}
}
After void do_brainwave_element(int index) {
char brainChr = pgm_read_byte(&brainwaveTab[index].bwType);
Add this
if (brainChr == 'z') //b->a
{
linearSlope( pgm_read_dword(&brainwaveTab[index].bwDuration),9637,9714,347,450);
}
if (brainChr == 'x') //a->b
{
linearSlope( pgm_read_dword(&brainwaveTab[index].bwDuration),9714,9637,450,347);
}
if (brainChr == 'r') //a->t
{
linearSlope( pgm_read_dword(&brainwaveTab[index].bwDuration),9714,9836,450,835);
}
if (brainChr == 's') //t->a
{
linearSlope( pgm_read_dword(&brainwaveTab[index].bwDuration),9836,9714,835,450);
}
if (brainChr == 'm') //t->d
{
linearSlope( pgm_read_dword(&brainwaveTab[index].bwDuration),9836,9928,835,2253);
}
if (brainChr == 'n') //d->t
{
linearSlope( pgm_read_dword(&brainwaveTab[index].bwDuration),9928,9836,2253,835);
}
Enjoy
Posted by Bleupomme on July 29, 2007 at 12:23:54 Pacific Time
- Changed the program
You must be logged in to reply.
Nice mod! Thanks for posting it, Bleupomme.
Have you had a chance to play around with it using your glissando for the frequency changes? What differences do you perceive? Do you find it more effective?
Well over 1000 people have now tried my personal Brain Machine (the one that I built to write the MAKE article), and one common comment I get from people is that they really like the quick transition from Beta to Alpha waves that happens after the first 60 seconds (they don't really know that's what actually happens, but it's at the 60-second mark that they comment about). Most people hallucinate beautiful patterns within just a few seconds, but when that first switch from Beta to Alpha happens, most peoples' hallucinations really take off.
Does that happen with the smooth transition from Beta to Alpha, as well?
I'll try out your code and see how it works for me.
Thanks again!
Mitch.
Posted by maltman23 on July 29, 2007 at 16:07:48 Pacific Time
- Changed the program
You must be logged in to reply.
I think I have to play with the brainwaveTab[] a little more. The theta and delta stages are too long I think, too much delta is a bit disturbing.
I have to say I had a lot of fun with the brain machine, but I don't really know if it works for me as a therapeutic device :) .
This mod I made was a quick hack, sorry I did not add more comments. If I have time I will rewrite it to permit also different frequencies.Posted by Bleupomme on July 30, 2007 at 00:40:47 Pacific Time
- LED's
You must be logged in to reply.
What effect (if any) would there be if you used a different color LED (say blue).Posted by KimoK on July 29, 2007 at 03:50:15 Pacific Time
- LED's
You must be logged in to reply.
You can use other colors for the LEDs. I encourage you to play around. Experiment -- see what happens!
Please search on this page for the word "blue" and you'll see some comments I made earlier on the subject. Also, do a search for the word "color" on this page to see more comments.
Mitch.
Posted by maltman23 on July 29, 2007 at 15:57:39 Pacific Time
- LED's
You must be logged in to reply.
I made my unit with red leds because I heard they would penetrate the eye lids better. But, the funning thing is, they started off red , then went to green and then a bright white and also an absolutely beautiful shade of blue.
I don't think it matters what color they are, you are going to see lots of color changes.
:-)Posted by MovieMaker on August 05, 2007 at 20:53:23 Pacific Time
- Mouser out of phone jacks
You must be logged in to reply.
Looking up the phone jack at Mouser, part #161-3402 shows that 161-3402 is listed as obsolete (ie, unavailable), though it is the 7.79mm jack, not the 3.5mm listed in the article. #161-3402-E is the 3.5mm version, but it is listed as out of stock until mid August. My question is - where could I find a replacement for this? Can I just rip out any old 3.5mm headphone jack off an old walkman or somesuch, or can I potentially get this through RS?Posted by aenikolopov on July 27, 2007 at 17:21:44 Pacific Time
- Mouser out of phone jacks
You must be logged in to reply.
You can use any stereo headphone jack that fits your headphones.
Here is another choice from Mouer that is currently in stock:
Mouser part # 161-3153-E
The reason the part I chose is now obsolete is because I inadvertantly chose a part that is non-RoHS compliant part. Europe now requires that all electronics have no heavy metals in them, such as lead, and the entire industry is conforming, which is a good thing, but the older parts with lead are now obsolete. Sorry about that.
Like I said, you can use any stereo headphone jack that fits your headphones. They sell them at Radio Shack, Jameco, Digikey, Mouser, and many other places.
Mitch.
Posted by maltman23 on July 28, 2007 at 12:49:37 Pacific Time
- Mouser out of phone jacks
You must be logged in to reply.
I found the exact parts on Digi-Key and the headphone jack also.Posted by dannydutton on August 05, 2007 at 06:19:19 Pacific Time
|
Showing messages 1 through 250 of 423. Next Page |
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.
Explore More in Make Magazine
Search the pages of MAKE
Raves for MAKE!
“Now we've got geek DIY (do it yourself) porn. Just as would-be Emerils pore over lushly illustrated cookbooks with recipes involving hard-to-find morels and complicated instructions for roux, Tom Swift wanna-bes are devouring MAKE.”
— Steven Levy, Newsweek
“...O'Reilly Media recently launched what has already become the bible of this new movement, a magazine called MAKE.”
— Daniel Roth, FORTUNE
“If you're the type who views the warnings not to pry open your computer as more a challenge than admonition, MAKE is for you.”
— Rolling Stone
“One of the most innovative magazines I've seen in a long time.”
— Steve Riggio, CEO Barnes & Noble
“The kind of magazine that would impress MacGyver”
— Marcus Chan, San Francisco Chronicle






