Author Options:

Circuit Help! Answered

Hi, I'm trying to put together a basic circuit for charging a capacitor/s with a built in LED to indicate when it's charged. I've created a draft on Multism but can't seem to get it to work. I'm a complete novice at electronics and have pieced it together from various schematics I've found. Help please! :)



9 years ago

Change of plan. =S
I'm now looking to see if it would be possible to charge the capacitor using DC straight from a battery and produce a current of around 6A when the capacitor is discharged. This is because I'm trying the reduce the voltage in the circuit as I have a limit I have to stay under. Is this at all possible? I would probably use a 6V or maybe a 12V car battery.
I'm trying to modify/ simplify the schematic at the moment.

A couple points:

-- You cannot give a constant amperage value for capacitive discharge. The charge (along with voltage) decays exponentially during discharge. Given a fixed load, it's fairly easy to compute the length of time it takes for a given cap charge to decay to a certain voltage, however.

"Fixing" the output to a specific voltage or current requires some complex regulation...

-- re: Charging Voltage vs. Stored Energy (joules)
The charging voltage is squared in this model. To store the same energy, you'd need 4X as much capacitance each time you reduce the voltage by half.

E = 1/2 CV2

(E is Joules, C is Farads, V is voltage)

So, for your 200uF capacitor:

16 = 0.5 X 0.0002 X 160000

0.0144 = 0.5 X 0.0002 X 144

You'd need approx 222000 uF (.2 farads) of capacitance to store the same amount of energy @ 12V.

Thanks for the help.

What I've worked out I need is approximately a pulse with an average of 6A for about 0.04 seconds (i.e. 8A going down to 4A in 0.04seconds).

Working with a 6V or 12V battery how would I go about calculating the capacitance needed and the value of resistor to control the discharge speed?

I tried 6A*0.04s/12V = 0.01F but that doesn't seem right.

Also is there any way to calculate the current at a given time, because I haven't found anything, and there doesn't seem to be a way to graph it on Multism (the program I'm using).

The circuit is designed to discharge a current through a solenoid and create a momentary, strong magnetic pulse.

Yikes. You don't ask easy questions, do you? ;-)

Just playing with the numbers so far--and making some pretty broad (probably incorrect) assumptions.

Biggest technical stumbling block--your solenoid is an inductor. That significant:

-- It has large, yet constantly diminishing "inrush" spikes when powering up. Since the "half-life" of your capacitance discharge is also time-dependent, trying to model both simultaneously with simple equations is "iffy", at best.

-- You haven't mentioned why you're using a solenoid. If it's just for the coil, is the metal core included? It's inductance radically changes whether it's an "air core" or not.

-- And is it it actually moving and pulling? It's inductive load is going to vary as the core moves, and with the physical (mechanical) load, too. I'm not going to even try to model that. Time-dependent variables on top of time-dependent....(double yikes.)

So let's just pretend for now it's just a simple resistive device. And pretend my math is correct...

Keeping the original 400V / 200uF setup (which I think is probably arbitrary), and then converting those values to 12V:

a) 16 Joules @ 12V requires a .222F cap, which is a 222000 uF capacitor.

b) Using Ohms Law, we figure our phony resistive value for the solenoid, which I assume (from your comments) has a 6.0A draw:

12V / 6.0 A = 2 ohms

(This is the least reliable of our assumptions, for the reasons noted above.)

c) The time constant for capacitive discharge is RC, or resistance * capacitance:

2 ohms X .222 farads = 0.444 seconds.

d) Voltage at 0.04 seconds (chosen time):

V = V0 e -t/RC

( V0 is starting voltage; e = constant (2.718); t is time; RC is the time constant)

12V X 2.718 -0.04 / 0.444 = 10.968V

(there's a very similar current formula, too--but with the voltage @ 0.04 seconds, and the "known" resistance, it's simple to find the amperage.)

Phony Conclusion (for our phony "resistive" load):
The voltage has dropped < 10% in 0.04 seconds, so it's safe to say there's plenty of amperage. Capacitance value of .222 Farads is overkill...

Thanks, that all seems about right to me, it will come in very useful ;)

