Boost converter to charge 150V cap (Spice Simulation) - Page 1
Forum section: electronics / beginners

author: mribble
author_rank: Regular Contributor
timestamp: January 09, 2018, 10:36:37 am
content: I am trying to design a cheap way to charge a large capacitor to 150V. I am trying to do a boost converter simulation in spice since I've read these boost converter designs are tricky. Things are basically working, but it would be helpful if you experts could look it over and suggest improvements.One issue I had was the current going through my inductor was too high so I added R2. The graphs on the attached image show the voltage through that resistor spike to about 45V at 1.5A. That's nearly 70W, but that is really worst case and only lasts for very small time turning initialization. I'm not sure how to size that resistor. If it really needs to be something over 5W it probably won't work for me (average power over a second will be well under 5W in this circuit).Is there anything I can adjust so I can remove that resistor while keeping a 3A inductor? I noticed adjusting the duty cycle and and period of the square wave had impacts on max current but also greatly increased the charge time of the cap (and in my real circuit the cap is 1000uF which takes seconds to charge -- just using 100uF in this simulation to speed up the simulation). My square wave is generated by a microcontroller and I can monitor the cap voltage. So do people change the square wave based on the voltage of the cap to avoid over current problems, but keep the charging time fast? Or am I overthinking this and there is some better real world solution?Thanks for any suggestions!

author: Ian.M
author_rank: Super Contributor
timestamp: January 09, 2018, 12:16:17 pm
content: You need a smarter controller. Here's the logic for a boost converter with current sensing in LTspice. You can do away with the current sensing if you calculate the inductor current from the input and output voltages and the on and off times then adjust them to keep it within the desired limits, but that gets a lot trickier, especially if you want to maintain a high switching frequency and charge as fast as possible. If you get it wrong and don't allow enough off time for the current to fall, the flux in the inductor builds up over a few cycles till it saturates, then the MOSFET blows.

author: Zero999
author_rank: Super Contributor
timestamp: January 09, 2018, 12:19:18 pm
content: The resistor just dissipates power and is not needed.Yes, you need a more intelligent control system. When the transistor is on, monitor the current through the inductor, which can done with a sense resistor, in series with the source. When the current exceeds a certain level, say 3A, turn the transistor off, to allow the inductor to dump its energy into the capacitor. Repeat until the capacitor is charged to the desired voltage.

author: mribble
author_rank: Regular Contributor
timestamp: January 09, 2018, 01:26:28 pm
content: Ian, you have perhaps given me the most helpful reply I've ever gotten from an internet forum. THANKS! I'm still digesting exactly how this works and will be modifying your model to fit my final circuit better. I will post my updated spice model when I have it working the way I want so others can benefit.Hero, you also gave good advice. It would have put me on the right track.

author: mribble
author_rank: Regular Contributor
timestamp: January 09, 2018, 03:49:16 pm
content: Attached my latest spice file. Ian, it is pretty similar to yours, but I do have a few questions:1) You had R4 and C5 across the mosfet. Was that there for some reason, or does it more accurately simulate the mosfet? Basically, I'd like to know if I should include something like that in my circuit and why.2) I don't really understand why you had the schmitt trigger on your circuit. I can make the simulation work without it, but it's very possible I'm missing something. As I noted in my attached spice file a bunch of that logic is going to be handled with a a microcontroller that is capable of 1M ADC samples per second and doesn't have much else to do while the cap is charging.

author: mribble
author_rank: Regular Contributor
timestamp: January 09, 2018, 03:51:16 pm
content: And since a lot of people won't have Spice installed, I'm including an image of the circuit I'm referring to with #1 and #2 above.(Edit - fixed image)

author: IanB
author_rank: Super Contributor
timestamp: January 09, 2018, 03:56:20 pm
content: You can probably learn a lot by studying the flash circuits in disposable cameras. There are various topologies found in different camera brands and revisions, but they all charge a capacitor up to about 300 V in a few seconds from a 1.5 V battery using a minimum of inexpensive components.

author: mribble
author_rank: Regular Contributor
timestamp: January 09, 2018, 05:31:02 pm
content: I did look at several of disposable flash circuits. One thing that kind of put me off of those circuits is they use specialized transformers that I couldn't find a source for. This boost converter solution is nearly as cheap since I already have a microcontroller sitting around with nothing to do while the capacitor charges.

author: Ian.M
author_rank: Super Contributor
timestamp: January 09, 2018, 08:32:37 pm
content: R4-C5 is a snubber to damp the ringing when D1 swtops conducting. Without it, the circuit will produce a lot of RFI. You'll have to adjust the values to trade-off damping against switching losses, which are worst just before it reaches the target voltage.I didn't write this sim for you, I just modded one I had hanging around. Originally I had Schmidtt triggers in all the control terms as I was experimenting with low pass filtering the logic signals. The remaining one isn't really necessary, and could actually be removed, however its a good place to insert propagation delay to see the effect of late detection of over-current. It also locks out any turn-on signal until the inductor current is less than the limit. That's not needed for LTspice's S-R flipflop which is Reset dominant, but a real flipflop is not likely to be so well behaved: possibly Q and /Q both being high if S and R are both active. If you remove it, strip it out completely and connect B1 to the S-R R input.

author: xygor
author_rank: Regular Contributor
timestamp: January 09, 2018, 09:07:30 pm
content: How quickly does it need to charge?Step up (auto)transformer + rectifier; orVoltage multiplier.

author: mribble
author_rank: Regular Contributor
timestamp: January 09, 2018, 11:05:58 pm
content: Thanks Ian. I added back R4-C5 and ran some solutions to find acceptable values. And thanks for the info on the Schmitt trigger reasoning.xygor, I'm finding the boost converter works well (in simulation) and is cheap. Is there a reason you think a transformer or voltage multiplier would be better. I briefly considered both back when I started, but found transformers to be expensive, big, and harder to source. I didn't like the inflexibility of voltage multipliers and there would need to be several stages to go from 12V to 150.

author: Zero999
author_rank: Super Contributor
timestamp: January 09, 2018, 11:13:42 pm
content: A transformer is used in a camera because the ratio between the input and output voltages is high. If a simple inductor were used, the duty cycle would be very high, which would be impractical, as the peak current would need to be very high, compared to average input.Here's something simple I cobbled together in LTSpice. The efficiency probably isn't great, but it demonstrates the principle of monitoring the coil current and crude voltage regulation with a zener.