Transcutaneous Electrical Nerve Stimulation (TENS) is one of those things that sounds like it must be woo when you first hear of it. “A trickle of current that can deal with chronic pain better than the pills we’ve been using for decades? Yeah, and what chakras do you hook this doo-hickie up to?” It seems too good to be true, but in fact it’s a well-supported therapy that has become part of scientific medicine. There are no crystals needed, and you’re applying electrodes to the effected area, not your chakras. Like all medical devices, it can be expensive if you have to buy the machine out-of-pocket… but it is just a trickle of current. [Leon Hillmann] shows us its well within the range of hackability, so why not DIY?
[Leon]’s TENS machine is specifically designed to help a relative with hand problems, so breaks out electrodes for each finger, with one on the palm serving as a common ground. This type of TENS is “monophasic”– that is, DC, which is easier than balancing current flowing in two directions through quivering flesh. The direct current is provided at 32 V to the digit electrodes, safely kept to a constant amperage with a transistor-based current limiting circuit. The common ground in the palm is pulsed at a rate set by an ATmega32U4 and thus controllable: 14 Hz is given as an example.
Obviously if you want to reproduce this work you’re doing it at your own risk and need to consult with relevant medical professionals (blah blah blah, caveat gluteus maximus) but this particular sort of medical device is a good fit for the average hacker. Aside from prosthetics, we haven’t seen that much serious medical hacking since the pandemic. Still, like with synthesizing medical drugs, this is the kind of thing you probably don’t want to vibe code.

