Page 1 of 1

PC Based Pulse Generator; Does it exist or can one be built.

Posted: Sun Jul 20, 2008 2:38 pm
by rodsheffield
I am not exactly sure how to ask this, or if this is the correct forum, so please forgive my ignorance.
This is my predicament. My fiancee requires a TENs unit for her physical therapy. She has to sit and change the settings every so often as prescribed by her therapist. So my question is, does anyone know of a pulse generator that can be set and programmed through a PC that can change the pulse width and voltage as needed at regular time intervals? Or maybe anything like I described. Any help would be greatly appreciated.

Thank you

Posted: Sun Jul 20, 2008 3:05 pm
by MrAl
Hi there,

I would think you would have to find one that is made to be programmed
from the computer or else modify your existing unit using perhaps
a microcontroller that is programmed to communicate with the computer
and operate the various controls on the TENS unit.

I've done something like this a long time ago, but it was for a stand
alone chess computer that i wanted to interface with the computer.
That had 64 plus more operating buttons that had to be pressed via
computer control, so i imagine anything with only a few controls would
be much easier to do.

I have to ask you then, how many controls does the TENS unit have,
and what do they do? Any pots, or just all push buttons?

Posted: Sun Jul 20, 2008 4:37 pm
by jwax
Do I understand that you are contemplating taking control over a TENS (Transcutaneous Electrical Nerve Stimulation) unit?
Sounds dangerous rodsheffield!
Building a PC-based pulse generator sure- but to control electrical pulses to a person? No.

Posted: Mon Jul 21, 2008 8:32 am
by rodsheffield

I don't know that I would call it dangerous, I mean if they are using it for therapy it should not be dangerous should it? I could see form the point of view of using a pulse generator at too high a voltage and current, then yes. However if I am recreating the same regimen that the therapist describes, i.e. 10 minutes on this setting, then 8 minutes on this setting, then 8 minutes on this, I am not sure I see the danger there.


I dont know if there is a unit that is programmable from a pc. Hence my question, if there is such a unit, or a unit that in and of itself can be programmed to do as I described above then I would happily investigate it. I am simply unaware of such a thing, and I want to do everything I can to make her therapy as easy for her as possible.

Thank you both for your input and any other other suggestions you may have.


Posted: Mon Jul 21, 2008 8:57 am
by dyarker
The PC does not have sufficient isolation from the power mains to be connected to a device that has electrical connection to a human body.


If you want to help her, program the PC to beep at setting change time and display the new settings.

Posted: Mon Jul 21, 2008 9:51 am
by Engineer1138
I mean if they are using it for therapy it should not be dangerous should it?
I assume you've never heard of the Therac-25?

As someone who spends his days developing control software for medical instruments, my first question would be "Does the FDA consider this a Medical Device?"

If the answer is Yes, then exit immediately. Forget it, I'd advise that no one touch it with a ten foot Teflon pole. In that case, even Dale's suggestion of timing software on your PC also becomes a Medical Device according to the FDA's definition.

If it's no, then you could be onto something. If you have the need, then probably so do others. If you can figure out how to do this, you may have a usable, marketable product. I'm assuming you've googled for this already? Asked the manufacturer if they have such a unit?
The isolation issue can be handled easily; it's not a big hurdle.

Posted: Mon Jul 21, 2008 10:20 am
by Viking
I think Engineer1138 has it summarised this completely, I can't think of anything to add.

If there were NO chance of getting sued within an inch of your life, then this is a reactively simple thing to make (and make safely, as mentioned, the isolation problem is easily solved).
But if the lawyers get in involved, forget it. At least I'm in a different country, but that's not going to slow them down any.


Posted: Mon Jul 21, 2008 10:37 am
by Bob Scott
I've used a tens unit and my son owns one. These things are super for relieving lower back pain due to all sorts of causes. They deliver medium strength electrical pulses to two electrodes attached to the affected area of the body through the same conductive lotion that EKG electrodes use. The one that I used had adjustable pulse rate and voltage control.

