By configuring a comparator and a transistor to control the oscillator in a charge pump circuit, you enable the pump to generate a regulated output of — in principle — any desired value. Charge pump ICs can either invert or double an input voltage (for example, 3 V to –3 V or 3 V to 6 V). The charge pump itself does not regulate the output voltage and one running off 3 V is not normally capable of generating intermediate output voltage levels like 5 V.
However, by adding a comparator and a reference device, you can create arbitrary output levels like 5 V and regulate them as well. Charge pump IC1 (a MAX660) has an internal oscillator whose 45 kHz operation transfers charge from C1 to C2, causing the regulated output to rise. When the feedback voltage (pin 3 of IC2) exceeds 1.18 V, the output of comparator IC2 (a MAX921) goes high, turning off the oscillator via T1.
The comparator hysteresis (easily added on IC2) is zero here simply because no hysteresis is required in the control loop. The oscillator when enabled generates two cycles, which is sufficient to drive VOUT slightly above the desired level. Next, the feedback turns the oscillator off again. The resulting output ripple will depend mainly on the input voltage and the output load current. Output ripple may be reduced at the expense of circuit efficiency by adding a small resistor (say, 1 Ω) in series with C1. You’ll find that ripple also depends on the value and ESR associated with C1 — smaller values of C1 transfer less charge to C2, producing smaller jumps in VOUT.