Microcontroller Charge Pump - Page 1
Forum section: electronics / beginners

author: jram
author_rank: Contributor
timestamp: March 18, 2018, 08:39:55 pm
content: I watched the 'voltage doubler' videos with interest and would like to implement one in a project I have. I need to boost a 13v supply to 15V or so - the current requirements are very low (I need to feed a load of R168k for a few seconds).It occurred to me that I could use a clock from my 3.3v micro to 'shift' the voltage using the standard circuit in the video. I modelled this in LTSpice and all was well. However, The voltage at the capacitor between the micro and the 13V rail concerns me. The micro is a 3.3v device and I don't want to let the magic smoke out. I attached a diode between the clock pin and the capacitor and LTSpice showed that the voltage shift does not occur.Clearly I'm not understanding something. Any thoughts most welcome, thank you.

author: Ian.M
author_rank: Super Contributor
timestamp: March 18, 2018, 08:41:56 pm
content: Post your sim (.asc file).

author: jram
author_rank: Contributor
timestamp: March 18, 2018, 08:49:56 pm
content: Thanks Ian. Here are two - the original and the one with the additional diode.

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2018, 08:56:50 pm
content: Quote from: jram on March 18, 2018, 08:49:56 pmThe second one with the extra diode won't work, because the MCU's output needs to be able to source, as well as sink current. Hopefully that should be evident from Dave's video.The first circuit is working fine. What's needed, to protect the MCU's output from power on transients, is a Schottky diode, from the MCU's output, to its positive rail and a 220µF to soak up and transients.

author: Ian.M
author_rank: Super Contributor
timestamp: March 18, 2018, 11:27:15 pm
content: Also, in addition to the extra diode Hero999 recommended, if the boosted supply is ever heavily loaded, and the input 13V supply gets disconnected, you'll need another Schottky diode from 0V to the MCU output.Its fairly abusive to drive a large flying capacitor in a charge pump directly from a MCU pin, and if you don't add a series resistor, its likely to exceed the pin's Abs. Max. current limits. With a series resistor to tame it, and Schottky clamps, however, its reasonably robust. Unfortunately the series resistor to the flying capacitor increases the output impedance of the boosted supply.If the flying capacitor is small enough, the pin's current limits cant be exceeded for very long, and in combination with the output's internal resistance, it may be able to survive the transient without damage. That's operating outside the MCU datasheet limits so you'll either have to do a lot of testing to qualify the part for this abuse, or discuss transient limits with the manufacturer's F.A.E.Plot the current through the Schottky diodes and the source driving the pump to see why they are needed.If you need to regulate the boosted rail, its possible do so in software by reading it with a potential divider to a MCU ADC input, and varying the PWM frequency accordingly (slower=less output), while maintaining approx 50% duty cycle. Its also possible to regulate in hardware if the MCU's PWM peripheral supports auto-shutdown and auto-restart: Use a comparator to detect if the voltage is over your desired threshold and if so, force the PWM to shutdown.

author: jram
author_rank: Contributor
timestamp: March 18, 2018, 11:33:44 pm
content: That's a good point Ian, The max load current is sub - 1mA so I hadn't even considered that I needed to limit the current in from the pin. (However, typically, I do use 1k to limit the current). Thank you for the reminder.Good tips on plotting the current too - another LTSpice challenge

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2018, 11:38:11 pm
content: Quote from: Ian.M on March 18, 2018, 11:27:15 pmAre you sure the series resistor is really necessary? You're right about the maximum current rating being exceeded, but I wouldn't have thought that would be a problem, as long as it doesn't occur for too long. Perhaps the capacitor values could be reduced and frequency increased, so it charges as soon as possible.An alternative might be to not use the MCU's output to drive the charge pump directly. Add a buffer such as the 74LVC04, with a few of the gates in parallel, between the MCU and charge pump.Quote from: jram on March 18, 2018, 11:33:44 pmWith such a low current, the capacitor values could indeed by much smaller.

author: jram
author_rank: Contributor
timestamp: March 19, 2018, 11:07:54 pm
content: Hello again Ian. I'm ashamed to admit that I didn't see the .asc you attached! Thank you for a very instructive circuit.

author: jram
author_rank: Contributor
timestamp: June 13, 2018, 02:45:58 pm
content: Ian,I offer this slightly modified circuit. I moved the resistor to the other side of the diodes in order to reduce the current spike on sudden short to below the MCU limit of 10mA.