As time goes by, the electrical stimulation seems to decrease as the body gets used to it, so it is necessary to periodically increase the voltage of the pulses in order to maintain the same amount of stimulation. I don't think that a timed increase in amplitude by means of a computer is appropriate here. The timing of the boost in stimulation depends on the user's preference and tolerance for voltage.

Hehe, the unit that I used had a cracked voltage control pot... Go past a certain level and ZAP! Big surprise!

My son Theo's TENS unit is a battery operated portable unit about the size of a pocket AM radio. No USB, RS232 or other port visible. This would probably be a great contruction article: Yet another use for the 555 timer.

Posted: Mon Jul 21, 2008 10:46 am
by haklesup
There are no legal issues even if it is a medical device unless you plan to use it on anyone but yourself. You are allowed to make and try such things on yourself but another person opens liability. Even the advice we give here has no legal encumbrance. Everyone is for all tense and purposes anonymous and have no verifiable credentials. The advice here is ad-hoc and given without any warranty of fitness for use.

If someone were to directly contact the OP and offer to design and build such a contraption, then the legal doors would be wide open.

Moral is, any advice you get on the internet, no matter how reasonable, is user beware. If you take and use advice given anonymously then you accept all risks upon yourself.

I am sure you could find suitable signal generation hardware and software from a company like National Instruments but the interface between that and the final analog output attached to a human is the critical part that protects life. It sounds like an ordinary programmable Arbitrary waveform generator.

By not automating such a device, it requires the user to make any changes while conscious. This prevents any undesired signal from being applied unexpectedly (like say it was mis-programmed or the user fell asleep). A user could immediately turn the dial back to a comfortable setting. Automation precludes user feedback which may be necessary for a comfortable and safe treatment.

You should discuss this project with that doctor to find out if there are any treatment protocols that you are unaware of. There may be a good reason why it operates the way it does. There may also be a more automated equipment that your insurance would not cover, you may be free to pay the difference yourself if you care to. The doctor will know about that.

This sounds similar to those electrical muscle exercisers that were ultimately shown to be not effective, those devices were not medical and could be purchased in any store that would sell them.

You may want to re-post in a general health forum or one for your wife's condition to get more specific advice about the actual treatment and options

Posted: Mon Jul 21, 2008 12:08 pm
by ljbeng
intents and purposes

Posted: Mon Jul 21, 2008 2:23 pm
by MrAl
Hi again,

For the computer to device isolation isnt too much of a problem.
There are various ways to handle this and to be on the super safe
side, double all isolation.

There is one small problem, and that is that computers sometimes
crash, and who knows what code it might put out just before it enters
some unknown endless loop. This would mean implementing some
security codes such as some advanced checksum or whatever.

Even better yet, design a stand alone controller that runs on batteries.
The controller would connect to the TENS unit but not to the computer
or the wall plug. The controller would have EEPROM in it to store the
daily routine, which would get sent to the TENS unit on command.

What i dont know yet is what kind of controls the TENS unit actually
has. I dont have one and so dont know if they have pots or just
membrane push switches for programming. If someone could
fill me in i would have a better idea just how big of a project
a stand alone controller unit would be.
As i said previously, i had made a control program and interface for
a 64 plus switch stand alone chess computer and it's not hard to get
the right switches to be electronically pressed via hardware and
under control of the software (at the time a Z80 uProcessor, not a
microcontroller), but a pot would be a bit harder to interface because
the resistance would have to be varied and perhaps monitored
with an ADC.

Posted: Mon Jul 21, 2008 3:04 pm
by jwax
I can see it coming: "Hey honey, the boys down at this electronics forum and I whipped up a gadget so your laptop will take over your therapy while you, ah, just lay there."
"Don't worry about a thing, I figure this ought to be as safe and dependable as any Windoz-based application there is!"

Please check with the manufacturer, a doctor, and the FDA before proceeding.

Posted: Mon Jul 21, 2008 4:46 pm
by MrAl
Hi again,

There is no setting that can kill you on this thing, is there?
If there was i would have reserves too, but in the absence i would not.