TENS modification

how do i modify this circuit so i can control it with a PWM signal from the arduino instead of the 555 Timer IC ?

555-Timer-IC.jpg

High-Frequency-Tens-Machine-Wave-Asymmetrical-.jpg

Take the first circuit on this page:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
Remove the diode and the motor and substitute your two pads and resistor / LED.

thanks, your idea really helped, but for muscle stimulation i need a way to change frequency in the 0-150 Hz range, the arduino pwm pins output a default 490 Hz and it is too much. Any functions to change that? or maybe some hardware tweaks to the circuit?

P.S.
i also need a way to change voltage and current, i could probably do that with resistors or potentiometers, but in muscle stimulation frequency is more important

P.P. S
here is the diagram of the circuit as it is now. as you can see i have 4 sets of electrodes (meant for 4 muscles) and they will be programmed to work in pairs (will probably use only 2 pwm pins instead of 4). Also i'm using mosfets instead of transistors

i need a way to change frequency in the 0-150 Hz range, the arduino pwm

Just google:- arduino pwm frequency change

i also need a way to change voltage and current

No the voltage output from the arduino is a fixed logic level. The current output depends on the load.

here is the diagram of the circuit as it is now.

Thanks

as you can see i have .......

Sorry I can't make head nor tale of that schematic. Too many loose ends, what is connected to what?

Just google:- arduino pwm frequency change

did it before asking, all i can find is how to change the frequencies to specific values like 30, 61, 122 Hz. I need the frequencies in between, in order to fine tune the stimulator so as to get the adequate muscle response. In other words i need to change the values in real time.

sorry about the schematic, is this version better?

Well this tells you.

Note the frequency is not continuously variable, its resolution is the least significant bit in the counter. Maybe you are not understanding the examples.

That circuit :-

  1. Needs a common ground with the arduino.
  2. Is 9V enough to work for a TENS?

Ok i'll read into this and try to understand it lol

That circuit :-

  1. Needs a common ground with the arduino.
  2. Is 9V enough to work for a TENS?

The working circuit is right next to me on a breadboard, and i have a common ground, just forgot to show it in the schematic.
9V is more than enough for a Frog muscle tens (yes, i'm torturing frogs in our lab at med school) even 400mV-1V will work (that's why i asked how to reduce the voltage). Theoretically it is enough for human muscle too, nerve fibers operate at 60mV-90mV and for muscles it's generally a bit higher but varies depending on the muscle.

I see i did not know it was a direct connection, I thought it was going through pads.

That circuit only gives a voltage / no voltage, is that what you want? I would have thought you needed a voltage and then the reverse a bit like a motor running in either direction. You need a h-bridge circuit for this.
The simplest way to drop the voltage is to use a potential divider on the output.