I've been working on a USB 5v to 15v step up converter to use in my projects. Everything works as expected with a pretty stable output but I've been uneasy with how fast the 680uF capacitor charges up when I increase the voltage using the potentiometer, which didn't happen when I used fixed resistors to adjust the feedback pin.
The capacitor starts to whistle and has sparked at least 2 times when I connect its pins to discharge it, I don't know if this is by design since I've been using the circuit shown in the datasheet.
This is the full circuit inclusing the LM7815 regulator
Think about this connection. Refer back to the example schematic from the datasheet.
It's hardly unusual for a high value capacitor that's been charged up to spark when you put a short across it. Did you measure the voltage that was across it before you shorted it?
The example uses a fixed resistor to deliver 12v, replaced it with the pot to adjust it. The ground is connected to the ground pin of the pot and the output is in series with R2. Did I wire it wrong?
And no, I didn't measure the voltage but I'd suppose it was way higher than it should
I want to use the power supply to deliver both the full range of 5 to 60v allowed by the 2577 and to get limited to 15v if I want to. It's just a different mode.
The X portion of the pot is in parallel with R2. Think about what happens when you turn the pot all the way so that the value of X gets close to 0. Look at the equation for determining the output voltage. It's going to increase fast. You may have cooked any or all of L1, D1, C3, U2 and U1.
Then do something smart around the feedback circuit with a switch that selects between different feedback resistor values. You could potentially control this with a microcontroller, but start with hardware components first.
For the fixed 15V, use a second power supply so that whatever happens with your variable LM2577 circuit won't fry or disturb your 15V supply.
The above makes a couple of assumptions on what you're trying to do and that e.g. you need a fixed 15V supply while also having a variable (ca.) 17-60V supply. It'll help a lot if you could explain what kind of circuit(s) you're trying to power with this setup.
Firstly, yes, you can expect a 680uF cap to spark when you short it. Don't short it, but discharge it with a suitable resistor. Something like 1k/2W (or 5W) would be nice, especially if you're going to run this all the way up to 60V. Your 680uF cap is rated for 60+V, yes? That's a pretty big one.
As to the whistling: that's hardly surprising; the boost converter you're using works at a relatively low (by modern standards) frequency of 52kHz. Mechanical resonations in particular in the inductor L1 as it passes high currents (i.e. during high load transients) could show up as audible noise at e.g. 13kHz. Whining sounds are common in these kinds of regulator circuits especially if no special care was taken to dampen mechanical vibrations. Maybe, maybe you can even get a capacitor to whine, but my money here is on L1 actually being the source of the sound.
As to your thread title "capacitor charges dangerously fast" - well, it's supposed to charge rapidly. The LM2577 is not current-limited, which means that the circuit will basically charge the cap as fast as it can, which is limited by parameters like L1's series resistance and the output capacitors ESR. These will typically be quite low, so you're probably looking at several amps of charge current. Selection of the 680uF output capacitor should take into account typical ripple currents (again, tell us what you're powering...) and be a suitable component for the application. It'll make a difference whether you're going to draw 300mA from the circuit (use whatever cap you have handy) or repetitive 5A peak currents (select the cap carefully if you don't want it to fry and pop at some point).