Analog circuitry and sensors often need to operate from a voltage that is greater than the PICAXE supply. I have found a free-running PWM output to be a useful means of generating such voltages. For example, I needed about 9 volts to operate an AD 590 temperature -to- current sensor from a 5 volt PICAXE supply and was able to obtain this using two 10uF capacitors and two Schottky diodes, connected in the standard voltage doubler configuration and driven from a 50:50 PWM output.
This arrangement has no problem providing 9.5 volts (drop is due to series the diode) at 2mA. The frequency of operation does not seem to be critical, with 10 KHz giving about 2mV of ripple. Increasing the load to 4mA reduced the supply to 8.7 volts and increased the ripple to about 15mV. Fortunately, modern sensors and op-amps have current requirements that are much less than this.
It is also possible to generate negative voltages using similar techniques.
This arrangement has no problem providing 9.5 volts (drop is due to series the diode) at 2mA. The frequency of operation does not seem to be critical, with 10 KHz giving about 2mV of ripple. Increasing the load to 4mA reduced the supply to 8.7 volts and increased the ripple to about 15mV. Fortunately, modern sensors and op-amps have current requirements that are much less than this.
It is also possible to generate negative voltages using similar techniques.