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.

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

    1. 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. 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.

      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. 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.

      4. 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…

    2. 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.

    3. 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.

    4. 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.

    1. That’s magnetic stimulation, which is thought to work by magnetically inducing voltages in the part of the brain the magnetic field is focussed on. Uses very high power. This is direct electrical stimulation, currently without much evidence that it does anything.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.