Draft SMPS for Bus Pirate PIC programmer. This isn't final, so the license is Creative Commons-BY-SA-NC.
I have a demo firmware that will hold the output at 13volts, but there's still a problem enabling the PNP transistor (VPP out drops to <2volts). It might be my transistor pinout is wrong, or maybe the 1n4148 is a bad switcher, or maybe the whole design is flawed (using the NPN instead of a FET).
I'll do more testing after the web platform project is out the door.
Thanks for the link Ian, the two transistors connected to VPPEN turn the output voltage on and off I'm guessing what's the transistor connected to MCLR for?
The transistor on MCLR is to pull it low to reset the PIC. (The PIC has a pull-up resistor on MCLR).
I looked at a few other high-side switches and fixed the problem. All the current was draining out the base of the PNP, it needs a 10K resistor between the PNP base and NPN collector. Now it works fine.
Corrected schematic image.
Guess this is just my lack of analog experience but why not just turn off the VPPEN output, not tying it to ground but what's the difference?
You're not the only one, I'm a mostly digital guy myself.
Which switch do you mean?
Q4 and Q2 enable/disable the 13volt supply to the MCLR pin. The voltage has to rise to 13volts pretty fast or the PIC just sees it as a reset command and doesn't enter programming mode. The SMPS takes longer to get to 13volts than the specs allow, so the transistor pair is required to switch it quickly.
Q3 is used to pull the MCLR pin low for a reset. It's a transistor version of a reset button. A pullup resistor on the PIC PCB holds MCLR high (holds it at V+ - 3.3volts, 5volts, whatever) for normal operation, grounding it resets the PIC.
Why the 100Ohm on the MCLR resistor? The pullup on the board and the 10k should avoid excessive current and get your reset a bit closer to ground.
I'm not yet sure about R4 or R7, it depends if the programming firmware uses Q3 to ground VPP. If yes, then R4 is needed, but I haven't confirmed this in the code yet.
Hi!
About the PWN, what is the Frequency and duty cycle?
I used these spreadsheets to calculate the proper period and duty cycle for my 680uH/0.66A inductor @3.3volt-5volt supply and 13volts output:
http://www.instructables.com/id/High-Vo ... SMPSBoost/ (http://www.instructables.com/id/High-Voltage-Switch-Mode-Power-Supply-SMPSBoost/)
The final inductor will probably be SMD/680uH/0.12A.