Author Topic: Microcontroller Charge Pump  (Read 3330 times)

0 Members and 1 Guest are viewing this topic.

Offline jramTopic starter

  • Contributor
  • Posts: 17
  • Country: mt
    • Never Not Fixing
Microcontroller Charge Pump
« on: March 18, 2018, 08:39:55 pm »
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. :)
TVMIA

John
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Microcontroller Charge Pump
« Reply #1 on: March 18, 2018, 08:41:56 pm »
Post your sim (.asc file).
 

Offline jramTopic starter

  • Contributor
  • Posts: 17
  • Country: mt
    • Never Not Fixing
Re: Microcontroller Charge Pump
« Reply #2 on: March 18, 2018, 08:49:56 pm »
Thanks Ian.  Here are two - the original and the one with the additional diode.
TVMIA

John
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Microcontroller Charge Pump
« Reply #3 on: March 18, 2018, 08:56:50 pm »
Thanks Ian.  Here are two - the original and the one with the additional diode.
The 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.
 
The following users thanked this post: jram

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Microcontroller Charge Pump
« Reply #4 on: March 18, 2018, 11:27:15 pm »
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.   
« Last Edit: March 18, 2018, 11:40:50 pm by Ian.M »
 

Offline jramTopic starter

  • Contributor
  • Posts: 17
  • Country: mt
    • Never Not Fixing
Re: Microcontroller Charge Pump
« Reply #5 on: March 18, 2018, 11:33:44 pm »
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 :)
TVMIA

John
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Microcontroller Charge Pump
« Reply #6 on: March 18, 2018, 11:38:11 pm »
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, hoverve, its reasonably robust.  Unfortunately the series resistor to the flying capacitor increases the output impedance of the boosted supply.

Plot the current through the Schottky diodes and the source driving the pump to see why they are needed.
Are 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.

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 :)
With such a low current, the capacitor values could indeed by much smaller.
 
The following users thanked this post: jram

Offline jramTopic starter

  • Contributor
  • Posts: 17
  • Country: mt
    • Never Not Fixing
Re: Microcontroller Charge Pump
« Reply #7 on: March 19, 2018, 11:07:54 pm »
Hello again Ian.  I'm ashamed to admit that I didn't see the .asc you attached!  Thank you for a very instructive circuit.   :-+
TVMIA

John
 
The following users thanked this post: Ian.M

Offline jramTopic starter

  • Contributor
  • Posts: 17
  • Country: mt
    • Never Not Fixing
Re: Microcontroller Charge Pump
« Reply #8 on: June 13, 2018, 02:45:58 pm »
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.
TVMIA

John
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf