Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to make a capacitance variable with voltage in LTpice?

Flyback

Well-Known Member
Hi,
How to make a capacitance variable with voltage in LTpice?

You presumably do a .param {capacitance} = (V(aaa) - V(bbb)) * 10nF
?
But that doesnt work
 

Attachments

  • variable cap.asc
    679 bytes · Views: 100
The value of a parameter must be known before the simulation begins. A parameter can be .step'ped, but each step is a new simulation. You may find some happiness in defining a capacitor in terms of charge. Check the LTspice Help file.

C. Capacitor
There is also a general nonlinear capacitor available. Instead of specifying the capacitance, one writes an expression for the charge.
LTspice will compile this expression and symbolically differentiate it with respect to all the variables, finding the partial derivative's that correspond to capacitances.
Syntax: Cnnn n1 n2 Q=<expression> [ic=<value>] [m=<value>]
There is a special variable, x, that means the voltage across the device. Therefore, a 100pF constant capacitance can be written as
Cnnn n1 n2 Q=100p*x
 
If you want a real part there are a couple of "Varicap" diodes in the library > diode> type>Varactor.

All diodes have max capacitance at 0V and decrease with reverse voltage in a logarithmic fashion. Varactor diodes are more precisely controlled for this attribute and specified by the C ratio and value at two voltages.

A high resistor value is used for biasing and large C is used in series when used to block the DC.

Generally the bigger the current rating or smaller Rs, or bigger power rating, the bigger the C(0V) capacitance.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top