Transcranial Electrical Stimulation With Arduino, Hot Glue

The advance of electronic technology has been closely followed by the medical community over the past 200 years. Cutting edge electronics are used in medical imaging solutions to provide ever greater bandwidth and resolution in applications such as MRI machines, and research to interface with the human nervous system continues at a breakneck pace. The cost of this technology – particuarly in research and development – is incredibly high. Combine this with the high price of the regulatory approvals necessary for devices which deal in terms of life and death, and you’ll find that even basic medical technology is prohibitively expensive. Just ask any diabetic. On the face of things, there’s a moral dilemma. Humanity has developed technologies that can improve quality of life. Yet, due to our own rules and regulations, we cannot afford to readily distribute them.

One example of this is that despite the positive results from many transcranial electrical stimulation (TCS) studies, the devices used are prohibitively expensive, as are treatment regimens for patients. Realising this, [quicksilv3rflash] decided to develop a homebrew, open source transcranial electrical stimualtion device, and published it on Instructables. Yes, that’s the world we’re now living in.

It’s important to publish a warning here: Experimenting with this sort of equipment can easily kill you, fry your brain, or have any number of other awful results. If you don’t have a rock solid understanding of the principles behind seperate grounds, or your soldering is just a little sloppy, you don’t want to go anywhere near this. In particular, this device cannot be powered safely by a wall-wart.

To be honest, we find it difficult to trust any medical device manufactured out of modules sourced from eBay. But as a learning excercise, there is serious value here. Such a project requires mastery of analog design to avoid dangerous currents being passed to the body. The instructions also highlight the importance of rigorously testing the device before ever connecting it to a human body.

The equipment is based around an Arduino Nano receiving commands from a computer over serial, fed by an application written in Python & PyGame. To think, this writer thought he was being bold when he used it to control a remote control car! The Arduino Nano interprets this data and outputs it over SPI to a DAC which outputs a signal which is then amplified and fed to the human brain courtesy of op-amps, boost converters and sponge electrodes. The output of the device is limited to +/-2.1mA by design, in accordance with suggested limits for TCS use.

It should be noted, [quicksilv3rflash] has been experimenting with homebuilt TCS devices for several years now, and has lived to tell the tale. It’s impressive to see a full suite of homebrew, opensource tools being developed in this field. [quicksilv3rflash] reports to have not suffered injuries from the device, and several devices have been shipped to redditors. We’ve only found minimal reports on people receiving these, but nothing on anyone actually using the hardware as intended. If you’ve used one, get in touch in the comments.

It goes without saying – this sort of experimentation is dangerous and the stakes for getting it wrong are ludicrously high. We’ve seen before what happens when medical devices malfunction – things get real ugly, real fast. But hackers will be hackers and if you were wondering if it was possible to build a TCS device for under $100 in parts from eBay, well, yes. Yes it is.

