Building a Transcutaneous Electrical Nerve Stimulation Device in a Weekend

Transcutaneous electrical nerve stimulation (TENS) is a technique that applies electrical current to nerves and muscles for the relief of pain. Before you ask, yes, some of these devices are FDA approved for various ailments. [Eric], [Conor], [Jacob], [lnr0626] and [rdrdrdrd] were down at HackDFW this weekend and built a TENS device from parts in their scrap bin.

A semi-decent TENS machine can cost somewhere between $70 and $200, but the team here have reduced the cost tremendously simply by separating the futzing analog/contact pad part from the signal generation part of the project. The signal generation actually happens on an Android phone, with settings to ‘relieve pain’, ‘relax’, ‘pulse’, and ‘random’. These signals are generated as audio and sent out over the headphone port. From there, the signal is amplified and sent to the neat skin-contact pads.

After prototyping their circuit, the team actually etched a circuit board for the final phase of the hackathon. Demo video below.

43 thoughts on “Building a Transcutaneous Electrical Nerve Stimulation Device in a Weekend

  1. You too can be a Lab Rat in 10 easy steps, and may likely be retarded already if you built one.
    The trouble with bad ideas from ignorant people, is that they don’t go away even after proving its dangerous.

    Heres proof from the FDA you are a retard already:


    Mod edited because Beck. It was originally a Rickroll

    1. Except that TENS is FDA approved (which I just read from the article), I don’t know whether it’s effective, snake oil or plain dangerous, and I have no problem learning about whether something is real or not with support from evidence.

      “The trouble with bad ideas from ignorant people, is that they don’t go away even after proving its dangerous.”

      “Proving”, great, now indulge me with evidence.

      “Heres proof from the FDA you are a retard already”

      Sorry, I meant evidence that it’s been proven to be dangerous. Now I’m unsure if your pointless rant was trying to be funny, smartass, or just displaying the ignorance you funnily enough tried to denounce.

    2. Now *that’s* contributing something to HAD in a meaningful way! Drop insults, offend large groups of people without meaning to (I’m giving you the benefit of the doubt there), say nothing useful, and try to rickroll people in a method so poor that it doesn’t even work (oops!).

      I, for one, just can’t wait to see if you ever contribute something meaningful. I think I’ll go grab a beverage and some popcorn… this might just take a while.

      If I had to guess, you’re offended by the idea that applying electrical current through a homebrewed interface is acceptable, and you’re super-knee-jerking that someone somewhere might just go around chewing on live electrical cords in an effort to achieve similar results without so much work? You know what, there *are* concerns and precautions to be taken *very seriously* with project such as this. Anyone who undertakes such a project does so at their own peril, and the smart ones will incrementally test multiple times along the way before arriving at a complete project. The dumb ones, well, they’ll be the chlorination in their own gene pool.

      But you didn’t actually say anything like that. Instead, you just babbled some gibberish and tossed around some offensive language and succeeded only in amusing yourself.

      If that was your goal, congratulations. If that’s going to continue to be your goal, then please go bother Slashdot or something. You’re not offering anything useful here.

      P.S. Yes, I know I just fed the troll. But even trolls need to be called to account, publicly. So there you go.

      1. For reference, the above post (and the ones by [andrewjhull] and [Cricri]) was/were originally a reply to a rant that ended up being deleted by the mods. Thank you, mods!!!

    3. As an electrical engineer, I’m not the target audience for snake-oil magnets-are-magic BS treatments. I can quite categorically state that TENS units DO NOT “help the body produce its own endorphins”, “increase local blood flow”, “kill bacteria and parasites in the body”, “raise pH levels to remove acidic environments in the blood”, or “allow healing lymphocytes to do their job properly”. And you definitely CAN NOT “change your [TENS] device into a medical device to cure diseases” by replacing a couple of resistors and capacitors.

      But the fact that the stupid and/or evil are making such claims does not stop TENS units from doing the one thing they actually CAN do: zap you with electric pulses.

      Our nerves are biological wires, through which electric signals flow. Those signals flow in both directions, some (for example) carrying signals to move a muscle, others carrying sensations back to the brain. So zapping nerves with electric pulses can have two effects: it can cause muscles to contract – you might recall an early experiment where they used electricity to make a frog legs twitch, which inspired Mary Shelley to write ‘Frankenstein’ – or it can interrupt the sensory signals heading to the brain.

      That second thing reveals the legitimate use of TENS units: the electrical signals can interrupt pain signals. Pain signals are usually a good thing, telling your brain that something is not right. But they can be a bad thing too, especially when the brain is inundated with false signals, as can happen when injuries harm the nerve pathways in a way that doesn’t quite sever the nerves, resulting in ‘crossed wires’ that send unwanted motor signals to the muscles and organs (causing spasms, twitches, cramping, etc) and/or send unwanted and spurious pain signals to the brain (which, for people dealing with that sort of chronic untreatable pain, sucks.)

      As someone who has a spinal-cord injury, TENS is part of my therapy. It doesn’t do anything magical, it doesn’t ‘fix’ anything, and it sure as hell doesn’t kill bacteria or alter my blood pH levels. But it does blanket the affected nerves with repeating pulses that drown out the spurious pain signals for a while, which to a chronic-pain patient is like air to a drowning person. That’s all a TENS unit does, which is why they were approved as a medical treatment decades ago. Nowadays people can make their own TENS units out of Arduinos and spare parts, and they can make all sorts of nonsense claims about the healthy effects the devices can supposedly do. This makes rational people think the entire subject is nonsense, which is a shame because for people who use TENS as part of a medical treatment plan, TENS is a sanity- and/or life-saving tool that gives us a few hours in the day where we are NOT being inundated with spurious pain signals.

      Part of being rational is accepting evidence, even when we don’t particularly like the evidence. Despite my skepticism I, like many other chronic-pain patients who are waaay past the reach of nonsense ‘cures’ and placebo effects, have evidence that TENS units have a valid medical usage. The medical industry, which never made any of the weird claims we hear now that there are ‘As Seen On TV’ TENS units and Arduino-powered TENS units, also found evidence that TENS is a valid treatment for _specific kinds of chronic neuropathic pain_, like that which accompanies a crushing spinal injury such as my own. TENS has also been used to block spurious outward-bound signals for the treatment of _the symptoms_ of Parkinson’s, MS, epilepsy, and other nervous system disorders that cause chronic unwanted activity in muscles and organs.

      Electric pulses. Nothing more, nothing less.

  2. @LOL – RickRoll fail of the century.

    As to building a cheaper TENs machine, a quick look on t’ interwebs (fleabay of course) will get you a non FDA approved TENS for less than the cost of a Starbucks. Lab rats not withstanding I suspect the hackathon device was no more (nor indeed less) dangerous than a cheap’n cheerful chinacrap one. There is only so much damage you can do with a couple of AAA cells and some wire, killing yourself for example by strapping it across your pacemaker (or blasting off your honourable member by strapping it to your nether regions ).

    The basic idea of TENS pain relief seems to work however, so if used with care I suspect the hackathon device might be interesting. I didn’t see any mention of a circuit diagram. Why is this? Are they planning on trying to patent this moble-attached-iot-thing-that-has-been-done-better-1000-times-before or turning it to a Kickstarter?

    1. I just thought it worth sharing the more exciting details of the “chinacrap” ebay device.. “You can enjoy the Magical Experience of using the electric current to stimulate the nerves on your body. It Must be Amazing!!!” … worth the $6 just for all that magic power (and the exclamation marks).

    2. “I suspect the hackathon device was no more (nor indeed less) dangerous than a cheap’n cheerful chinacrap one”

      Most of the chinacrap devices are fakes that don’t do anything. The ones that do -are- potentially very dangerous.

      It’s possible to cause yourself arrythmia even with two AAA batteries very easily if you strap the device across your chest and/or your back and omit all current limiters from the circuit, crank it up to full power. This is why approved TENS machines are limited to between 5-8 mA output current which is also the human treshold for pain.

      1. ALL,

        Not clear – sure where Dax’s info came from. Approved TENS can output 50 – 75 V peak to peak (varies) AC into a 500 Ohm (obviously varies as well) with current capability from 30 to 55 mA. OSHA safety regs require GFCI’s to trip (activate) at currents as low as 6 mA, but that is for 110/120 V AC.

        Properly designed – functioning TENS have isolated channels so both channels are NEVER ‘ON’ at the same time.

        Commercial TENS and EMS products when used as intended are safer than any home brewed / modified / improvised device.

        Not only do I have a prescribed expensive EMPI TENS product which I use for pain relief (it confuses the nervous system / brain and/or via repetitious stimulation, producing nerve / brain ‘boredom’, I also have an equally expensive e-stim device intended to produce pleasing (erotic) stimulation and/or discomfort as the user – operator wishes. The medical TENS is harder to program-operate to produce pleasurable sensations, but it can be & does feel GOOD.

        I teach classes and give demos using TENS-EMS and commercial e-stim products. My main emphasis is always how to enjoy pleasurable &/or attention getting e-stim SAFELY!

        I do NOT want people overstating ‘risk’ NOR do I want anyone claiming there is no risk/danger and/or home made devices are completely safe.

    3. While I realize that the reference to sticking a TENS unit’s electrodes on your penis was probably a joke, it’s important to note that this is actually safe (albeit fairly painful).

  3. home brew TENS units were fairly commonplace back in the early 90s (and probably before) back when I was a serious hardware hacker. I built one for about $10 using scrap bin parts, then the most expensive part was the $10 radio shack enclosure (leads and pads were available at any hospital pharmacy for $5). This all was pretty common, everybody was making them…

    I’m just wondering why this endeavor is HaD post worthy…

    1. Yup. For me it was a PC running DOS, a Borland C program to produce signals over the parallel port, a 12VDC power supply, a MOSFET, a resistor or two, and a tiny Radio Shack audio isolation transformer. For pads I used cloth, soaked with homemade electrode jelly (water boiled with corn starch and salt). Using software PWM to control power and frequency, it could produce anything from a soothing buzz, to tetanizing a muscle completely. Don’t do that to yourself, it hurts. But it’s great fun to do to the person at a party who got way too drunk, acted an arse, then passed out cold. The frequency could be turned up past that of most commercial TENS, I recall it produced some really weird sensations at 200hz or so.

      Haven’t seen a DIY TENS in a long while now. Still a fun project.

      1. “Don’t do that to yourself, it hurts.”

        And you also develop muscle tics. It also does something to the nerves that makes them less sensitive to real signals from the brain, making the muscle feel weak for hours afterwards.

        I know because I did it to myself. This is the reason why approved TENS machines have current limiters and timers to stop you from overdoing it.

        1. Luckily we did current limit the device to at most 7mA with a hard short. We actually exactly reproduced the waveform output of a commercial TENS machine with peaks at roughly +-50 V.

    1. Or sexually, but without turning it up to the point of pain, and involving no BDSM whatsoever. See the “Slightest Touch” for an example of a device marketed for that purpose. Though there appears to be nothing particularly special about that device that makes it more suitable for the purpose, so I followed their directions but with an ordinary TENS at limited power, and tested their claims on two partners. One it did absolutely nothing for, but for the other, there were many positive outcomes in quick succession. YMMV.

    2. Well, the warning about the danger of “blasting off your honourable member by strapping it to your nether regions” WAS obviously issued for a reason…

    1. The business end of the circuit seems to be a very simple boost converter with a FET switching a coil against the ground, and directing the resulting self-induced voltage spike through a diode towards the pad.

      There’s a bunch of capacitors and a resistor against the ground after the diode to filter, soak and bleed off excess energy – or to provide a load if the circuit isn’t connected or the pads are shorted. Two such circuits fire in turns with the person connected in between, sending high voltage pulses alternating in both directions.

      It’s like a push-pull version of the traditional doorbell shock buzzer circuit.

      1. Almost correct. We are using a positive and negative boost converter to create a ~150 V potential from two nine volt batteries. We are then using an amplification circuit to amplify the waveform output from the phone. This allows us to reproduce precisely any waveform we want. We matched the output of a comercial TENS machine rather precisely.

        We also built in current limiting with a max pad to pad short current of 7 mA.

        1. Do you have the full schematic for this somewhere?
          and a source for the pads?
          I’d really like to build one of these for my father
          I was thinking of replacing the android phone with a VS1053 / ARM

    1. Luckily, this works with any device with stereo audio out. You could run it off a record player if you wanted. Additionally, you don’t buy a smartphone to run the device, you buy the device because you have the smart phone.

  4. We custom design those for doctors. Be careful, there are a lot of things that can go wrong and if you don’t know what you are doing you can hurt someone, or worse. Just a few _micro_ amps across certain organs can damage them. About 3/4 of our circuit design consists of safety circuits and failsafe designs.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

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