Electrolytic Capacitor in Solenoid Circuit

I was looking at a few solenoid circuits. I came across this one that had an electrolytic capacitor across it (whereas most just seemed to skip it).

• Does this capacitor serve any other purpose than to create a smooth voltage particularly in regards to the flyback diode and transistor?

• How can the appropriate capacitance be chosen? (More specifically for a 12-volt solenoid being powered from a LiPo or portable generator)

A capacitor like that is typically used to provide power for short-term current spikes in the circuit is is directly connected to.

A typical application that needs these type of capacitors (called bypass or filter capacitors) are digital integrated circuits that need a extremely short spike of power every time the state change, but are very low power as long as the state is steady. This spike is caused by internal parasitic capacitances that need to get quickly charged to a different voltage. The inductance of the connection to the power supply might be too high for the power supply to deliver the required current spike, so a capacitor is connected close to the circuit causing the spikes, so that the connection to it has less inductance.

Another use of capacitor for DC is a filter capacitor after an rectifier, to have voltage available even when the AC input is just crossing zero. In that case, I would consider the capacitor part of the power supply, not of the supplied circuit.

In your application, the load is dominated by the coil of the solenoid, which can be modelled as a series circuit of an inductor and a resistor. At turn-on time of the transistor, the inductive behaviour of the coil is dominant, causing a slow rise of the current, and afterwards the pure DC resistance of the coil determines the current, which needs to be constantly supplied while the solenoid is turned on. Neither during turn-on nor in the steady state, a short current spike is consumed, so the capacitor is pointless. Also your LiPo battery does not need a capacitor to deal with zero crossings, as it is a DC source.

Side note: A different situation occurs on AC solenoids with a significant movement of the core: The inductance of an AC solenoid with the core pulled in is significantly higher than at turn-on time. As AC current is determined by the impedance, which might be dominated by the inductance of the solenoid coil, the AC current during pulling can be many times higher than the current in steady active state, up to the destruction of an AC solenoid (due to continuous over-current) if the mechanical movement does not occur, because it is blocked. Of course, an electrolytic cap can not be used to catch the current spike of an AC circuit.

• The amount of current a solenoid takes as it pulls in is a little more complex than a simple inductor. The inductance varies as the core is pulled into the solenoid. The capacitor helps arrest the spike from the plunger stroking. i.stack.imgur.com/yftyN.png – VoteCoffee Mar 26 '19 at 13:01

The purpose of the capacitor may be to provide current for the solenoid even if the power supply cannot do the job, for example if a battery is discharged such that he internal resistance is too high.

If you know that the solenoid current is i, the time the solenoid needs to operate is $\Delta$t, and the allowable voltage drop during the pulse is $\Delta$v, then the required capacitance C is:

C = $\frac{i \Delta t}{\Delta v}$

For example if the current is 400mA, the time is 0.2 second, and the allowable drop is 1.5V the required capacitance is 0.053F, or 53,000uF. This will give you an idea of the purpose of the capacitor. For a 3.7V battery you might use a somewhat higher standard value such as 63,000uF/6.3V.

• The output pin is to detect when the solonoid is fired. If attached to a battery, i assume this circuit just fires repeatedly till the battery is exhausted correct? How do you choose a battery so that the time between firings is correct? – ggb667 Sep 2 '17 at 12:00