Apart from achieving 9V, generating the same type of "biphasic" wave with a Picaxe would actually be pretty easy:
<code><pre><font size=2 face='Courier'>
symbol frequency = 10
w0 = 500 / frequency
myloop:
pins = %00000001
pause w0
pins = %00000010
pause w0
goto myloop
</font></pre></code>
The above code will create a 10 Hz square wave. Attach the electrodes to output pins 0 and 1 of the Picaxe. The only limitation, you can run the Picaxe at up to 5.5V, not 9V (this would destroy it), but maybe that already gives the effect you are after?
To get a higher voltage, but keep the circuit simple while still keeping the output signal "biphasic" you could AC-couple the electrodes through two capacitors:
<code><pre><font size=2 face='Courier'>
VCC +18V
+
|
'----------------|
| ____ .-.
| | | | |10k
'--|7805|-. | | 100k
|____| | '-' || ___
| | |------||-----|___|- Electrode 1
GND | | ||
.---' |
.-----o----. |/
| )---|
| | |> 100k
'----------' | || ___
o------||-----|___|- Electrode 2
| | ||
=== ===
GND GND
</font></pre></code>
You supply the circuit with 18V (two 9V batteries in series), and produce the 5V required for the Picaxe through a 7805 regulator. The Picaxe is driving a transistor switch (better would be a Darlington driver, but you may rather have a transistor lying around) - make sure it can handle the necessary voltage.
The lower capacitor is not strictly necessary but I put it in for good measure and also in order to avoid any direct (DC) contact with the 18V which is getting a bit high. Also, DON'T leave out the 100 kOhm (KILO!!!-Ohm) series resistors (you may even want to start with 1 Meg), as they will limit the maximum current to a safe value.
In this case you need only a single Picaxe output (e.g. output 0), and the program becomes:
<code><pre><font size=2 face='Courier'>
symbol frequency = 10
w0 = 500 / frequency
myloop:
toggle 0
pause w0
goto myloop
</font></pre></code>
To vary the frequency, you could e.g. use a Potentiometer between +5V and GND and read in the voltage using readadc10, then scale this value to get the frequency.
Finally, I don't agree with the previous post in that the Picaxe will drain the battery quickly. It uses very little current (around 1mA) for its operation. The consumption only goes up if it has to drive current-hungry loads like LEDs etc., but the proposed circuit doesn't do that (the 10k resistor limits the additional current to less than 2mA). Actually the proposed TTL gate (not the CMOS replacement though) in the original cicuit will use much more current.
Wolfgang
Edited by - womai on 27/05/2007 08:57:04