I'm using a solenoid without a core to generate a pulling force towards the centre of the coil, that acts on a ferromagnetic projectile when it is inserted into the coil (similar to a coilgun design).

So is there a formula/s that will link the current in the coil at any given time with the force from the magnetic field (in Newtons) acting on the projectile at any given time? I'm having trouble calculating an answer because there are so many variables:

1. The current in the coil
2. The number of turns of the coil
3. The diameter/ length of the coil.
4. The magnetic permeability of the projectile.

(I'm guessing the force is dependant only on the magnetic permeability of the projectile and not on the mass of the it? Or is it volume based?)

Below is a simple diagram illustrating it.

current in
( PROJECTILE ) ----> Force
current out


0 represents a cross section of the wire
= represents a cross section of the tube (barrel) wall

What I'm going to be using is magnet wire wrapped around a plastic tube of diameter 40mm with a coil length of 400mm.

I've tried calculating the magnetic field strength inside the coil in teslas and then, using that value and the known permeablilty of the projectile (assumed to be steel at this point), calculating the force this magnetic field exerts on the projectile (this is a calculation for instantaneous values, which is all I need). But I haven't been getting very far

I really appreciate all of this help btw. :)

Ahh..ye olde coile gun.

Rather than reinvent the wheel, there must be some pertinent formulas on builders pages you can reference. With any luck, they'd have some real inductance calculations...

What little I know about coil guns:

-- A low-voltage coil gun requires lots of capacitance for obvious reasons-- less voltage == less electromotive force. And a very low-resistance coil, to dump the current quickly.

That fits perfectly with our previous calculations. The guesstimate of 2 ohms for your coil is too much resistance to dump the .222F total capacitance quickly. It only drops ~10% in the allotted time. The magnetic field would move the projectile, but stop and hold it in the barrel before it escapes.

If you drop the coil resistance to 0.1 ohm, (plugging that into the formulas) then the voltage drops to 1.98 volts at the 0.04 second mark. Lots of energy, expended quickly.

So how to make a low-resistance coil? Use fewer turns of bigger wire.... and that's exactly what I've seen in low-voltage coil guns.

How to calc current?
Just substitute current for voltage in the formula.

Or even easier: You know the voltage @ 0.04 sec, and the "resistance" (which we fudged), so just use Ohm's Law. For the previous comment's example:

I = 10.968 V / 2 ohms = 5.484 amps

As we said, the 2 ohm coil doesn't draw current quickly enough....

You should also consider the other suggestions--like use a photoflash charger and go for higher voltage (cheaper than lots of caps.)

Remember-- 0.222 Farads is 222000 uF. For 16 Joules, that's one thousand 222uF caps in parallel @ 12V, vs. one 222uF @ 400V.


9 years ago

I've been playing with LTspice from Linear Technology for a few days, and ran a simulation of your circuit.

According to the sim, your original circuit works fine. The location of the colored circles on the schematic correspond with the trace colors on the plot. Sorry, I didn't use the same part labels as you did. My bad.


-- LTspice doesn't have exact models for the transistor, diodes or the transformer, so I had to make some substitutions in the sim. You should not.

-- I didn't simulate the HV rectifier and capacitor on the secondary side of the transformer. Without the a correct model for the HV diode (D1), the sim was producing spikes in the megavolt range--and running really slowly. But that shouldn't matter, I simplified the circuit for simulation.

The secondary is grounded on my schematic, but that's merely to keep LTspice happy. You should wire your HV side as you originally planned.

I bet This is the source of your schematic. I've stumbled across this page before, and the information's been on the web for a looooong time. I assume it's reliable.

Recheck your wiring, and be to follow the directions on the page (for instance C1 (your drawing) must be a non-polarized cap.) Also, did you fry your transistor, or wire it incorrectly?


i think the odd stuff in the sim is result of computer trying to simulate infinite stuff in reality it should run more smoothly and have lower output voltage