If you are going to use this on anyone but yourself even without charging anyone for it (pun intended), you might want to make sure your relevant legal authorities have a history of “looking the other way” and not enforcing “practicing medicine without a license” rules on situations like this. You don’t want some prosecutor who is looking for another notch on his belt to use you as an example.
“Here, let me massage your sore arm.” | “You should take Tylenol for that headache.” | Etc.
so long as no one is injured, no one will ask questions :)
If you want to induce currents in a human body I suggest you start on yourself and on your head.
Also: Make sure your device’s power supply can provide plenty of power w little ripple. Use a big old output filter cap. It really can’t be too big. Repurpose a 1000 Watt PC switcher.
Momentary contact switches are for pussies.
You’ll just flip the toggle back off when done.
Don’t skimp on the skin contact goo, if you do it right, your only going to need one use.
I really have to find a “filter comments of user XYZ on HaD” extension for my browser. Absolutely no value in your replies across the last few topics.
Stupid bitching is why you come here.
You could take some of your valuable time and look through my comments on HaD. I don’t switch my username. I’d bet money you’ll find more “stupid bitching” in your last 10 comments than in all of my comments combined on this site haha.
Anyway. Have a great weekend. XoXo
Ignore trolls and report inappropriate comments. They want the attention for some odd reason, so starve them of it.
Except the good kind of course:
Block Key Components Function
Control ATmega32U4, crystal, ISP header Generate PWM pulses, manage timing
Hippie!
I bet the device channels energy at a specific frequency or something..
A much more useful would be the biofilm disruption level voltage and current to put across a deep wound.
I mean, it’s not likely to actually kill anyone.
Without seeing the schematic or the code it’s hard to tell.
But it’s still mildly amusing/terrifying just seeing the layout. What happens when the victim touches USB ground with the other hand? What about electrode polarization from net DC? Is it low enough power density to avoid electroporation? What happens when that unprotected FET fails?
Ya but there are lots of scammers that sell to cancer patients someone came up to me to join them in making them. They where selling them for thousands of dollars it just made me sick thinking about the hope they tried to push.
Its powered by a lipo battery, the usb port is only for charging it and i am sure should not be connected during use.
I too am sure it should not be connected during use, but there is nothing to prevent the user from doing just that. The first time, anyway.
Back when I worked at sparkfun I was obsessed with TENS unit laser tag and built some crude prototypes. Couldn’t get anyone else excited about it…
This is why some things are regulated. With no actual xformer to get true isolation all it’s gonna take is one of those caps to short one day to loose your isolation.
lose
Since this is only a single output TENS device, isolation is legally not required. An ESD event killing that bottom FET might be unpleasant though.
Oops, didn’t see this is powered by an externally accessible USB input. I assumed an internal battery like most TENS devices of this caliber.
it runs on a lipo battery, the usb port is for charging
Maybe you could us it like this: –. — .- .– .- -.– .–. .- .. -.
GOAWAYPAIN
There is still the matter of application. Surgery is also well supported by science, but I wouldn’t let just anyone wield a scalpel.
After all, lay people are pretty bad with confirmation biases and plain delusions, so they end up drinking silver water and turning themselves into Papa Smurf – while still insisting it’s solving some health problem for them. Passing random amounts of electrical current through your body on a regular basis may likewise alleviate symptoms on a placebo effect alone, and later develop into nerve damage, but the “patient” still insists on the treatment.
Take a look at Amazon… you can get lots of units available, starting at $20. You can also get electrode pads as well. Heck, Dick Smith Electronics also used to sell a TENS kit.
I ended up taking an older device home (we used to make TENS cables until China captured the market)
You can also buy colloidal silver on Amazon.
It’s funny to read “I wrote firmware..” in a ChatGPT slop summary. Who wrote the firmware? An LLM probably had its virtual appendages in that as well.
And what’s that intended to say:
“A simple LDO wouldn’t cut it, because once the battery dips below 3.3V, the logic rail would collapse.”?
Had the author not chosen TPS55340 with internal 5A current limiting, an ATmega32U4 connected straight to VBAT would run just fine at 8 MHz across its 2.7-5.5V supply range, assuming BODLEVEL is set appropriately or disabled altogether. None of the components on the board look like a 100 µH inductor with a saturation current of 5A or more (you might be able to fit 1.5-3.3µH int what’s shown), so my guess is with the microcontroller connected straight to VBAT hammered with 5A load transients at power-up, it just glitched and restarted. That’s assuming this was even tried and we’re not just looking at made-up claims.
So we’re limiting the current? To what value? What does the application require and what are the mandated safe limits? For comic relief, let’s toss that prompt into ChatGPT, and lo and behold:
“IEC 60479-1 specifies the safe limits of current that humans can tolerate without serious harm. The standard provides the following general guidelines:
Threshold of perception: The lowest current that a human can feel, typically around 1 mA (milliampere) for AC and 5 mA for DC.
Let-go current (the point at which a person can no longer voluntarily release the electrical contact): For AC, this is around 10-20 mA, and for DC, it’s slightly higher at 50 mA.
Threshold of fibrillation (a potentially fatal situation): The standard suggests that currents above 30 mA (AC) or 50 mA (DC) can cause fatal effects, especially if sustained for more than a few seconds.”
So at 32 V, 10 mA (that’s 0.32 W output), where exactly do we need a DCDC converter with 5 A peak current? I’ sure LM2733XMF with 1A switch current limit and an equally small 10 µH inductor would have been just fine (datasheet lists a 30 V 110 mA configuration for starters).
But then again, that doesn’t provide proper isolation to protect against a dodgy USB adapter.
There’s a multitude of reinforced isolation DCDC products out there, so I’d like to conclude with an example:
WE PPTI (1209 form factor) 750343725 (1:3.9) + Ti SN6505B or SN6501 transformer driver with doubled output voltage provides low capacitive coupling and reinforced isolation. The output voltage can be tuned with a small primary-side SEPIC converter across 2.3-5.5V for ratiometric output. There still needs to be current limiting on the output, but it’s going to be a lot safer than relying on a bit of insulating tape in a low-cost USB-C charger block.
The main difference is that AC causes your muscles to lock up, while DC causes the nerves to become unresponsive, i.e. paralyzed. Pulsed DC however is a bit of both depending on things like frequency and duty cycle, so the lower of the two safety thresholds should be assumed.
There used to be a misconception that DC power was more dangerous, because people would grab a low voltage cable going to a brushed DC motor, rotary converter, “vibrator”, or some other piece of old DC-DC conversion kit and get their hand caught by the strong ripple voltage caused by the commutators and inductors. What should have been “safe DC” was actually carrying AC on top.
Don’t you rely on a bit of insulating tape of a USB charger every time when touching a conductive phone case or the metal shield of the cable?
To a degree, yes, which is why those are so bad on their own. But it’s much worse when you have electrodes connected to your skin because those usually give much lower resistance by design than a simple touch would – like the conductive gel on EKG electrodes. I didn’t see any details on electrodes used for this project so can’t say anything for sure about them, but definitely doesn’t inspire confidence.
TENS devices use conductive pads and gel to lower the skin’s resistance and spread the current over a larger area, so you don’t burn yourself. Putting the current through a small point contact would be painful.
That also makes the devices pretty dangerous if they aren’t properly isolated. Normal skin resistance is from several hundred Ohms to kilo-Ohms. The TENS pads lower that to 10-20 Ohms, which means you can get harmful currents going through you even from low voltage sources, such as 5 Volt USB.
I am always in favor of people exploring and developing their own solutions…
But I do object to copy like “it can be expensive if you have to buy the machine out-of-pocket”, when many commercially available units are in the 20-60$ range. There are clinical grade units in the many thousands of dollars price range, but low cost alternatives abound.
For example, on Amazon the “AUVON Rechargeable Digital TENS Unit Muscle Stimulator with 600 mAh Battery, TENS Machine with 8 Customizable Modes, Electric Massager for Shoulder, Back Pain Relief, 6 TENS Pads, A Carry Case”. Presently 22$, normally 35$.
Huh, just looked on amazon and was surprised even not random letter chinese aliexpress brand units from reputable sources aren’t that expensive. I mean I have no use for one but those certified units may be a safer bet after all :)
I’m really tempted to get one of those just to tear it down to see how bad it is.
They’re not really expensive though… They were £20 in Boots 15 years ago. Boots, for those of you in the US, is the UK’s most reputable pharmacy chain.
TENS units are not expensive. Mine was less than $40 on Amazon.