
Vol. 10: The Brain Machine
Get altered states of consciousness with this microcontroller-driven sound and light device.
+ Downloads & Extras:
Brain Machine Online
Click to download
Weekend Projects Video from the MAKE:Blog
+ LINKS
Brain Machine Kit in the Maker Shed Store
MAKE:Blog Video Podcast
See an interview with Mitch Altman and watch Bre Pettis make and use a Brain Machine.
AVR Freaks
Monroe Institute
The Anna Wise Center
MiniPOV3
Mouser Electronics
POV Kit
» MAKE: NOISE — Discuss this article
You must be logged in to post a talkback.[ Display main threads only] [ Oldest First]
Showing messages 251 through 500 of 572.
Previous Page
Next Page ![]()
- 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
- 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
- help on programming the slr
You must be logged in to reply.
hello
I am trying to program the slr, and I cannot get the slr.hex to be created. I get this message, can anyone help me?
irongus
C:\My Documents\slm>make slm.hex
Compiling: slm.c
avr-gcc -c -I. -g -Os -funsigned-char -funsigned-bitfields -f
pack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-ad
hlns=slm.lst -mmcu=attiny2313 -std=gnu99 slm.c -o slm.o
avr-gcc: _spawnv: No such file or directory
MAKE.EXE: *** [slm.o] Error 1
Posted by irongus on July 24, 2007 at 16:06:00 Pacific Time
- help on programming the slr
You must be logged in to reply.
Hi irongus,
Did you follow all of the instructions for installing WinAVR on Ladyada's website? If you are using the latest version of WinAVR you will need to copy a DLL file manually (because of a known bug in the latest WinAVR installer). Very easy to follow instructions are given on Ladyada's site:
http://ladyada.net/make/minipov3/software.html
You'll be following the instructions for Windows.
Also, before programming the SLM code, please try to change the MiniPOV firmware to display VVVV, as instructed in the article. It will be easier to debug if we go one step at a time. Successfully completing this step is important, since it tells you that your hardware is built correctly.
I hope this gets you going.
Mitch.
Posted by maltman23 on July 24, 2007 at 17:01:54 Pacific Time
- help on programming the slr
You must be logged in to reply.
thanks. but i found that if i used the previous version of the programing software for the chip, i had no problems. it is a great machine.Posted by irongus on August 07, 2007 at 11:15:17 Pacific Time
- help on programming the slr
You must be logged in to reply.
thanks. I tried using the newest programming software and could not get it to work, but when i installed the older version, one version back from the lastest version, i was able to program it with the instructions from the magazine. I suspect there might be a bug in the latest version of the programming software, where you should have the previous version installed before you install the latest one. As it is, i got the machine programmed and it is working great, though my kids think i look like a borg when i am wearing them. thanks for your help.
irongusPosted by irongus on August 07, 2007 at 10:50:12 Pacific Time
- help on programming the slr
You must be logged in to reply.
sorry, i meant slm, i have been thinking alot about cameras today.
Posted by irongus on July 24, 2007 at 16:30:29 Pacific Time
- delay sequence
You must be logged in to reply.
I got it working! now I want to program so there is a five hour delay and then begins to stimulate beta waves (put it on before you go to sleep so it kicks in right in the middle of REM phase of sleep). How do I program a new sequence where the leds remain off? I tried but I can only make a delay which the leds remain on.
heres what I put into the slm.c folder:
else if (brainChr == 'n') {
// PORTB &= 0b00001100; // (for debugging purposes only -- commented out for SLM)
// PORTB |= 0b00010000;
// Nothing
// 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 = 9928; // T1 generates 0.0Hz, for a binaural beat of 0.0Hz
// delay for the time specified in the table while blinking the LEDs at the correct rate
// onTime = 0.0ms, offTime = 0.0ms --> 0.0Hz
blink_LEDs( pgm_read_dword(&brainwaveTab[index].bwDuration), 0, 0 );
return; // Nothing
}Posted by chennate on July 21, 2007 at 19:50:02 Pacific Time
- delay sequence
You must be logged in to reply.
Hi chennate,
Cool idea! So, you want to have is a fake kind of brainwave type called "n". That should work just fine.
All you have to do in the "n" section is wait the specified length of time:
else if (brainChr == 'n') {
delay_one_tenth_ms(pgm_read_dword(&brainwaveTab[index].bwDuration));
return; // Null (simply delay)
}
That should get you lucid dreaming in no time. :)
The reason the LEDs were on the way you had it coded is because the blink_LEDs function was blinking the LEDs (even though you gave it 0 as the delay times, it was turning the LEDs on and off at a very fast pace, still making them both light up).
Mitch.
Posted by maltman23 on July 21, 2007 at 21:04:02 Pacific Time
- delay sequence
You must be logged in to reply.
sorry about the 3x reply.Posted by chennate on July 22, 2007 at 18:43:11 Pacific Time
- delay sequence
You must be logged in to reply.
It works! Thanks for the great project and excellent help.Posted by chennate on July 22, 2007 at 10:22:42 Pacific Time
- delay sequence
You must be logged in to reply.
That was exactly the solution! Works perfectly now. Thanks for the excellent project and great advice.Posted by chennate on July 22, 2007 at 10:20:50 Pacific Time
- delay sequence
You must be logged in to reply.
That was exactly the solution! Works perfectly now. Thanks for the excellent project and great advice.Posted by chennate on July 22, 2007 at 10:20:29 Pacific Time
- RE: SLM for sleep
You must be logged in to reply.
@ Robert (PCSA)
Regarding your difficulty in getting the compiled program to write to the chip...
You have to modify the Makefile. Open it with a text editor, and a few lines down you should see
# Default target.
all: begin gccversion \
minipov.hex all_leds.hex alt_leds.hex mypov.hex test_leds.hex \
largeimage.hex slm.hex lowslm.hex\
finished end
# Program the device w/various programs
program-minipov: minipov.hex
program-all_leds: all_leds.hex
program-test_leds: test_leds.hex
program-alt_leds: alt_leds.hex
program-mypov: mypov.hex
program-test_sensor: test_sensor.hex
program-largeimage: largeimage.hex
program-makefair: makefair.hex
program-slm: slm.hex
program-lowslm: lowslm.hex
You have to add your program names in these two places, I believe. For example, I wrote a program called lowslm.c to lower the audio frequencies by an octave, so I had to let the Makefile know to look for it.
Hope this helps!Posted by tenax8 on July 20, 2007 at 13:10:57 Pacific Time
- RE: SLM for sleep
You must be logged in to reply.
Thanks tenax8!
It works like a charm now. I really appreciate the help.
RobertPosted by PCSA on July 24, 2007 at 07:47:15 Pacific Time
- RE: SLM for sleep
You must be logged in to reply.
Thanks tenax8!
It works like a charm now. I really appreciate the help.
RobertPosted by PCSA on July 24, 2007 at 07:45:46 Pacific Time
- RE: SLM for sleep
You must be logged in to reply.
Thanks tenax8!
It works like a charm now. I really appreciate the help.
RobertPosted by PCSA on July 24, 2007 at 07:45:28 Pacific Time
- SLM for sleep!
You must be logged in to reply.
Hi Mitch,
First off, thank you so much for this great project. Im hoping to put your inventiveness to good use for some friends and I, but I was hoping you could help me.
Id done some research on sleep patterns in the past and learned that our sleep cycles proceed in phases (essentially from alpha waves, to theta, to delta, back to theta, then beta for REM and the cycle repeats starting with the first theta portion.) I also remembered reading that even when we take a fifteen minute power nap, our brain spends a little bit of time in each phase (even though a typical sleep cycle lasts approximately ninety minutes.)
In short, I was hoping to use the SLM to reproduce our natural sleep cycles in a much shorter timeframe and run experiments on a short and long-term basis. Imagine getting in several sleep cycles in the amount of time it would normally take to get through one!
I began by altering your code as seen below. This is the only portion of the code I changed (although ultimately Ill need to alter the frequencies to take into account spindles and k-complexes.)
} const brainwaveTab[] PROGMEM = {
{ 'a', 2700000 },
{ 't', 2700000 },
{ 'd', 1575000 },
{ 't', 2700000 },
{ 'b', 1575000 },
{ 't', 2700000 },
{ 'd', 1575000 },
{ 't', 2700000 },
{ 'b', 1575000 },
{ 't', 600000 },
{ '0', 0 }
};
Now, Ive saved this c-file as hsleep1 and when I run make hsleep1.hex there doesnt appear to be a problem. However, things get crazy when I try to run make program-hsleep1.
********************************
C:\slm>make program-hsleep1
avrdude p attiny2313 -: com1 -c dasa U flash:w:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.59s
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 // I think is where it crashes
avrdude: error opening : No such file or directory
avrdude: input file auto detected as invalid format
avrdude: cant open input file : No such file or directory
avrdude: write to file failed
avrdude: safemode: Fuses OK
avrdude done. Thank you.
make: *** [program-hsleep1] Error 1
******************************
If anyone out there could give me some ideas on how to correct whatevers going on, Id greatly appreciate it. Thanks again Mitch for the awesome project.
Robert
Posted by PCSA on July 19, 2007 at 13:54:54 Pacific Time
- SLM for sleep!
You must be logged in to reply.
Hi Robert,
This technology can certainly be used to create a sleep sequence. Me and lots of friends and acquaintances have been volunteering to be guinea pigs for my sleep sequences on the more complex version of the Brain Machine I'm working on. I've been focusing on getting people to sleep, or back to sleep (after waking up, and then having trouble going back to sleep). For these two sequences, I only bring people to the beginning of a deep sleep cycle, and then let their brain do the rest. But it should be possible to create a good sequence for a "power nap."
For the short sequence that you gave as an example, I would recommend adding about a minute of Beta before getting into lower brainwave frequencies. One rule that is good to follow is that you want to start the brainwave frequencies at the state where the user is at, and then guide them to where they want to go.
Your firmware will compile and program well if you rename it "slm.c" instead of "hsleep1.c" If you really want to rename the file, you'll need to add a line to the makefile (that came zipped up with the "slm.c" file). Open the makefile with a text editor and look for the line that says:
program-slm: slm.hex
Underneath that line add the following:
program-hsleep1: hsleep1.hex
and save it. Then you should be able to program fine by typing into the Command Prompt window:
make program-hsleep1
Please let me know how that works for you. And let me know how the Power Nap sequence works.
Mitch.
Posted by maltman23 on July 20, 2007 at 12:24:53 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
I just finished my first try at the machine. What a great project!
My soldering experience is very limited (and comes from the era of "the bigger the blob, the better the job"), so I was pretty nervous about soldering such fine connections. But, I guess I got pretty lucky because it worked the very first try with no problems at all.
I did make a few design choices that made it come out looking pretty nice. For one, I chose a project enclosure so that I wouldn't have a circuit board stuck to the side of my glasses. The enclosure helps a lot: I drilled a 1/4" hole where I was able to properly mount the headset jack, and I cut another tiny hole for the LED and battery pack wires to come through and used some of the silicone on the inside for strain relief. A square hole cut into the front allows the 9-pin connector to come out just far enough to allow a cable connection. (I did make the mistake of choosing an enclosure that wasn't tall enough to accomodate the capacitors that I'd already soldered onto the board, so I had to drill a couple holes in the top where they stick out a tiny bit (almost flush with the top surface). Next time, I'll try to find smaller capacitors or I'll mount them horizontally.
Next, insteadof using sunglasses, I used a pair of safety glasses - the kind you're supposed to use when around power tools. This has a couple good benefits: The plastic is thicker, so the LED's mount much more securely. A 13/64" drill bit made holes that the LEDs practically snap into, so no glue was needed on the outside. Another benefit to the safety glasses is that they have a lot of clearance on the inside - so I drilled a tiny hole at the top of the frame abve each LED and routed the wires inside. I drilled another into the sides where the arms meet the face of the glasses, and used that for routing all the wires. The result is that there are very few visible wires so it looks very pro.
I mounted the enclosure on one side and the battery pack on the other (with the switch pointing inward so that the batteries can be changed without removing the pack. I used the silicon to mount the enclosure and battery pack to the glasses (another benefit to using safety glasses: The sides are huge and have lots of gluing surface).
One question: Where would I connect a potentiometer to provide a volume control without dimming the lights? The enclosure has enough room to mount a little knob, and I think that would be a great feature so that volume-controlled headphones become unnecessary.
If you can't tell already, I had a blast with this project. I plan on making several of them. I'd REALLY love to be able to have five or six different programs selectable by a switch, but I'm thinking that would require three chips and lots more wiring. I might instead just make a collection of different machines, each dedicated to a single program. (1. The current meditation, 2.get to sleep, 3.increase alertness, 4.relax, 5.stimulate lucid dreaming.)
Thanks for such a great project!
WaynePosted by WayneZ on July 18, 2007 at 19:48:36 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Your mods look really nice but as I was looking at it, it reminded me of some sort of mp3 player. So I thought, If you extended a lot of the wires so that the project box and the battery pack went down to your pocket, used small ear buds that would sit on the glasses (think Oakley "Thump"), wraped the wires up with the headphone wires, and shrink tubed the major cable at different intervals. This would look so awesome, I think I may do this to mine so that I don't have to wear heavy glasses buy light weight glasses with one wire that would contain the headphone wires and the two LED's power lines.Posted by dannydutton on August 02, 2007 at 18:59:49 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Hi Wayne,
Thanks for the fine suggestions on making you SLM look more pro. Would you be able to take some photos and put them online, and reply with links so that we can all see what you did?
Lots of people who have never soldered at all have built this project, so it's not surprising to me that you were able to make yours work first time, given your past soldering experience (even if it is big-blob). All the same, it feels nice when it works first time, doesn't it?
Regarding adding volume controls:
Do a search on this webpage for "potentiometer" -- and you'll find your answer. You can either use one double-pot, or, since you have plenty of room, use one regular pot on each side of your glasses.
If you are comfortable playing with firmware, why not go ahead and put multiple sequences in one SLM? You'll need to add switches, and program the micro to look at the switches, and play a different brainwaveTab (or, a different part of one brainwaveTab) depending on how the switch reads out. And if you're not feeling all that comfortable changing the firmware, this would be a wonderful project to start becoming comfortable.
Please let me know how it goes.0
Mitch.
Posted by maltman23 on July 19, 2007 at 00:41:08 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Your mods look really nice but as I was looking at it, it reminded me of some sort of mp3 player. So I thought, If you extended a lot of the wires so that the project box and the battery pack went down to your pocket, used small ear buds that would sit on the glasses (think Oakley "Thump"), wraped the wires up with the headphone wires, and shrink tubed the major cable at different intervals. This would look so awesome, I think I may do this to mine so that I don't have to wear heavy glasses buy light weight glasses with one wire that would contain the headphone wires and the two LED's power lines.Posted by dannydutton on August 02, 2007 at 18:57:31 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Happy to! Here's a dozen or so pictures on Flickr: http://www.flickr.com/gp/9277058@N08/782Yjy
I've never done any assembly programming at all. I read the paragraph in the article about changing the frequencies, and that seems simple enough. Actually changing the functionality of the program and getting it to read a switch and act accordingly sounds WAY over my head. (I've been a programmer for years, but I've never touched anything the low level. I'm more of a PHP and Perl man.)
It would be cool to mount a four position DIP switch and use it to select up to 16 programs, but I wouldn't even know where to begin.
As for the pot, in the name of simplicity, could it be just a single pot on the ground wire from the jack - or is that too late in the circuit?
Posted by WayneZ on July 19, 2007 at 12:09:39 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Thanks for the photos! The pictures are a bit blurry, but they're good enough to see what you did. Your glasses look really nice!!
(Not all cameras can focus on objects closer than 2 or 3 feet.)
If you can do program in PHP and Pearl, then programming a micro to read a switch should be a fun challenge. :) It is a basic firmware task, and if you can get a micro to do that, then you can become a firmware geek! I'll just say enough here to get you going, if you're interested in trying it out:
Each pin of the micro can be programmed via the DDRB register to be input or output (in the "slm.c" file, you can see that I set all 8 PortB pins to outputs by setting all DDRB bits to 1). You'll want to set the corresponding bit of the DDRB register to 0 to make that bit an input. For example:
DDRD = 0b00001111;
makes pins 2, 3, 6, and 7 of the micro to be inputs (these are the pins for Port D pins 0, 1, 2, and 3, respectively).
To see if an input pin is High or Low, you just do a read of the port register. For example:
Foo = PORTD;
will get all 8 bits of Port D into the variable Foo.
Then mask out the bit you want. For example:
Foo = Foo & 0b0000001;
will zero out all bits of Foo except the lowest bit, bit 0, so if Foo is now equal to 0, PD0 was low when you read it, otherwise it was high.
The hardware is pretty simple:
Each switch has two contacts. Connect one to ground, and the other to one of the Port D pins of the micro. (The micro has built in pull-up resistors, so the pin is high is the switch is off, and the pin is low if the switch is on, connecting the pin to ground.)
As for the pot for the volume control:
using a single pot in the way you suggest should work fine; disconnect the ground wire from the headphone jack, and connect the pot between the ground contact on the headphone jack and ground. I'd suggest using an audio taper pot with a value of 1K or greater.
Mitch.
Posted by maltman23 on July 20, 2007 at 11:40:48 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Looking back on what I wrote here, see that I contradicted myself, which makes things very confusing. Sorry about that!
Here is the (unambiguously) correct way to set a PORTD pin as an input: set the corresponding bit of the DDRD register to 0 to make that bit in PORTD an input. For example:
DDRD = 0b11110000;
makes PD0, PD1, PD2, and PD3 inputs (that corresponds to pins 2, 3, 6, and 7 of the micro, respectively). (PORTB works the same way, but it uses DDRB to control the direction of its pins.)
To activate the micro's internal pullup resistor for a pin, set the corresponding pin in PORTD to a 1 (after setting up the pins as inputs with the DDRD register). For example, to activate the pullups for PD0, PD1, PD2, and PD3, do the following (after setting the DDRD register):
PORTD = 0b00001111
Mitch.
Posted by maltman23 on July 22, 2007 at 15:08:55 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Interesting...
So, as I look at the PCB with the completed project, I see that the four LEDs directly stuffed onto the board connect to pins 16, 17, 18, and 19 (PB4, PB5, PB6, and PB7, respectively), through resistors. And they seem to not be used for anything.
If I understand your directions, that means I could eliminate those four LEDs and those four resistors and put a four-position DIP switch unit there instead, giving me 16 possible switch combinations.
To set those pins as inputs I would issue:
DDRB = 0b11110000;
To read them I could do something like:
switch = PORTB;
switch1 = Foo & 0b0001000;
switch2 = Foo & 0b0010000;
switch3 = Foo & 0b0100000;
switch4 = Foo & 0b1000000;
Then, an if statement with 15 elses is all I would need to maintain 16 different brainwave tables.
Is this all correct? If so, I need to go get me a dip switch! :)
WPosted by WayneZ on July 20, 2007 at 15:52:46 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
You are very close.
Even though the 4 LEDs aren't being used, two of these pins are used for programming the micro. So, rather than use these 4 pins, why not use 4 pins from PortD, instead, none of which are used for anything?
When using the DDRD register, writing a 1 to a bit makes that pin an output, and writing a 0 to a bit makes it an input. If you use PD0, PD1, PD2, and PD3 (which are physically pins 2, 3, 6, and 7 on the chip), then you would write
DDRD = 0b11110000
to make them inputs. Then, to grab the info from the DIP switch:
switch = PORTD;
switch1 = switch & 0b0000001;
switch2 = switch & 0b0000010;
switch3 = switch & 0b0000100;
switch4 = switch & 0b0001000;
You can use a whole bunch of IF statements, but why not make use of the CASE statement? It will make your code easier to read if you do.
To find out more about the CASE statement (or any other aspect of C), you can do a search on google for
"c language tutorial case statement"
and you'll see some really good C tutorials. One I like is from the original authors of the C language, Brian Kernighan (along with Dennis Ritchie).
Go out and buy your dip switch, and have at it!
Mitch.
Posted by maltman23 on July 20, 2007 at 16:10:03 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Ah, of course. I didn't look at the traces on the PCB and made the silly assumption that all the pins on the chip went somewhere on the board. Now that I look at it, I can see my error.
And that's great news: It means I can actually add the switches to my existing circuit without changing anything else.
Radio Shack didn't have a four-position dip switch, so I ended up buying three mountable flip switches. (They only had three in an acceptable style.) Three gives me the number I really wanted in the first place anyway, and now it'll be easier to switch program parameters anyway.
I'll let you know how it goes.Posted by WayneZ on July 21, 2007 at 10:39:04 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
I've got my switches hooked up, and the program is compiling fine, but something is still not right.
Before adding the switches, the machine was rock-solid - it worked every time I turned it on. Now, sometimes it kind of works and sometimes it doens't work at all.
In order to be able to test the switches, I made four brainwave tables - each with just a single brainwave. One goes for four seconds and then turns off, one goes for eight, one goes for 15, and one goes for 30. (I decided to only use two switches for the tables and I'll use the third to select a higher or lower frequency set.)
The problem is that when I turn it on, it usually (2 out of 3 times) does nothing. The rest of the time, it runs for 4 seconds regardless of switch positions.
I've checked all the soldering and everything looks fine.
My main suspicion now is that a seemingly-logical shortcut that I took might be causing the problem. Rather than wire each of the three switches to ground individually, I ran a wire between all three of them and then connected the center one to ground. (Ground, in this case, was the ground terminal of LED1.) That should work, I think, but I thought I'd ask you about it since it seems the only likely culprit.
Any thoughts?
Posted by WayneZ on July 21, 2007 at 19:37:55 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
I should mention that I also reloaded the original slm program and tested, and it's still rock-solid there. This is definitely something going wrong with the switch-related changes.Posted by WayneZ on July 21, 2007 at 19:47:02 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
If it works well with the original code and with the DIP switches soldered in, then you definitely have a firmware problem. Strange that it behaves differently sometimes...
Hooking up the grounds as you described is no problem -- as long as one side of each switch goes to ground, we're fine with the grounds. Be sure you actually connected them to ground, though, and not to a pad with some other function. The ground for all of the LEDs are the pads on the edge of the PCB.
Debugging firmware is the fun part! Here is one approach. Since you know that things work with the original SLM firmware, start with that. Then add a little bit of new code at a time, compiling and programming each time. For instance, start out by adding only one line of firmware (to the main function, just under the 3rd line of initialization):
DDRD = 0b00000000;
(Let's keep all of the pins as inputs.)
Then compile and program the chip, and see if it works. The addition of this line should have no effect on the SLM.
If that was successful, then, add code to read two switches (just under the initialization lines in the main function):
switch = PORTD;
switch1 = switch & 0b0000001;
switch2 = switch & 0b0000010;
Compile and program and make sure it still works. Hopefully there is still no effect on the SLM.
Now let's add some debugging code to see if we're really reading the switches! Add the following code to the main function (just under your last lines of added code):
if (switch1) PORTB |= 0b00010000; // turn on LED at PB4
else PORTB &= 0b11101111; // turn off LED at PB4
if (switch2) PORTB |= 0b00100000; // turn on LED at PB5
else PORTB &= 0b11011111; // turn off LED at PB5
And comment out the rest of the main code (by putting
/*
just under the line of code you just added, and putting
*/
just before the last section of code in main (i.e., just above the line that says "Shut down everything..."
Now compile and program the micro with the above changes. With the power off, set the switches to both off, and when you turn the power on, all of the LEDs that are on the PCBs should remain off.
Turn off the power, and turn on switch1, and when you turn on the power, the LED closest to the serial port connector should light up.
Repeat the above, but with both switch1 and switch2 turned on, and when you turn on the power you should see two LEDs light up. Cool, eh?
So, now you're reading switches.
Now add one other brainwave sequence to the code, but leave the code as above, otherwise. Can you still read the switches? If so, add the other 3 brainwave sequences, one at a time, compiling and programming the micro each time. If you're able to read the switches each time you power up, then you're now set to do a different sequence depending on the settings of your switches.
If the code broke at any one of the above steps, now you know which part of your code is making things mess up, and therefore, you know where to look to debug that part of code.
That's enough to get you going. Let me know how it goes...
Mitch.
Posted by maltman23 on July 21, 2007 at 20:42:40 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Mitch, I really appreciate the amazing support you're providing here and I hope I'm not being too much of a pest.
It just doesn't seem able to read the switches. I did as you suggested and started over with the original file. Once I added the code to turn the LEDs on or off by switch position it just doesn't work. (I commented out the rest of the main program.)
When I first added the code, it complained about the variables not being declared. So I gave each of them an int type. Here's what I've added:
(After the first 3 lines of initialization)
DDRD = 0b00000000;
(After the rest of the initialization)
int swtch = PORTD;
int swtch1 = swtch & 0b0000001;
int swtch2 = swtch & 0b0000010;
if (swtch1) PORTB |= 0b00010000; // turn on LED at PB4
else PORTB &= 0b11101111; // turn off LED at PB4
if (swtch2) PORTB |= 0b00100000; // turn on LED at PB5
else PORTB &= 0b11011111; // turn off LED at PB5
The rest of main is commented out (other, of course, than the end '}' ).
Regardless of switch position, nothing lights up.
I took a continuity tester to the circuit and verified that the switches are working. I put the test leads on ground and right on each physical chip pin that has a switch. In each case the switch controlled continuity. So the circuit's gotta be good. Right?
I also noticed that the statements "int swtch1 = swtch & 0b0000001;" and "
int swtch2 = swtch & 0b0000010;" only had 7 digits after the 'b'. In case that was a typo, I tried using 0b00000001 and 0b00000010, but that didn't do anything either.
I feel like I'm so close on this, but I just can't quite figure it out.
Posted by WayneZ on July 21, 2007 at 22:23:46 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Hey Wayne,
You are close. But let's take this off line. Can you email me your email address? Please email your email address to:
info@TVBGone.com
and we can take it from there...
Mitch.
Posted by maltman23 on July 21, 2007 at 22:36:38 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
I'd really love to find out more about adding switches to make multiple SLM programs available in the firmware. Is there anyway you can continue this conversation on this board again?
Now to share a little bit:
I happen to be in neurofeedback therapy for my ADHD symptoms (doing very well after a few months) and I made this project because I figured either I can use this to help my brain or at least get "high."
So far, I've really enjoyed it. I've been using the meditation sequence for relaxation and modified the firmware to use lower tones (base frequency = 200.321) and linear transitions (search this page for "linearSlope").
After talking with my doctor, he spoke with his associates who are experts in the field of entrainment and he recommended that I entrain my Beta waves and told me to build a program using the following frequencies: 10 Hz, 15 Hz, 13 Hz. I made an Excel sheet to do the math and reprogrammed the firmware to run a 15-minute program--equal times at each of the three frequencies and the transitions between them.
Right now, I'm trying to work off this discussion so I can add a hardware switch and store my Beta training and meditation on the SLM at the same time.
I'd love to hear what you guys have figured out so far.
Thanks.Posted by zgoldberg on August 14, 2007 at 12:31:48 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Your doctor's advice goes along with what I've read about ADHD -- you need to avoid the lower frequencies, and focus on the higher frequencies. Please let us all know how it works (or not) for you by posting again.
Thanks,
Mitch.
Posted by maltman23 on August 17, 2007 at 15:10:52 Pacific Time
- Up and running - a few mods
You must be logged in to reply.
Please see up above, where I'll post some code that works for adding switches to the Brain Machine (the columns get too narrow to read code after these many responses on this blog).
Mitch.
Posted by maltman23 on August 17, 2007 at 15:08:42 Pacific Time
- SLM folder&programming
You must be logged in to reply.
Mitch,
I am still not getting something in step 1e.
I got the hardware to work the led's to light after changing the serial cable from a belkin to the one recommended from newegg.
I got the vvvvv to light but not from an slm directory,from ladaynet instructions. Now can't get to change to the slm programming.
Where does the slm folder go or what do I need to do?Posted by TVinU on July 18, 2007 at 04:58:41 Pacific Time
- SLM folder&programming
You must be logged in to reply.
Yesssssss.
Got it. ThanksPosted by TVinU on July 18, 2007 at 16:44:25 Pacific Time
- SLM folder&programming
You must be logged in to reply.
So, you got it working? Are you having fun hallucinating?
Mitch.
Posted by maltman23 on July 19, 2007 at 00:43:06 Pacific Time
- SLM folder&programming
You must be logged in to reply.
Yes got it working and lots of fun to use.
It was a really good project to make.
Can't wait to see what you have next!Posted by TVinU on July 19, 2007 at 09:41:48 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
Mitch,
I cannot tell you how much I love this project, I would like to add some sound in with the brainwaves, like rain falling.
I am fairly new to the whole microprocessor programming so if this is stupid i am sorry. I would like to have a small audio track loop like 3 seconds (or so) of rain falling to play with the brainwaves. Is this possible? I am not opposed to using a separate microcontroller and then adding in two small speakers in the headset that is connected to the SLM. So essentially I would like to have one playing a small rain loop and then the SLM doing its thing. any help or suggestions, or even telling me "that is not the right way to do that" would be great. Thanks for your time and response, in advance.
Posted by tehCaptin2 on July 16, 2007 at 09:09:46 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
Adding ambient sounds is a great idea! Thing is, though -- it isn't so easy to do (which is why I didn't add it with this project). But I will suggest a pretty easy way to add audio. Read on...
Brainwave frequencies aren't very musical, so it would be nice to mask the binaural beats with other more pleasing sounds. Rain or waves work really well for this since they consist mostly of pink noise, which is well known for being both pleasing and good for masking even very loud nasty noises (for example, pink noise is often used in noisy factories to make the environment better for employees).
Using a microcontroller to generate sound is done all of the time. Unfortunately, I don't have enough space here to talk about exactly how to do it. If you want to do some research, I'll just say enough to get you going. There are two main ways that you can go: One is to write firmware that actually calculates the pink noise using an equation. The other way is to have a short digital recording of a rainstorm (or waves) stored in memory, and have the micro repeat the short sequence repeatedly. Either way you'll need a Low Pass Filter at the output (somewhat similar to the simple one that the SLM uses, made with a capacitor and resistor, to smooth out the square waves into something more sinusoidal). The latter takes up more memory, but it is usually nicer, since straight pink noise is less interesting and less pleasing than rain or waves.
Rather than the above, more challenging approach, how about an easier alternative? You can use an MP3 player (or any kind of audio player) and mix the audio from it into each speaker. There is no need to add more speakers, since you can mix the sound directly into the existing headphones. To do this you will need to add a simple, passive audio mixer to the SLM, as well as another headphone jack that will go to the output of your audio player -- we'll call this "Audio In". The headphone jack has 3 pins (just like the headphone jack already on the SLM): 1 is ground, and the other two are the left and right audio (and for this project, it doesn't matter which is right and which is left). Connect the Audio In ground pin to the SLM circuit ground, and connect a 1K ohm resistor between one of the audio pins of the Audio In jack and one of the headphone jack audio pins. And connect another 1K ohm resistor between the other audio pin of the Audio In jack and the other headphone jack audio pin. That's it. Then you should hear whatever is played on your audio player mixed into the audio from the SLM.
Try experimenting with different audio, and see what helps you meditate better. If you try out different brainwave sequences (like a Wakeup sequence), you may find that mixing in different audio helps better (punk rock, or other dance music of choice, works great for this, though it's best to start with something soothing, and then slowly add in the more energetic music as the brainwaves go more towards Beta).
Enjoy,
Mitch.
Posted by maltman23 on July 16, 2007 at 14:48:31 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
Mitch,
Thank you that is exactly what i would like to do is add a few seconds of audio to a chip. I was thinking 2-3seconds of rain and 2seconds of thunder and then write a program to loop the rain track and randomly 1-3 times per 5min throw in the thunder track. Do you think that using the software in the link is the best way to record audio to a the Atmel Microcontroller. Also do you think it is possible to utilize the chip already being used in the SLM or would a new board have to be made then splice in the audio you described? I am sorry for all the questions I am just facinated by this and have been for many years and am so excited that you have created this amazing project for so many to enjoy.Posted by tehCaptin2 on July 16, 2007 at 18:07:43 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
The BTc software from Roman Black looks like a quick way to convert a short .WAV file on Windows into a form that can easily be played back in a micro. Since you're a beginner, I'd recommend doing the audio-player as a separate project (rather than combining it on the same micro as the SLM). You'll need a microcontroller, an external flash memory to store the audio info, and a resistor and capacitor for a Low Pass Filter. Then you'll need to write firmware to output the audio bits to an output pin at your sample rate. Once you have the audio going you can mix it into the SLM audio as I described earlier. This blog isn't an appropriate place to get into any more detail about the audio player project. But it is a fun project, and I hope what I've been able to get you a good start.
Mitch.
Posted by maltman23 on July 16, 2007 at 20:02:33 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
I have found software that aids in converting wav files to 1bit format so it can be stored and played on a pic or atmel, here it is incase anyone else is interested in this as i am.
http://www.romanblack.com/picsound.htmPosted by tehCaptin2 on July 16, 2007 at 14:45:15 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
Cool! You have been researching while I was typing my last response...
The link you gave is one way (a really good, simple way) of having a micro play back a sound recorded in memory. You can do this with a separate micro, or you can have the same micro do both the SLM and the added audio. Doing SLM and audio at once is trickier for a beginner (I haven't used the new Propeller chip, by parallax, yet, but it might be ideal for this, since it has several totally independent micros all in one chip -- and each one can be programmed to do a different task.) (In the more complex version of SLM that I am currently working on, I am generating brainwave audio mixed in with other audio, using one Zilog micro that runs at 20MHZ, that has PWM timers, and also has a bunch of high-powered instructions, such as multiply, that execute in one machine cycle.)
If you use a separate micro to generate the audio, then it becomes an audio player, and to mix its sound in with the SLM you can add the simple audio mixer that I described in my previous response.
Mitch.
Posted by maltman23 on July 16, 2007 at 15:04:00 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
Mitch,
since i am still fairly green with this subject I will more than likely just program a seperate chip. The propeller chips do look amazing i almost placed an order for some this afternoon when ordering other items.
Are you plannig on releaseing another "how to" simmilar to this one for your more complex brainwave machine? and if not is it possible for me to give you my email address in a more private way as to create a communication so i know when your new SLM is finished and posibly how to get/buy the plans and firmware from you, for personal use only.Posted by tehCaptin2 on July 16, 2007 at 18:40:43 Pacific Time
- adding some abient sounds?
You must be logged in to reply.
I wasn't planning on writing another article about my more complex brain machine.
If you'd like to keep informed with what I'm up to, I have a newsletter that you can sign up for on the TV-B-Gone website:
http://www.tvbgone.com/cfe_tvbg_buy.tvbg.php
click on the link at the right that says:
"Join our e-mail list!"
If you would like to email me, please write to:
info AT tvbgone DOT com
Mitch.
Posted by maltman23 on July 16, 2007 at 20:27:06 Pacific Time
- Problems with my Audio
You must be logged in to reply.
Hello,
This is an amazing project, but i am unable to get the audio to work. I have connected everything as described, but have run into a road block with the audio. I burned the fuses as i read someone else had audio issues, but it still will not work. I am quite proficient with soldering, and there are no bridges and I believe that everything is connected properly, but obviously it is not since i get no audio. Any help would be really appreciated. Thank youPosted by tehCaptin on July 15, 2007 at 11:46:52 Pacific Time
- Problems with my Audio
You must be logged in to reply.
Hi tehCaptin (or should it be theCaptin?),
I'll be happy to help get you going. We'll need to debug your circuit. Debugging can seem somewhat daunting at first, but after you figure it out, it feel real good. :)
First I'll need some more info to help you debug. Are you following the procedure in the article (I would recommend doing that)? If so, did you test the MiniPOV after you soldered all of the parts (with the exception of LED1-4 and R5-6) onto the PC Board? Did the 4 stuffed LEDs light up? Did you then program the MiniPOV with the VVVVV pattern? Did that work when you waved it back and forth? I take it you soldered in the two 1uF caps and two 1K resistors and the headphone jack, right? If these are in correctly, then after programming in the SLM firmware, when you power up you should see the two LEDs for the eyes pulsing, and with headphones plugged into the jack you should hear a slightly different tone in each ear. Were you able to successfully program the SLM firmware? If so, when you power up do you see the two eye LEDs pulse?
Answer the above, and we'll take it from there. It may also be helpful, if you have the ability, to take nice, clear (not blurry) photos of the top and bottom of your board, and send me a link to where I (and everyone else) can see them.
Mitch.
Posted by maltman23 on July 15, 2007 at 13:11:08 Pacific Time
- Problems with my Audio
You must be logged in to reply.
sorry for another question but does anyone know what kind of zener diode this uses? i would like to build another pov but would like to make it myslef and do not know which specific zener diode is used. thank youPosted by tehCaptin2 on July 15, 2007 at 16:06:20 Pacific Time
- Problems with my Audio
You must be logged in to reply.
The part number for the zener diodes is kind of hard to read, but it is actually printed on the diodes. In the kit I just opened, the zeners are 1N5231. But looking through some Ladyada's postings on the user forum on her website, she says that any zener diode between 3.6v and 5.1v is fine. 1N5231 is 5.1v.Posted by maltman23 on July 15, 2007 at 17:39:22 Pacific Time
- Problems with my Audio
You must be logged in to reply.
Mitch,
Thank you so much for your fast response. I have fixed the issue with the audio. I failed to run the
make program-slm
before, I thought i had done that but apparently not.
I have another question though.
I was reading further down about how to lower the frequency of the sounds, I understand where the changes need to take place in the code, but i do not understand how to get the proper numbers. ie beta was 9520 and if you set cr0a to 77 then it is 18436. If anyone could help me understand the math involved I would be greatful, I am sorry if this is a stupid question, as the other post was a waste of your time.
thank youPosted by tehCaptin2 on July 15, 2007 at 15:36:39 Pacific Time
- Changing audio frequencies
You must be logged in to reply.
In the firmware there is a line in the main function that has two misprints:
// OCR0A = value for Beta, Alpha, Theta, or Delta (i.e., 9520, 9714, 9836, or 9928)
The line should read:
// OCR1A = value for Beta, Alpha, Theta, or Delta (i.e., 9637, 9714, 9836, or 9928)
That line is only a comment, so it won't make any difference in the way the firmware functions.
The comment refers to the values for setting up Timer1 to output the correct offset frequency for each of the four brainwave types. These values assume a base frequency of 400.641Hz, generated by Timer0 (by setting up OCR0A, in main).
If you look at the do_brainwave_element function (the one above main you will see where OCR1A is set to the values for each brainwave type.
If you want to change the audio to be a lower frequency, you'll need to change the base frequency by setting up OCR0A to a higher number (in main, and you'll need to change the offset frequencies by changing the values for OCR1A to higher values for each brainwave type (in do_brainwave_element).
The equations for doing so are given in the comments in the firmware (in both main and do_brainwave_element):
F = Fclk / (2 * Prescale * (1 + OCR0A) ) = 400.641Hz
Output frequency = Fclk / (2 * Prescale * (1 + OCR1A) )
For both of the above equations,
Fclk = 8,000,000
For OCR0A
Prescale = 256
For OCR1A
Prescale = 1
Given a desired output frequency, you should be able to solve for the proper value of OCR0A (base frequency), and the four values for OCR1A (four offset frequencies for each brainwave type).
For your convenience, here are the offset frequencies for each of the four brainwave types:
Beta 14.4Hz
Alpha 11.1Hz
Theta 6.0Hz
Delta 2.2Hz
More info is given in the extensive firmware documentation I wrote up, which you can get by clicking on the "SLM Documentation" link, above the photo of the trippy glasses.
I hope that gets you going.
Mitch.
Posted by maltman23 on July 15, 2007 at 16:19:13 Pacific Time
- Problems with my Audio
You must be logged in to reply.
Mitch,
Thank you so much for your fast response. I have fixed the issue with the audio. I failed to run the
make program-slm
before, I thought i had done that but apparently not.
I have another question though.
I was reading further down about how to lower the frequency of the sounds, I understand where the changes need to take place in the code, but i do not understand how to get the proper numbers. ie beta was 9520 and if you set cr0a to 77 then it is 18436. If anyone could help me understand the math involved I would be greatful, I am sorry if this is a stupid question, as the other post was a waste of your time.
thank youPosted by tehCaptin2 on July 15, 2007 at 15:35:14 Pacific Time
- Problems with my Audio
You must be logged in to reply.
i have no idea why it posted that so many times i am sorry, please delete.Posted by tehCaptin2 on July 15, 2007 at 15:41:16 Pacific Time
- Problems with my Audio
You must be logged in to reply.
You bet -- I removed the duplicates. Sorry for the inconvenience!Posted by terrie on July 16, 2007 at 09:52:59 Pacific Time
- Programming
You must be logged in to reply.
Having trouble installing slm programming.
I am using xp and opened the command prompt.
Is this where to use the slm program.
What else is there to do?
tvPosted by TVinU on July 14, 2007 at 12:31:48 Pacific Time
- Programming
You must be logged in to reply.
Can you be more specific about the problems you are having? What have you tried, and what happened?
Before proceeding with the programming, however, you need to know that the hardware is working. Did you get the MiniPOV hardware to work? I mean, did the 4 LEDs blink when you powered it on?
Once the hardware is working, you'll then need to download and install WinAVR (for Windows). Did you download and install WinAVR? If so, then following the instructions from the article should get you going.
The Command Prompt window is the correct place to type in the programming commands.
If you need it, here are the instructions from Ladyada's website for downloading and installing WinAVR for Windows:
http://ladyada.net/make/minipov3/software.html
The easy-to-follow, step-by-step instructions here are excellent! (There are instructions here for MacOS and Linux/Unix as well.)
Please feel free to ask more questions if you're still having problems.
Mitch.
Posted by maltman23 on July 14, 2007 at 19:53:59 Pacific Time
You must be logged in to reply.
I finally got the controller programmed and all of the connections straightened out, but I haven't been able to find any of the 30 guage wire. Is it OK if I use 28 guage wire that is not wrapped? Or are there any other solutions that anyone has? Thanks.Posted by chennate on July 10, 2007 at 14:32:09 Pacific Time
- 30 gauge wire
You must be logged in to reply.
Hi chennate,
Feel free to use any kind of wire. Please do a search for the word "kynar" further down this blog page, and you'll see some discussion about the advantages and disadvantages of using 30-gauge wire-wrap wire.
If you do want to use 30-gauge wire, it is available at many places, including:
Mouser:
http://www.mouser.com
and do a search for:
801-R30
Radio Shack:
http://www.radioshack.com
and do a search for:
kynar
Mitch.
Posted by maltman23 on July 10, 2007 at 23:39:11 Pacific Time
- A couple of construction tips
You must be logged in to reply.
Hi Mitch. Great project. I have a tip that should make step 2e easier. I have alot of experience soldering but soldering the Kynar wire on the pads in step 2e looked a bit tricky. So I after step 2b I left the capacitor leads in place and when I got to step 2e I bent the end of the Kynar wire into small hooks and attached them to the capacitor leads, pushed them down against the pads and then soldered them. This made it alot easier to ensure the wire was in place during the soldering.
One other thing tip - I wasn't exactly sure what to buy for the silicone adhesive - until I looked very carefully at the photo of the parts and noticed that it's aquarium sealant. The finding a small tube of it was a snap.Posted by cyber_alchemist on July 08, 2007 at 19:38:40 Pacific Time
- A couple of construction tips
You must be logged in to reply.
Hi cyber_alchemist,
Thanks much for your tips.
Soldering can be done in many different ways, and it's a matter of personal taste what works best for anyone. I like your suggestion for step 2e. Some people may find it easier to solder wires as you described. Others may find it easier to heat up the solder already on the pad, place the tinned wire in the solder, and hold still a few seconds until the solder hardens. I encourage people to experiment, and see what works best for you.
Thanks for pointing out more about the silicone adhesive. As well as aquarium sealant, the silicone adhesive may also be better known as bathtub caulk. They come in many colors, as well as clear.
Mitch.
Posted by maltman23 on July 08, 2007 at 19:51:13 Pacific Time
- SLM Timing
You must be logged in to reply.
I have my kit up and running, but the timing is off. Comparing to your timing chart, my timing is consistently a multiple of 7 (e.g. 60 seconds lasts 420 sec, 10 sec lasts 70, etc). I built from kit and am programming w/ the USBtiny kit using AVRDUDE. Do you have a fix? Thanks.Posted by zzag on July 07, 2007 at 10:51:43 Pacific Time
- SLM Timing
You must be logged in to reply.
Hi zzag,
My guess is that the oscillator in the microcontroller is running at the wrong frequency. When you listen to the tones in the headphones, are the tones a very low frequency? If you are using the firmware without any modification, and if the oscillator is running at the correct frequency, the tones should be somewhat close to a middle-"A" note on a piano (or other musical instruments). If the tone is very low, then that indicates that your oscillator is too slow. You may be able to fix that by burning the microcontroller's "fuses." They are supposed to be pre-burned for you, but why don't you try burning them again, and then re-programming the SLM firmware?
Here's how to burn the fuses:
If you are using Windows (it is similar for Mac and Linux/Unix), type in the following command line from a Command Prompt window:
make burn-fuse
while the MiniPOV is connected to the serial port and with the battery pack switch powered on. Then you're ready for programming.
I hope that helps. If not, please give me more details on what you see and hear on your SLM.
Mitch.
Posted by maltman23 on July 07, 2007 at 12:42:18 Pacific Time
- SLM Timing
You must be logged in to reply.
I've experienced a similar problem when programming a SLM via the Atmel AVR-ISP mkII programmer. To make AVR-GCC happy, I changed "for (int i=0;..." to "int i;" followed by "for (i=0;..." The first time I programmed the ATtiny2313, everything was extremely slow, but that was because the fuse setting for dividing the internal clock by eight was enabled. I unchecked that box (keeping the other fuses set for 8-MHz internal RC clock) and reprogrammed the 2313, and the sound was correct, but the LEDs flashed at one-seventh the correct rate. I merely changed the "DelayCount=87" magic number to "DelayCount=13," which causes some loss of resolution and accuracy as compared to the original version. Any ideas what causes this slow-delay-loop problem even when the timers are running correctly?Posted by /. on November 19, 2007 at 14:30:27 Pacific Time
- SLM Timing
You must be logged in to reply.
If you are hearing about 400Hz in each ear (with one ear having a slightly higher pitch than the other), then the microcontroller's clock is running at the correct rate (and the timers run off of the micro's clock). The sound works off of the timers. The rate of the LED blinking, however, is determined from the "delay_one_tenth_ms" function. This function requires that DelayCount=87 (otherwise the length of delay will not be 0.1 millisecond times its argument. Since you changed DelayCount to 13, and since 13 is about 1/7th of 87, that would account for the wrong LED blink-rate.
What are you trying to accomplish by changing DelayCount? There is probably another way to do it without affecting the LED blink-rate or the pitch of the sound.
Mitch.
Posted by maltman23 on November 19, 2007 at 15:14:52 Pacific Time
- SLM Timing
You must be logged in to reply.
Sorry, Mitch, let me rephrase that. My SLM started out super slow (both lights and sound). That's when I realized the "divide internal RC clock by eight" fuse was enabled. So I unchecked that box in AVR Studio 4 and solved THAT problem.
Then, the sound was at the proper ~400 Hz binaural beat frequencies, but the LEDs were flashing at around 2.25 Hz (during the first 60-second Beta brainwave element). Looking at the code, it appeared the easiest way to change the LED rate without changing the sound frequencies would be to change the "DelayCount=87," so I changed it to "DelayCount=11," which yielded a Beta flash rate of about 17.25 Hz. I then changed it to "DelayCount=13," which yielded a Beta flash rate of about 14.95 Hz. I just changed it to "DelayCount=14," but haven't had a chance to see how close to 14.4 Hz it will be.
For some reason, if I keep Delay Count set to 87, my RC oscillator rate is the correct 8 MHz (and undivided), my timers are running at the correct rates to produce ~400 Hz sound, but blink_LEDs seems to be running about one-seventh as fast as it is supposed to, and all I changed in the code was declaring "int i;" before the "for" loop to keep AVR-GCC happy, as AVR-GCC had complained that "for (int i=0;..." can only be used in c99 mode.Posted by /. on November 20, 2007 at 08:52:19 Pacific Time
- SLM Timing
You must be logged in to reply.
Wow, I never heard of that happening before. Maybe your micro's fuses are programmed in a funny way? If you try this out (using avrdude in a command window):
make burn-fuse
that might fix things.
On the other hand, your compiler might be doing something different than the gcc compiler. What compiler are you using? What is C99 mode? gcc is an optimizing compiler, and in order to trick the compiler into not optimizing the delay loop away into oblivion I added a statement to toggle an unused PortD output pin (that's what that PIND statement is for in the delay loop). Declaring DelayCount as volatile is probably a better way to do it, but the PortD thing worked, so I left it that way. Maybe your compiler is optimizing differently? I'm really making stabs here.
Mitch.
Posted by maltman23 on November 20, 2007 at 11:12:44 Pacific Time
- SLM Timing
You must be logged in to reply.
Mitch,
I'm using AVR-GCC from WinAVR inside of AVR Studio 4, and using the AVR-ISP mkII for programming. Thus, it should be the same GCC as everyone else is using, as I downloaded it according to ladyada.net's POV3 instructions. C99 is supposedly some C language standard from 1999 that supports declarations of variables inside "for" loops, as supposedly C++ does as well. Since I didn't know how to get AVR-GCC to support the "for (int i=0;..." syntax, I just added a new line with "int i;" immediately preceding the line with "for (i=0;...." Since I understand avrdude to work via the serial interface, and I simply ran vcc, gnd, reset, sck, mosi, and miso to a 6-pin header for the AVR-ISP programmer and omitted the RS-232 connector and its associated resistors and zener diodes, I don't know that I could use avrdude and make burn-fuse to reset my fuse settings. However, AVR Studio 4 allows all fuse settings to be programmed. So, if I knew what all of the fuse settings are supposed to be and what the object code (.hex file) is supposed to be, I could figure out why I'm not getting the same results. Is the slm.hex file available anywhere online? Also, are the fuse settings obtained via make burn-fuse listed somewhere?Posted by /. on November 20, 2007 at 15:36:01 Pacific Time
- SLM Timing
You must be logged in to reply.
If you are using WinAVR, I'm not sure why you needed to change anything to make the firmware compile, since I used WinAVR to develop the firmware. It should understand defining an integer inside of a for loop. But this is probably not very important, since this particular for loop has nothing to do with timing. It is odd, though, that your compiler complained when my WinAVR gcc compiler was fine with it.
I've only been programming using avrdude through the serial port. But programming using AVR Studio should work well. To find out what the fuses should be, take a look inside of the makefile that I zipped together with the "slm.c" file. Search for "fuse" and you'll see that the Fuse Low Byte is burned with 0xe4. The ATtiny2313 datasheet for the ATtiny2313 gives the pin definitions for the Fuse Low Byte, and 0xe4 means:
- do not divide the clock by 8 (CKDIV8=1)
- do not output the clock to the CKOUT pin (CKOUT=1)
- maximum delay to startup upon reset (SUT=10)
- the clock source is the internal oscillator, set to 8MHz (CKSEL=0100)
The Fuse High Byte should be fine by default. But if you changed it, it should be 0xdf:
- DWEN=1
- EESAVE=1
- SPIEN=0
- WDTON=1
- BODLEVL2=1
- BODLEVL1=1
- BODLEVL0=1
- RSTDISBL=1
The hex file wasn't online, but I added it to my website so that you can download it. I'd be curious if your hardware will work if you use it:
slm.hex file .
If changing the fuses didn't make things work as expected, please try this hex file and see if that changes anything. And please let me know how it goes.
BTW, I created a version of the firmware that has an audio base frequency of 200Hz instead of 400Hz. I did this because most people find the lower frequency more comfortable. It is available on my href="http://www.CornfieldElectronics.com"> Cornfield Electronics website (click on the "maker faire" button).
I put the href="http://www.tvbgone.com/mfaire/slm/hex200/slm.hex">
hex file for this on my website too.
Mitch.
Posted by maltman23 on November 21, 2007 at 15:44:01 Pacific Time
- SLM Timing
You must be logged in to reply.
Mitch,
Thanks for all your help. The idiosyncracies seem to stem from the Makefile, which differs from the Makefile that AVR Studio 4 creates by default (if I allow it to). The compiler's problem with defining the integer variable in the "for" loop (as being c99 syntax when the compiler is not in the c99 mode) is solved by including "CFLAGS += -std=gnu99" in the Makefile (as it is in ladyada's Makefile), thereby placing the compiler in the c99 mode.
However, that alone didn't fix my timing problems. I was able to fix my timing problems by using ladyada's Makefile instead of having AVR Studio 4 create its own. I haven't studied the Makefiles in detail, so I don't know what the critical differences are. It's hard to imagine what in AVR Studio 4's Makefile would apparently slow the ATtiny2313 down by a factor of seven.
I had my fuses set to 0xE4 even with the AVR Studio 4 Makefile, so that wasn't the source of my problems.
Thanks for posting the slm.hex file. It works on mine. Perhaps I'll do a file comparison and/or disassemblies of the two .hex files and see what the actual object code differences are.
I also implemented both the 200 Hz and 400 Hz versions. I looked at the ATtiny2313's outputs on a digital storage oscilloscope (DSO) and saw that, even with the ladyada Makefile, the LED flashing rate was about 13.5% too high and both the left and right audio frequencies were about 1.5% too high. I assume the 1.5% error results from clock frequency error of the internal RC oscillator. I don't know the source of the 13.5% LED error. I changed the DelayCount=87 to DelayCount=99 to compensate for the 13.5% error. To compensate for the audio error, I measured the base (left) frequency, then set the OCR1A values based on (((8 MHz * clock error)/(base freq. + beat freq.))/2)-1. The values I ended up with were (for 400 Hz/200 Hz) as follows:
Beta 9640/18641
Alpha 9717/18929
Theta 9837/19392
Delta 9929/19752
where clock error = 1.01088 and base freq. = 405/202.5.
With those values, everything looks right on target on the DSO. Thanks again for helping me solve my SLM timing problems. If I find out more about the source of the Makefile idiosyncracies, the .hex file differences, or the source of the clock errors, I'll post updated information.Posted by /. on November 23, 2007 at 14:30:13 Pacific Time
- SLM Timing
You must be logged in to reply.
I bet the difference in timing is due to the command line options for the compiler being different in the makefile from ladyada and the one from AVR Studio -- probably the AVR Studio one didn't have the optimizing turned on, making the delay loop a lot longer.
The 1.5% error is insignificant as far as brainwave entrainment goes (and it probably is from the internal oscillator being 1.5% off from 8.00MHz). 13.5%, however, is pretty big. I'm not sure why the blinking lights would be so far off. But it is cool that you got things going well. :)
Please do post if you find out more about why the LED blink rate is off.
Mitch.
Posted by maltman23 on November 23, 2007 at 21:38:02 Pacific Time
- SLM Timing
You must be logged in to reply.
Yep, that was it. Don't know how it to messed up, but you fixed it. And yes, it was a low frequency before. With this correct setup I don't go into seizures during the delta. Thanks Mitch!Posted by zzag on July 07, 2007 at 13:14:24 Pacific Time
- Re: SLM Programming sequences
You must be logged in to reply.
> Hey Mitch,
> Great machine! Took a few tries but I finally got my SLM programmed and
> running. I had started out having built the Brainwave machine using the
> lpt port with 8 leds and ran connected to a computer.. The advantage of
> that one is it was easy to program on the fly . but yours are
> portable..:) I am still trying to make sense of how to program these
> controllers to do what you want and was wondering if you had any other
> slm code written other than what was provided with the slm? Like maybe
> from wake to deep sleep, or just something to restful..I have fallen
> aslepp with the SLM on but everytime it ends i am wide awake again
>
> Thanks Bill
>
> Posted by whc83 on June 30, 2007 at 18:04:16 Pacific Time
Hi Bill,
I have been working on sequences for waking up and for going to sleep, and for going back to sleep (when you wake up in the middle of the night). I don't have those sequences ready to give out yet, but I can tell you a bit about each.
But first I'll say that you can try your own sequences. Feel free to play around with the sequence given in the SLM firmware. For instance, you can truncate the meditation sequence. The meditation sequence brings you from being awake, to very relaxed, hanging out there awhile, and then back up again feeling fabulous. If you delete all of the brainwaveElements after the way-relaxed elements, then you are left feeling very (very!) relaxed. I have tried this out on my sister-in-law, who is not a very good sleeper, and it worked great for her (I actually just had her try it out just before going to bed, wearing the glasses only for 7 minutes, rather than the full 14 minutes, taking the glasses off during the way-relaxed part of the sequence).
To truncate the meditation sequence to stop after becoming way relaxed, delete all of the lines after the last Delta brainwaveElement, but be sure to leave the last brainwaveElement of " '0', 0 ", which tells the firmware to turn off the microcontroller. It might be better for sleeping, though, if you add in several more Theta and Delta brainwaveElements added before turning it off.
Going into meditation is somewhat similar to going to sleep, but it is not the same. Meditation requires that you keep some beta stimulated so that you do not fall asleep. The idea of meditation is to stimulate your subconscious mind as well as your deeper unconscious mind while being awake enough to experience it. For sleep, on the other hand, turning off your conscious mind is important, so you want to eventually fade out all Beta. So, start with Beta, then start fading it out while increasing Alpha, then fade Theta in while fading Alpha out. Then pulse some Delta while having mostly Theta. End the sequence with an extended play of Theta. You should be able to find some places on the web where the sleep sequence is well documented.
To wake up, you start out with some Beta, but lots of Alpha, and a little Theta. Then fade out the Theta while fading the Beta in some. Then fade out Alpha while fading in Beta, ending with just Beta.
Going back to sleep after waking up is not so easy for lots of people. My experience is that if you bring people more fully awake, then they will fall asleep much more easily. So, what I have done is do a short wakeup sequence, bringing the person to a "known good state" (so to speak), and then do a sleep sequence. I have found that this works really well for most people.
I hope that gets your creative juices flowing.
Mitch.
Posted by maltman23 on July 03, 2007 at 18:20:17 Pacific Time
- Re: SLM Programming sequences
You must be logged in to reply.
Cool.. Thanks.. finally figured that part out and just removing the back to awake sequence and adding extra delta and theta worked pretty great!I was asleep in no time. If i could fade it out to the off position that would be eggcellent:)
Next question; Now that I feel more confident with replacing data on this thing, is this module capable of only doing one program, or can it run multiple programs?
If not, i suppose i would build several units pre programmed with different routines an use a selector switch to determine which routine would run?
Lastly, is slm capable of making white or pink noise, especially to form the binaural beats? I think that would really be a little easier on the ears to focus on. I did find an headset with inline volume control which helped alot.
Thanks
Bill
Would the same apply to the number of leds it runs?
Posted by whc83 on July 06, 2007 at 23:15:00 Pacific Time
- Re: SLM Programming sequences
You must be logged in to reply.
Hi Bill,
I'm glad you got it going, and that it is helping you sleep.
With some added hardware and updated firmware, you can certainly come up with ways to make the SLM capable of more than one sequence. For example, you could connect a momentary-push-button switch to two of the microcontroller's pins (where pushing the button makes the pin go Low). Then in the firmware:
- add another brainwaveTab with a second sequence
- the two pins with the push-button switches are set as inputs
- at the beginning of the main function, write a loop that waits for one of the two inputs to go Low -- depending on which input goes Low, play one of two different brainwaveTables.
I'll let you do the actual coding, OK?
Making the audio fade out at the end is trickier to do. This SLM project for MAKE is designed to be fun and easy-to-make, but still work well. With more hardware and more complex firmware, a lot more is possible. I am working on a version that is much more pleasing to use, and even more effective. It uses more LEDs (four colors, one for each brainwave type), and has four tones (one for each brainwave type) that smoothly fade in and out (and the sound comes from samples of different musical instruments). I am accomplishing the sound using Pulse Width Modulation (PWM). Describing that is more than I have space for in this blog. But I'll be talking about it at the Chaos Computer Camp 2007 in Berlin in August, and will be glad to talk to you about it if you ask me there. :) I'll be posting more info on it on my Cornfield Electronics website afterwards.
Pink-noise is nice sound, and it easily masks the brainwave frequencies, which aren't so pleasing. Making pink-noise, and just about any other different kind of sound, can be done using PWM, as well as other methods, such as wave-table-lookup. But, again, these methods would take too much space to describe here in this blog.
I hope that whets your appetite for more experimenting.
Mitch.
Posted by maltman23 on July 07, 2007 at 12:32:57 Pacific Time
- Re: SLM Programming sequences
You must be logged in to reply.
lol.. I think I will just play with the section you first mentioned.. I am almost down with that.. as is easy enough to do with out much effort or understanding. The other stuff may take a while to soak up and understand enought to delve into at this point.. But soon.:)
Thanks again for the help.. I am glad you are so involved with this.
Thanks
BillPosted by whc83 on July 08, 2007 at 00:12:57 Pacific Time
- Lame Question
You must be logged in to reply.
Hi, my husband fell in love with the idea of this project and I am trying to surprise him with the whole kit before he gets to it. My main question is about soldering irons. The one he has got chwed up by my cat and I would like to get him a new one. It was one of those cheapy ones from the hardware store and he mentioned he wants to get a more appropiate one for electronics. Any suggestions? would like to spend less that $70
Thanks!!Posted by MaruatCircleStudiox on July 02, 2007 at 15:02:34 Pacific Time
- Lame Question
You must be logged in to reply.
I see that the links to the Jameco website that I gave got cut off. To see the solder iron and tip, go to
http://www.jameco.com/
and then do a search for Jameco Catalog Part #:
146595 for the $47 solder iron
146624 for the $5 conical tip.
Mitch.
Posted by maltman23 on July 03, 2007 at 18:37:16 Pacific Time
- Lame Question
You must be logged in to reply.
Hi MaruatCircleStudiox,
Great gift idea. :)
I hope your cat didn't learn to respect electricity the hard way in the process of chewing the solder iron's cord!
Having a decent solder iron isn't necessary, but if you and/or your husband are planning on doing more electronics projects, then having a decent one is well worth the investment.
The main difference between the el-cheapo solder irons and a decent one is temperature control. They'll also have a handle that doesn't get too hot while holding it, and they'll have the ability to change tips. You'll also want one with a holder to place it while not in use, as well as a sponge for cleaning the tip (which you should do before every solder connection). (Fancier solder irons have other bells and whistles, such as adjustable temperature, but there is no need for this for our purposes.)
Lots of solder irons fit the bill, and people have their favorites. Mine is made by Weller, and I use a thin conical tip. I just took a look at the Jameco catalog, and see that there is a Weller solder iron station for $47:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=146595&productId=146595
It comes with a screwdriver tip, which is fine. If you want a conical tip (which I like), it is available for an extra $5:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=146624&productId=146624
Happy soldering!
Mitch.
Posted by maltman23 on July 03, 2007 at 18:33:58 Pacific Time
- Triple LED goggles
You must be logged in to reply.
aren't looking like a success. As I'd feared, the color doesn't have an impact thru the eyelid, and the spacing of the LEDs as I did it (about 3/4" apart) diminishes the cycle impact - it's not a strong enough repeated impact on the optic nerve.
So I wouldn't recommend the experiment.Posted by Swampdog on June 27, 2007 at 11:10:40 Pacific Time
- Triple LED goggles
You must be logged in to reply.
Hi MaruatCircleStudiox,
Great gift idea. :)
I hope your cat didn't learn to respect electricity the hard way in the process of chewing the solder iron's cord!
Having a decent solder iron isn't necessary, but if you and/or your husband are planning on doing more electronics projects, then having a decent one is well worth the investment.
The main difference between the el-cheapo solder irons and a decent one is temperature control. They'll also have a handle that doesn't get too hot while holding it, and they'll have the ability to change tips. You'll also want one with a holder to place it while not in use, as well as a sponge for cleaning the tip (which you should do before every solder connection). (Fancier solder irons have other bells and whistles, such as adjustable temperature, but there is no need for this for our purposes.)
Lots of solder irons fit the bill, and people have their favorites. Mine is made by Weller, and I use a thin conical tip. I just took a look at the Jameco catalog, and see that there is a Weller solder iron station for $47:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=146595&productId=146595
It comes with a screwdriver tip, which is fine. If you want a conical tip (which I like), it is available for an extra $5:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=146624&productId=146624
Happy soldering!
Mitch.
Posted by maltman23 on July 03, 2007 at 18:32:55 Pacific Time
- Doh!
You must be logged in to reply.
So I go back to see if maybe I've got a solder bridge or a short that's keeping the sound from working. I'm examining the board with a magnifying glass. Finally I notice - I never put the 1K resistors in pads 5 & 6. That'll do it, that right there, yup, you betcha. Now I just need to figure out how to make the blue leds light up.
Posted by Swampdog on June 26, 2007 at 18:10:18 Pacific Time
- I appreciate the article
You must be logged in to reply.
Hi Mitch - Thank you for contributing this project. I ordered the mouser.com parts and am getting my 7 year old son interested in this project. We are going to have a lot fun. Thanks again. StephenPosted by stephenhobbs on June 26, 2007 at 17:39:35 Pacific Time
- V2
You must be logged in to reply.
Let me start off with THANKS, what a great product. I'm planning to build several pairs and taking them to burning man for people to play with.
I made one of these with a few small difficulties* that I worked thru. I'm now on V2 and I've got a few small difficulties that I haven't yet worked thru. V2 has 3 leds in 3 colors per eye. I wired the leds into the 5-8 sockets and modified the program as follows:
In the function blink_leds I changed
for (int i=0; i<(duration/(onTime+offTime)); i++) {
PORTB |= 0b00000011; // turn on LEDs at PB0, PB1
delay_one_tenth_ms(onTime); // for onTime
PORTB &= 0b11111100; // turn off LEDs at PB0, PB1
delay_one_tenth_ms(offTime); // for offTime
-----------
to
for (int i=0; i<(duration/(3*(onTime+offTime))); i++) {
PORTB |= 0b00000011; // turn on LEDs at PB0, PB1
delay_one_tenth_ms(onTime); // for onTime
PORTB &= 0b11111100; // turn off LEDs at PB0, PB1
delay_one_tenth_ms(offTime); // for offTime
PORTB |= 0b00110000; // turn on LEDs at PB0, PB1
delay_one_tenth_ms(onTime); // for onTime
PORTB &= 0b11001111; // turn off LEDs at PB0, PB1
delay_one_tenth_ms(offTime); // for offTime
PORTB |= 0b11000000; // turn on LEDs at PB0, PB1
delay_one_tenth_ms(onTime); // for onTime
PORTB &= 0b00111111; // turn off LEDs at PB0, PB1
delay_one_tenth_ms(offTime); // for offTime
}
-----------------
Problem 1: The blue LED (on sockets 7-8) doesn't light up. I tinkered with the program, I think I've addressed it correctly. I think the LEDs have a different resistance than the others so I'll experiment with putting different levels of resistance in those sockets this evening. Suggestions welcome. I'm using Radio Shack super bright blue LEDs.
Problem 2: No sound. I had originally wired the battery in backwards and the chip got pretty hot. Is it likely I burned it out? The solders all look clean, I'll check them again. I'm using the radio shack bipolar 1Mf capacitors which are a little awkward - the wiring comes off the ends and it's a little bulky. Suggestions?
-----------
*here are issues I encountered on my V1 in case it's helpful to anyone else building.
1. Wired the "original" LEDs into sockets 5-8 instead of 1-4 b/c I'd read it wrong which was which.
2. Wired the battery pack backwards. Symptom - nothing works and the chip gets hot.
3. I had a struggle getting the AvrDude software loaded. In hindsight,I don't think I rtfm'd at ladyada.com. I read "download and install" and went out to google to find Avrdude, etc. I think this could be clearer, but fault primarily mine.
4. I did glue the battery pack with the switch facing inboard with the hope that when I need to replace batteries I can get the case cover off without snipping the cable ties. Worst case, I snip the cable ties and redo them, but the glue is fine.
5. I find the volume a little too loud in the earphones. I think the easy solution is to get a pair of earphones with built in volume control, used to be pretty cheap ones you could get that way. I think it intensifies the effect with the volume up and I get interesting aural afterimages.
-----
I'm also planning to experiment with another project in Make 10. I want to take the "dice" project, add in a variable capacitor to be able to adjust the timing up and down, and wire it up to 3 LEDs per eye or a 3 way LED. I saw something like this at Maker Faire 1.0 and it made really trippy visuals although I don't think it's going to manipulate your brainwaves.
(sorry for the long note)Posted by Swampdog on June 26, 2007 at 10:23:12 Pacific Time
- V2
You must be logged in to reply.
Hi Swampdog,
Your code for turning 3 LEDs at each eye on and off looks good. You can simplify it, if you like, as follows:
for (int i=0; i<(duration/(3*(onTime+offTime))); i++) {
PORTB |= 0b11110011; // turn on LEDs at PB0, PB1, PB4, PB5, PB6, PB7
delay_one_tenth_ms(onTime); // for onTime
PORTB &= 0b00001100; // turn off LEDs at PB0, PB1, PB4, PB5, PB6, PB7
delay_one_tenth_ms(offTime); // for offTime
}
The problem you are having with the Blue LED is probably due to the higher Forward Voltage required to light up the Blue LED. Blue LEDs often require more voltage than other colors. See if you can find one with a Vf of less than 3v. Also, try using a much smaller series resistor for it than the others (or, maybe even try no resistor at all -- but be careful not to keep it lit up too long without blinking it, or it could burn it out).
Changing the code the way you did should not have effected the sound. So, it is possible that you burned out the chip when you hooked power up backwards. While doing the workshop at the Maker Faire, teaching people how to build these, I managed to connect power up backwards on 4 chips. One of them burned out, but the other 3 worked fine. For yours, my guess is that the chip is working, and you have another problem, since if the chip works at all, it probably all works.
As for the caps with the wires coming out the ends (this is called "axial", whereas the ones from Mouser I suggested, with the leads both coming off the bottom, are called "radial"): I would recommend mounting the cap vertically, with the bottom lead facing downward, and then bend the upward lead down along the side. This is the way they used to stuff resistors into PCBs in those small, handheld transistor radios in the '60s.
Happy making!
Mitch.
Posted by maltman23 on June 26, 2007 at 16:54:20 Pacific Time
- SLM Programming
You must be logged in to reply.
Hey Mitch,
Great machine! Took a few tries but I finally got my SLM programmed and running. I had started out having built the Brainwave machine using the lpt port with 8 leds and ran connected to a computer.. The advantage of that one is it was easy to program on the fly . but yours are portable..:) I am still trying to make sense of how to program these controllers to do what you want and was wondering if you had any other slm code written other than what was provided with the slm? Like maybe from wake to deep sleep, or just something to restful..I have fallen aslepp with the SLM on but everytime it ends i am wide awake again
Thanks BillPosted by whc83 on June 30, 2007 at 18:04:16 Pacific Time
- Capacitor
You must be logged in to reply.
Is there a replacement 1uf capacitor for the brain machine? Mouser is back ordered until september.Posted by TVinU on June 25, 2007 at 15:03:09 Pacific Time
- Capacitor
You must be logged in to reply.
You can use the bipolar 1uF cap they sell at Radio Shack:
http://www.radioshack.com/product/index.jsp?productId=2062378
Or, you can use any 1uF capacitor. If you use a polarized cap, be sure to connect the negative side of the cap to ground (the ground holes for the LEDs are the ones at the edge of the PCB). Usually, the negative side of a polarized cap is marked with a bar. Here is a cheap polarized 1uF cap they sell at Mouser:
http://www.mouser.com/search/ProductDetail.aspx?R=USR1H010MDDvirtualkey64700000virtualkey647-USR1H010MDD
Mitch.
Posted by maltman23 on June 25, 2007 at 15:13:37 Pacific Time
- Running make program-mypov
You must be logged in to reply.
when I execute "make program-mypov" I get the following error message:
avrdude -p attiny2313 -P com1 -c dasa -U flash:w:mypov.hex
error at ..\slm\avrdude.comf:370 unrecognized character: "u"
make: *** [program-mypov] Error 1
any ideas?
thanks,
bill.Posted by wmindel on June 22, 2007 at 18:21:28 Pacific Time
- Running make program-mypov
You must be logged in to reply.
Hi bill,
Did you do this command first?
make mypov.hex
What happened when you executed it?
Are you executing the "make" commands from a Command Prompt window with the prompt pointed to the correct directory with the "mypov.c" file? (I.e., did you download the source code to a known directory, such as "slm" and then do a "cd" command to point to it?)
Mitch.
Posted by maltman23 on June 24, 2007 at 01:40:04 Pacific Time
- Running make program-mypov
You must be logged in to reply.
Mitch,
Thanks for the reply. As it turns out, I have a bunch of problems.
1. I've just noticed that the unit works intermittently - most of the time, when I flip the switch the lights go on (one after another), but sometimes nothing - I suppose I should take apart the power supply to see what might be wrong, right?
2. I also noticed that when I run "make mypov.hex", in the middle of 'seemingly normal" message, there is a:
In file included from mypov.c:3:
c:/winvr-20070525/bin/..avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
when I'd comment out the 3rd line (signal.h), the message went away; but I am not sure whether I should've done that.
Finally, yes, I follow (or at least I think I follow) the instructions in the magazine:
1. turned off the battery pack, plugged the MiniPOV into the serial port, switched it on (the lights don't go on - should they?)
2. switched to the command prompt, switched directory, "del mypov.hex" "make mypov.hex" (with all the messages from above) and then run into the problems with "make program-mypov".
It almost seems like I am missing one (maybe two) simple step...
Thanks for your help.
Bill.Posted by wmindel on June 24, 2007 at 05:06:53 Pacific Time
- Running make program-mypov
You must be logged in to reply.
It is bothering me that you are not getting the expected behavior when you turn on power to the hardware. I am thinking that you probably have a hardware problem. Especially since it is only doing something intermittently.
1. If your unit works intermittently, then you have a problem with the hardware. The first step is to make sure that all of your solder connections are good. There are two kinds of bad solder connections:
- "Cold" solder joints, meaning that the solder didn't flow nicely around the lead of the electronic part and the pad on the PCB. You can fix these by heating the solder connection up with a solder iron, being sure to touch the solder iron tip to both the component lead and the PCB pad. Hold the solder iron in this position for about 1 second. You may want to do this for every solder joint on your PCB, just in case (but especially for the 20 pins on the microcontroller socket).
- "Solder bridge," meaning some excess solder is shorting out two places on the PCB that should not be shorted together. Bridges are not always easy to find. Inspect your PCB carefully and see make sure that solder only exists on it where the is a pad.
There are other things that can go wrong, too.
- If you have a volt-meter (a good investment -- you can buy a cheap one for about $10 at Radio Shack or Jameco, and other places), you can measure the power supply voltage at the microcontroller chip between power and ground (pins 20 and 10 in our case) -- make sure it is close to 3v with the switch turned on.
- Inspect the components to make sure that all polarized components (i.e., ones where it matters which way they are inserted) are inserted correctly into the PCB. In this project, the polarized components are the diodes D1, D2, D3 and the LEDs LED1, LED2, LED3, LED4. The microcontroller can also be inserted backwards -- if you do this with the power on the chip will heat up to the point where it will probably burn itself up. I have, however, made this mistake on a few boards, myself, and in only one case out of 5 has the chip burned out -- on the other 4 I turned off the power, reversed the chip, and it worked fine.
2. Please ignore the warning message you get when you do the
make mypov.hex
command. I think you are fine if you comment out that line from the source file, but it is probably best to keep it in.
Programming:
1. When you plug the board into the serial connector and turn on the power, you may or may not see LEDs light up. Unfortunately, there is no visual indication that things are working or not at this point.
2. When you type
make mypov.hex
this creates the "mypov.hex" file for programming the microcontroller in the next step. If you have that file in your directory, then your software is probably installed correctly, and you are doing things correctly up to that point.
If your hardware is working, and if you have a "mypov.hex" file in the "slm" directory, and you follow the instructions in the article, when you type the next step
make program-mypov
then, in the Command Prompt window, you should see the software find the chip, erase the chip, program the chip, and verify the program in the chip.
If things still are not working after you verify that the hardware is working is uninstall WinAVR and reinstall it (to make sure one of the files was not somehow accidentally corrupted).
Mitch,
Posted by maltman23 on June 24, 2007 at 10:06:24 Pacific Time
- Volume control
You must be logged in to reply.
Suggestion: for someone that is bothered by a loud volume try putting the headset against the hard boney area above/behind the ear. The audiologist does this during a hearing test.
I built the miniPOV and the USB charger some months ago but never got around to programming the POV. Real life. Priority interupts. Now I feel re-inspired.
My problem is that I'm a little more than half deaf. Volume control will most likely be required. I read all of the current posts so I have your fix for that.
I was thinking about cannabalizing a $1 store or old radio for parts but I haven't had a lot of luck with desoldering so I'll probably just buy the parts.
This could work well for power naps. Power down, sleep 10-20 mins, power up. Or is going thru the sequence enough without the sleep?
Thanks for an inexpensive and fun project. Sounds like one could save money on LSD, sleep aids, uppers, downers, antidepressants, shrinks, etc. with the SLM. I'm kidding about the LSD.Posted by sasha916 on June 22, 2007 at 11:14:47 Pacific Time
- Volume control
You must be logged in to reply.
I found a cheap set of headphones with a built in inline volume control.. works great.. for like $7
Posted by whc83 on June 30, 2007 at 18:07:24 Pacific Time
- WinAvr software
You must be logged in to reply.
Mitch,
1. I think I soldered everything right. When I turn on the power the lights light up one after another - not all at once. Is that right?
2. I can't find the link to download WinAVR from the ladyada website - I've looked everywhere - can you, please, post a link?
I appreciate all the help (its my first "soldering/programming" project - so nothing seems easy :)
Bill.
Posted by wmindel on June 22, 2007 at 09:08:19 Pacific Time
- WinAvr software
You must be logged in to reply.
Hi Bill,
1) It's possible that your kit came with the wrong firmware pre-programmed into the AVR chip. There is some test firmware that does what you explained: lighting up each LED with all the rest off, then lighting up the next LED with all the rest off, etc., and then repeating. Is that was yours does? If so, then we can assume that you have soldered everything together OK.
2) The page on the Ladyada website for downloading the programming software is:
http://ladyada.net/make/minipov3/software.html
On this page are links to the required software for your favorite Operating System. WinAVR is the one to get for Windows. Scroll down a little to where it says "Windows" and you'll see the link. But please be sure to NOT download the latest version, since it is reported to not work -- the version that works is the January 2007 release.
I hope that gets you going.
Mitch.
Posted by maltman23 on June 22, 2007 at 11:31:17 Pacific Time
- chnage the tone/pitch?
You must be logged in to reply.
Hello,
Can anyone give quick easy instructions for changing the pitch of the binaural tones?
The default tones are too high pitch and loud to be relaxing. I built my goggles last week and have been using them daily, and my only complaint is the sound is just too darn loud.
ThanksPosted by jeffthrow on June 20, 2007 at 15:09:10 Pacific Time
- chnage the tone/pitch?
You must be logged in to reply.
Changing the pitch is pretty easy. But you'll need to do some math.
Look in the "slm.c" file with a simple text editor. Scroll down to the "main" function and see the line that says:
OCR0A = 38; // to output 400.641Hz on OC0A (PB2, pin 14)
This sets the base frequency. You'll want to change the value of OCR0A to suit your tastes. Use the equation given in the comment a few lines above that. For example, if you desire 200Hz base frequency, OCR0A should be set to 77 (instead of 38) to get an output frequency of 200.321Hz.
Now you'll need to change all four of the offset frequencies. This is done in the "do_brainwave_element" function. Use the equation given in the comment above the function and for each section of "do_brainwave_element", change the value of OCR1A to be offset by the brainwave frequency for that section. For example, the frequency for Beta is 14.4Hz, so with a base frequency of 200.321Hz, the offset for Beta should be:
200.321Hz + 14.4Hz = 214.721Hz
To get that frequency, set OCR1A in the Beta section to 18630 (instead of 9714) to get an output frequency of 214.696Hz.
Do a similar calculation to change the offset frequency for each of the other three brainwave sections in "do_brainwave_element".
That's all there is to it.
To change the volume, there is a bit of discussion in other questions, below.
I hope that helps.
Mitch.
Posted by maltman23 on June 22, 2007 at 11:23:56 Pacific Time
- compiling?
You must be logged in to reply.
so i was doing well. i got most of the kinks worked out, but im down to downloading the slm program onto it. i dont seem to have slm.hex, although i do have slm.c. where do i find it/how do i make it?Posted by sonicboom16 on June 18, 2007 at 13:34:30 Pacific Time
- compiling?
You must be logged in to reply.
The "slm.hex" file is created by the processes that happen when you type:
make slm.hex
The "slm.hex" file is what actually gets programmed into the Atmel chip when you type:
make program-slm
Mitch.
Posted by maltman23 on June 19, 2007 at 00:52:50 Pacific Time
- compiling?
You must be logged in to reply.
I seemed to have that same problem too, I didn't have an slm.hex program to delete, but if you go ahead and run the "make" command everything proceeds according to the instructions in the magazine.
jimPosted by jvanis65 on June 18, 2007 at 15:08:38 Pacific Time
|
Showing messages 251 through 500 of 572. |
Join the conversation -- every MAKE article has an online page that includes a place for discussion. We've made these RSS and Atom feeds to help you watch the discussions: subscribe.