Sure, simulations have limitations. And the speed of the diode would have a definite effect. Not to mention the transformer--I don't know any of the real data (inductance, DC resistance, etc.) I just picked some reasonable values from thin air (and looking at it now, in all honesty, it's not even a 1:10 ratio, it's 1:5. ;-) But the goal was to test the oscillation, anyhoo.)

Thanks, that was all really helpful especially the pics :) I'm just working on the circuit in the moment and I'll post 'Mach 3' as soon as I can, hopefully with a solenoid attached.

Another comment about your original schematic: the only real change seems to be your "indicator" LED.

Assuming the circuit does generate 400V (and no more) AND that spikes are sufficiently suppressed by the rectifying / filtering... the results of an LED calc (green LED, 2.5V drop, 20mA) indicates that the limiting resistor (R3) should be ~22K (which is approx what you have), but with an 8.8 watt rating.

Did you use an appropriate power resistor? Or did you try a 1/4 or 1/2 watt? Could explain a "no light" condition... (possibly--although generally resistors usually fail spectacularly.) It's also possible that a voltage spike killed the LED (or the transistor.)


oh and I forgot to say, you were right, that was my source. :)

transformers work on AC current or pulsed DC so that's one problem right there

okay thanks, but the circuit to the left of the transformer is meant to be an alternator, I found the schematic online, so in theory it should convert the DC supply into an AC that goes through the transformer. However I've pinpointed the converter as being the part that's not working. Any pointers?

copy or use the circuit of a flash camera the circuit should charge the capacitor but the led is going to light up quite early you need voltage divider (2 resistors) or something like that and connect the led on it. calculate it so that in no way (even if a resistor fails) the led cant get current higher than its built to or it'll explode

ignore C1 and D4 positive current comes to the transistor base thru the upper 1/2 of the transformer and R1 transistor opens somewhat curent begins to flow thru lower 1/2 transformer and transistor (the voltage on the transformer is + on the center and - on the bottom) this makes the transformer output voltage on the upper 1/2 with the same direction now voltage on R1 is higher than source voltage (V source + V added by transformer) transistor opens more higher current flows voltage on R1 rises more . . . . transistor gets to saturation - a point when it allready passes the max current and cannot go more the voltage on R1 begins to fall back to the initial voltage (V source) the transistor begins to close back to the initial half-open state current in the lower 1/2 transformer begins to fall now the transformer outputs voltage on the upper 1/2 in the opposite direction (- in the top and + in the center) (transformaers output on all entries in the same direction as the source when source current rises and in inverted when source current falls) voltage on R1 falls down (now its V source - V transformer and not +) transistor closes more transformer outputs higher voltage on the upper 1/2 (still in the opposite direction) so voltage on R1 (V source - V teansformer) falls down more . . . . transistor closes completely everything starts over again C1 is there to control the speed of the process. it works without it but maybe with less efficiency D4 is to protect the transistor if the voltage on the upper 1/2 of the transformer is negative and too high and it is more than the power source. it works without it too but maybe less efficient and the transistor may have shorter life

Thanks a lot that's seems to have sorted everything out! And now I understand what's going on when I flick the switch :). This is a pic of 'circuit mach 2'... does everything seem in order?

circuit 2.png

nope the base of the transistor is just connected to ground thru the diode - it'll never open the upper 1/2 of the transformer is connected directly to the source - it'll just take DC and heat up. and output a single splash of high voltage when you flip the switch off C1 and R1 are shorted

thanks, so what changes need to be made then? Sorry I'm a complete novice at electronics. :S

take the original circuit in the top of the page

. Remove the bottom rung of C1/R1/short . . It's been a looooonnnngggg time since I worked with anything like this but: . Seems to me that D4 should be across Q1, to shunt the spike when coil field collapses. . And the connection from D4 to B- looks to me like it needs to disappear.

. I'm no expert, but it looks to me like the 4-point connection between J1 and T1 shouldn't be a connection.

It's not, there's no little dot signifying that the crossed wires are connected.

I think that it's a relatively new standard, my dad gets confused sometimes when it doesn't have the little jump.

. Ah. I couldn't see the dots until I looked at it full-size. . I like the "little jumps," too. :)

. Moved from Help:Feedback to Forums:Tech