EMG/eeg with arduino?


  • Linux

    http://erkutlu.blogspot.ca/2012/12/eeg-and-arduino-do-it-yourself-eeg-ekg.html?m=1

    Does anyone have any experience building stuff like this?

    Learning and working on learning more!

    0


  • Quick semi-unedited braindump here on the EEG topic, since I don’t have time to organize properly:

    I’ve been interested in this sort of thing for quite a long time. Many years ago I played with a demo version of this thing on DOS: http://www.cnn.com/TECH/9609/18/mind.drive/ I can only assume that it worked via galvanic skin response, since it was a clip you put over your finger. But you could control a crude video game by concentrating. Only took a few minutes to get reasonable responses out of it. Because it is an old-school serial device, I should probably keep an eye out online and snag one to play with. It looks like it can be had from the US Amazon site for about $100, so I could probably go that route and have it moved across the border by a friend.

    I wrote a number of programs for the psych department at the college to perform response-time experiments that would have benefited from this sort of feedback.

    Sparkfun used to sell a kit based on this project. Looks like they don’t carry it any more.

    http://openeeg.sourceforge.net/doc/

    There’s also this article regarding hacking toys that have reasonable parts for this type of work:
    http://frontiernerds.com/brain-hack

    Finally, I have access to a USB based very cool device that claims to use EEG sensors to control a computer. A cow-orker of mine brought it in to work one day after we talked about some of this stuff, he has had it a while but it does not work on modern Mac’s. He wanted to see if I can get any interesting output out of it… It is not mine to give away, but I’d well within scope to bring it into the hack-space and see if we can figure anything out. It did not work very reliably for me, but Jordan was speculating that the problem is that I have too much hair. We planned to re-test with his bald dome, but never had the time.

    @hdsheena what is your projected use-case for it? Some specific dog training thing?

    Anyway, that is all I have for now.


  • Linux

    I’m actually interested in using it for muscle monitoring/retraining for medical applications. I have seen it used in physio and its damn cool… No one here does it that I can find, and vancouve is far!!
    I have two electrodes and we should chat ;)

    Learning and working on learning more!

    0


  • Is this the same thing as electrical muscle stimulation?
    https://en.wikipedia.org/wiki/Electrical_muscle_stimulation



  • @dhylands related but different. I think that this is about reading the signals that the brain sends to tell the body what to do and the signals that the nerves send to tell the brain what is happening. EMS is about sending signals to the muscles to tell them to do something in the absence of signals from the brain. TENS sends signals to the nerves to “jam” the signal that they are sending to the brain to provide pain relief.

    The techniques are powerful when used together, but you pretty much have to do some form of time division multiplexing since if you are transmitting an over riding signal, all you will read at that time is your strong signal, you won’t see the subtle sinal from the brain…

    I have a former classmate in Vancouver who is pretty much a subject matter expert on this topic. He’s had multiple spinal surgeries in an attempt to correct paralysis due to a broken neck. Uses TENS for pain, EMS to avoid muscle atrophy, and several forms of EEG gear to attempt to rewire his brain to recover function where possible through the injury. If we make any progress on wetware hacking I’ll try to contact him and get him involved in the project.


  • Linux

    http://www.advancertechnologies.com/p/muscle-sensor-v3.html?m=1
    Found this randomly. Thoughts? @pierre @dhylands would it be easier to buy than build?

    Learning and working on learning more!

    0




  • I spent a good chunk of this evening working over their schematic. It is a simple arrangement of 5 amplifiers in series. There is an Analog Devices AD8226 Instrumentation amplifier, hard-wired to provide approximately 200:1 gain on the signal coming from the electrodes, then there are all four stages of a Texas Instruments TL084 quad op amp in series in different configurations to smooth, rectify etc the signal.

    The AD8226 is available from Digikey in one-of quantities as a Small Outline IC for $4.06:
    http://www.digikey.ca/product-detail/en/AD8226ARZ/AD8226ARZ-ND/2027816

    The TL084 is worth 95 cents as a Dual Inline Package:
    http://www.digikey.ca/product-detail/en/TL084CN/296-1784-5-ND/277429

    I chose those two form factors because they would fit a proto-shield well.something like this:
    https://www.arduino.cc/en/Main/ArduinoProtoShield

    That leaves half a dozen small capacitors, a dozen or so resistors, and a trim pot. Maybe $2 in misc parts.

    The real advantage of having it as a set of components is that you can adjust the settings at each stage, and even insert a fast ADC between two stages.

    This $70 board does not give you back subtle data, you set a trim-pot to say “this much activity is my threshold” and it gives you a single bit of data to tell you if the threshold has been reached. I’d be much more interested in having multiple levels of signal strength available to be able to compare signal strength over time as you do the physio. You could do it crudely by cascading several of the Advancer boards, but that gets expensive and would require a ton of electrodes on the same area of the body.

    The circuit also runs 18VDC through the muscle under test. I bet multiple boards would interfere with each other. Might even stack in undesirable ways.


  • Holder

    Noise introduced by movement is a huge issue for any biometrics sensor (moving your arm affects the sensor contact and introduces noise), but building your own filter can help mitigate this. This circuit is rectifying the signal, converting the negative cycles to positive so that the entire signal is above 0V (giving you twice the frequency), and it is already smoothing it with a capacitive feedback filter. There is also a coupling capacitor used to block varying DC, but you still might get spikes due to movement.

    I agree that building this simple circuit is much cheaper, and won’t take much time at all to build. Adding other filters to help block out 60Hz and reduce movement noise should be pretty straight forward too.


  • Linux

    I’m still learning and some of these things don’t make a lot of sense to me yet. @pierre and @colin , can I order some parts (or buy them off you/makerspace?) for this and get started? Is that what you’re suggesting? lol

    Learning and working on learning more!

    0

  • Holder

    I can order these for you the next time I buy parts from mouser or digikey. The cost of shipping (~$15) is going to be much greater than the cost of the parts themselves, so it’s good to pool a lot of parts into one order.

    I think it’s a great idea to build this yourself if you have the time and patience. I can help out sometime if you want, and I know Pierre is always around to help out as well.

    Let me know if you want to proceed and I can start ordering some parts.


  • Linux

    Sure. I’m happy to share shipping. I know we might need some parts for some ball droppers soon, too? @pierre and @arasbm know more about what we need, I’ve finally got the working prototype going. I’ll start a thread for “electronic bits to order”?

    Learning and working on learning more!

    2

  • Holder

    Yes, definitely! That’s a good idea, we can do a monthly or annual part ordering thread to save on shipping and save with bulk.

    It’s probably also a good way to cross reference what we have already with what people are looking for. I can’t make it into the Space till the weekend to check, but we may already have some components to donate to this project.



  • I can contribute here. I get better than retail pricing at Digikey, Newark, and Electrosonic, and my orders are almost always large enough to qualify for free shipping. I will be happy to piggyback any Makerspace orders onto my own.

    Brian



  • I know this topic is pretty old now but did anyone actually try and make the arduino emg circuit from the Erkutlu blog?



  • We tried building something, made a bit of progress then stalled. As it happens somebody dropped off a Gould 4-channel recorder unit today or yesterday… It is a 4-channel oscilloscope that can be set up to print, save to disk or output via serial port readings that fall outside a specified range of parameters. They appear to have been popular in medical circles at one point because they could be set up to monitor a set of sensors overnight and make hardcopy of any events that were interesting.



  • Nice!
    I’ve played around with oscilloscopes and emg but I’m trying to build a prosthetic arm so I tried the Erkutlu circuit because it’s small and can be integrated with the arduino (and most of all cheap with parts) but I’ve hit a brick wall with the circuit’s outputs being sporadic and irregular so I was hoping someone had had more luck with it.


  • Linux

    @luke_86 , we should plan to meet up at the space with @pierre and anyone else interested in this project, and make a plan to make some progress! @Nicholas is interested too I think.

    Learning and working on learning more!

    0


  • I only just stumbled across this topic etc. the other day so excuse my ignorance here but I thought this was just a forum? Kamloops maker space is actually a place?? Haha



  • Yeah. We are a building downtown in Kamloops. Across the street from Sticky’s candy shop.



  • Oh wow you guys are in Canada? haha that’s really cool but sucks because I’m Australian sorry I didn’t realise.


Log in to reply