Posted
by
Cliff
on Thursday November 16, 2006 @07:32AM
from the pretty-wavy-lines dept.

Rustcycle akss: "To extend prior music generation experimentation, I'm interested in creating music via genetic algorithms using neurofeedback to assign fitness values. Does anyone have a recommendation for EEG systems that are affordable outside research institutions? What's the best system under $2k? Ideally I'd want a multi-sensor system so I could do sonification experiments to 'hear' correlated data from different regions, but I'd settle for a one or two sensor system for initial experimentation — so long as there are drivers for Mac / Linux. How safe / unsafe is the OpenEEG route?"

Instrumentation amplifiers [allaboutcircuits.com]. They're cheap and astounding. CMRR's of 80 or 100. Take a look at the Analog Designs AD620 [analog.com], for instance. It's superb (even if they are our competitors.) I've used it for making an EKG based on an old Scientific American Amateur Scientist article, and here's a slashdot thread [slashdot.org] about another AD620-based EKG.

My senior design team from College actually went ahead and tried to build the machine featured on OpenEEG. In my experience, we were not capable of getting a signal with a high enough resolution of detecting anything other than "ACTIVE" or "NOT-SO-ACTIVE". But the circuitry provided does..work... after a bit of tinkering. The resistor values are very important. Try to be as exact as possible. Also, shield everything you can from inteference. You'd be surprised how much interference the power lines in your house emit. It will be about around 60Hz, and periodic, if you are picking it up. The DRL portion of the circuit helps to reduce it.

As for analyzing the data it produces, that also becomes difficult. "ACtivity" on an EEG signal could be as small as a uV. Sample it as fast as you can. We used a PIC processor to sample.

Or, you know, you could try to get your hands on some "vintage" oscilloscopes (should be dirt-cheap) and use THEM as basis for your "machine".As a kid, I had more than my fair share of fun with some pretty old ('70s or so) osci's at my dad's workplace (electrical engineering).

When I was in high school I tried to build an EEG system. I started by looking at the heart -- ECG signals are about a thousand times higher voltage than EEG. Even a vacuum tube scope couldn't pick them up though, and certainly couldn't register anything through the 60 Hz hash.

EEG and ECG use some pretty clever tricks to actually get a signal. One of them is taking the difference between electrodes placed on the heart or head and one placed on an extremity.

I think Tektronix made a very sensitive differential amplifier for one of their plugin oscilloscope systems. This might work, but it's not really the best approach. If you have electrical engineering abilities, make a good low frequency differential amp. Chop the output and feed it into the audio input of your computer. Use software to demodulate the chopped signal. (If your audio card has good response down to about 1/4 Hz, skip the chop/demod steps). You now have data on the computer that can be displayed

I remember seeing several designs for this sort of thing back in the 70s or 80s in electronics magazines for hobbyists. I've no idea whether they worked, but it might be worth asking you local library if they have back issues from that long ago (it was pre-world-wide-web, obviously).

I think people used to hook them up to lights and then smoke weed and admire the pretty patterns...

Steve Ciarcia did a system back in the '80s in Byte magazine that I remember primarily because I was reading through it and thought "why's he using batteries and doing so much work to isolate this side of the board from the other?", and then realized the possible problems that could stem from power supply failure or getting RS-232 voltages on to the probe side of the board. But whenever I go back to those old circuits I'm shocked by the complexity of the designs, mostly because we now have a much better arr

Steve Ciarcia did a system back in the '80s in Byte magazine that I remember primarily...then realized the possible problems that could stem from power supply failure or getting RS-232 voltages on to the probe side of the board

This can't be stressed enough, which is why you will often see "not for medical use" disclaimers on the el-cheapo (comparitively) EEG devices out there. I have a copy of that article (somewhere - maybe one day I will stick it up on my website), and from what I remember, it was nothing

I remember Garcia and actually built that ECG circuit back in '87 or so. Didn't have money for the opto-isolators, so i wired it directly to my A/D convertor that was in turn connected directly to my ZX Spectrum. Still used a seperate battery for power, but everything had basically the same ground circuit. I never got any real shocks, just some tingles once or twice, but the fact that it was not completely isolated caused a lot of 50Hz feedback. I had to use a lot of clock cycles in code to clean up the wav

Some years ago I bought a unit from an ad in Circuit Cellar Inc magazine that worked reasonable well given it's very low cost. It had dos drivers that didn't do much more than interface with their custom program for displaying the output but we were able to write our own drivers without to much pain. Maybe your friend could do the same?

Seriously, the subject MUST have full galvanic isolation from the power lines. The reason for this is that in every day life your skin provides a surprising amount of resistance and thus protection from shock. What is safe, 48 VDC, can kill an electrically compromised subject. When you put electrodes on the skin you create a low impedance path into the body. The typical solution for this is to use optical isolation. Check out Dallas/Maxim Semi and others for off the shelf solutions. DO NOT hook someone up to an oscilloscope - one leak in a transformer and they are dead. The other solution is to use batteries, but you have to be careful to limit the available voltage and current from a battery source.

It's not difficult to do, but you're right, it is critical. Use batteries - it's safer, easier and gives a very clean power supply. Opto-isolate, to protect yourself, and to protect your PC from cockups. I haven't seen a nice USB to digital-over-fiber box, but one must exist - has anyone out there found one?

It's not clear to me from your articles whether you actually need ownership. This sounds like the kind of thing you might be able to get some gradstudent at the next medical college interested in. Voila: access to reasonably good and usually well-maintained equipment. Maybe someone is going to get a seniors thesis out of it. Heck, there may even be a way to get some small internal tech-development grant or some such to cover operational costs.