31 thoughts on “Transcranial Electrical Stimulation With Arduino, Hot Glue

    1. Factually we know fuck all about how the body/brain work. We seem to be fairly decent at surgery, mainly because of the thousands of years of practice.
      Modern medical science is less that fifty years old. That is if you start counting from the first heart transplant.
      Recently this was discovered
      http://www.sandiegouniontribune.com/business/biotech/sd-me-lungs-blood-20170322-story.html
      Challenging a long-held model about how blood is formed, a study led by UC San Francisco researchers has found that the lungs play a crucial role in the process, producing half of blood platelets and also storing blood-forming stem cells.

      And this
      https://www.sott.net/article/311065-The-brain-has-its-own-immune-system
      Recent research shows basic anatomy that has eluded scientists and clinicians up until this point: the brain has a lymphatic system, one of the primary purposes of which is to connect it to the immune system.

      Eventually this exchange from SLEEPER will be proven correct

      Dr. Melik: This morning for breakfast he requested something called “wheat germ, organic honey and tiger’s milk.”

      Dr. Aragon: [chuckling] Oh, yes. Those are the charmed substances that some years ago were thought to contain life-preserving properties.

      Dr. Melik: You mean there was no deep fat? No steak or cream pies or… hot fudge?

      Dr. Aragon: Those were thought to be unhealthy… precisely the opposite of what we now know to be true.

      Dr. Melik: Incredible.

    2. Like every other brain study, there are mixed results.
      I knew a guy who participated in a university TMS study, and it certainly did seem to have poorly documented long term detrimental side-effects similar to a mild concussion euphoria. From a medical perspective it is not harmless, and should not be done by amateurs given the number of unknown variables.

      People are biased by placebo effects, and indeed 30% of snake oil customers will swear it works.
      Personally, I am not impressed by a home lobotomy kit.

      1. This says it all
        https://en.wikipedia.org/wiki/Replication_crisis
        The replication crisis (or replicability crisis) refers to a methodological crisis in science in which scientists have found that the results of many scientific experiments are difficult or impossible to replicate on subsequent investigation, either by independent researchers or by the original researchers themselves.[1] While the crisis has long-standing roots, the phrase was coined in the early 2010s as part of a growing awareness of the problem.

        Since the reproducibility of experiments is an essential part of the scientific method, the inability to replicate the studies of others has potentially grave consequences for many fields of science in which significant theories are grounded on unreproduceable experimental work.

        The replication crisis has been particularly widely discussed in the field of psychology (and in particular, social psychology) and in medicine, where a number of efforts have been made to re-investigate classic results, and to attempt to determine both the validity of the results, and, if invalid, the reasons for the failure of replication.[2][3]
        According to a 2016 poll of 1,500 scientists reported in the journal Nature, 70% of them failed to reproduce another scientist’s experiments (50% failed to reproduce their own experiment). These numbers differ among disciplines:[4]

        chemistry: 90% (60%),
        biology: 80% (60%),
        physics and engineering: 70% (50%),
        medicine: 70% (60%),
        Earth and environment science: 60% (40%).

        In 2009, 2% of scientists admitted to falsifying studies at least once and 14% admitted to personally know someone who did. Misconducts were reported more frequently by medical researchers than others.[5]

        1. You would think you would replicate your own experiment at least once before publishing.

          The irony is that even though I’m a lowly engineer, we have to replicate our “experiments”, often by validating results by a gauge R&R study (of measurement methods), and ensuring a certain Cpk is met to ensure you process is in statistical control. There is an entire area known as DOE to reduce iterations and help find optimum values. So even though I expect a loft of soft science in psychology and such, I’d think we would have a higher replication rate in chemistry and physics, with somewhat lower rates in biology & medicine.

          1. Ever spend a few weeks reading Retraction watch?
            http://retractionwatch.com/
            Example
            How many scientists admit to questionable research practices?
            Sure, everyone knows it’s not a good idea to falsify data. But what about somewhat lesser offenses that also undermine the reproducibility of your findings, such as only publishing studies that “work,” and reporting an unexpected finding as something you had predicted from the beginning? In 2012, a survey of more than 2,000 psychologists based in the U.S. found that most admitted to adopting at least one “questionable research practice.” But would psychologists in other countries say the same? (Answer: Yes.) A group of researchers led by Franca Agnoli at the University of Padova posed this question to 277 Italian psychologists; their results appear in PLOS ONE.

        2. Not even slightly surprising, especially with respect towards psychology/sociology – fields which have a significant problem in finding reliable control variables given the continually fluctuating nature of humanity and our systems of institutions and cultural values. That’s why the quantitative vs. qualitative schism is so prevalent in those disciplines. Most either believe in quantitative analysis and reproducible or they are qualitative analysts. Few ever try to truly bridge the two worlds due to bureaucratic barriers and university departmental preferences.

      2. At least for tDCS (transcranial direct current stimulation), the most tested mode, at a current limited to 2mA (my hardware limits current at 2.1mA) “Reproduction of these protocols across a wide range of applications and subjects, has resulted in only isolated published reports on injury, limited to (acute) skin irritation under the sponges such that current tDCS procedures are considered “safe” “. Source https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2754807/

      3. So if someone can snub his/her toe on whatever that is equivalent to a guillotine?

        Lobotomy is serious stuff permanently destroying the targeted brain tissue and is used very seldom today due to the serious side effects. This isn’t even close to something as serious…

    3. TCS is very poorly understood. While many promising studies have been published or are underway showing positive effects on different disorders (depression, addiction, OCD, etc.), it would be foolish to conclude that even working within approved limits for current injection couldn’t cause immediate harm or more subtle lasting negative cognitive effects.

      For that reason, even though this is low-hanging fruit for neuro-hacking, I would advise not attempting to do any sort of self-treatment or meddling with TCS (at least until the neuroscience is more fully understood) as you could wind up schizophrenic in a year or something.

    4. Kind of. The most studied variant is transcranial direct current stimulation, tDCS. It’s been approved by the FDA to treat depression, anxiety and insomnia (source https://www.fisherwallace.com/pages/transcranial-direct-current-stimulation ). There are scattered studies that report various cognitive enhancements with tDCS, but Wikipedia says ” tDCS appears to have some potential for treating depression.[1][2] However, there is no good evidence that it is useful for cognitive enhancement in healthy people,[3][4] memory deficits in Parkinson’s disease and Alzheimer’s disease,[5] schizophrenia,[6] non-neuropathic pain,[7] nor improving upper limb function after stroke,” and the Wikipedia editors’ hive-mind has a pretty reasonable / healthy level of skepticism. There are lots of promising-looking individual study results with TCS and various types of cognitive enhancement, though.

    5. Transcranial alternating current stimulation (tACS), or TCS as it’s referred to here, is a signal entrainment method used to explore the relationships and purposes of various operative frequencies detectable in brain waves. In of itself it doesn’t technically possess direct benefit however it’s a very useful tool for scientists to conduct research into subjects such as Parkinson’s.

      Transcranial magnetic stimulation (TMS) is used for both exploration and treatment with it’s benefits toward manic depression gradually becoming understood. A TMS device could be very dangerous as a DIY project, however, as the energy emissions are powerful enough to make your arm or fingers jerk if an emission is aimed at the central sulcus of the brain, giving it the potential to cause injury.

      My thesis was on the subject of tACS usage as a potential method of interfacing with prosthetics, so I’m always really excited when it’s discussed outside of the usual medical crowd.

      1. Two steps up from trepanning. Electroconvulsive therapy is in between. Tongue in cheek, of course; in reality, at least for transcranial direct current stimulation, the most tested mode, at a current limited to 2mA (my hardware limits current at 2.1mA) “Reproduction of these protocols across a wide range of applications and subjects, has resulted in only isolated published reports on injury, limited to (acute) skin irritation under the sponges such that current tDCS procedures are considered “safe”. Source https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2754807/

        1. “Trepanning” is still done today to relieve pressure on the brain, ECT is still done today for a large amount of indications including otherwise untreatable depression. Both those are done under anesthetic and are considered operations, both those are also known effective.

        2. Yeah sure and you will never find a registered neurologist that will publicly state that it is safe. Why is that, because perhaps it is a stupid think to do to yourself?

      2. Mr. Day’s comments above state that even the professional device in the proper hands gives some results that are unanticipated and undesired, and essentially it is experimental. Hazarding a guess that experimental use could trigger seizure renders this NOT a device for the hacker to experiment with. I don’t have experience with transcranial neurostimulators, just one intracranial neurostimulator used in surgery.

        Invite you to calculate for yourself how many might be putting themselves at risk toying with such a homemade medical device.

        7.4 Billion people on Earth. Estimate what percent are hackers reading that article whom built one. Of those that built it what % built it right, what % built it wrong (by error, poor substitution, or skipping isolation)? Of those that built it what % know how to operate it properly, what % do not operate it properly (as in turn it up like one does a volume control when do not immediately see the desired effect).

    1. Cellular mitotic inhibitor devices do work for some tumors, and have results that can be replicated in a Petri dish.
      Note, this technology has nothing to do with TMS.

  1. onetime I taped some ps2 mouse wires to my head to control the mouse, I yanked them off soon after booting up the computer while yelling some explitives. It was a shocking dissapointment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s