Qucs / qucs

Qucs Project official mirror
http://qucs.sourceforge.net/
GNU General Public License v2.0
1.16k stars 213 forks source link

Better (linear and) logarithmic potentiometer model for qucs #784

Open abzmr opened 6 years ago

abzmr commented 6 years ago

Hi all,

When simulating some audio circuit variants, I encountered the rather peculiar model for the logarithmic potentiometer that is currently in qucs (under "verilog-a devices"). For default linear taper it works perfectly fine, but it models log taper by adding a fixed resistor in parallel with the pot that is still linear taper. While the result is somewhat approximately logarithmic, it achieves this by almost short-circuiting the potentiometer on higher settings. This totally unrealistic behavior caused much havoc in my simulations.

So I ended up making a better log pot model which behaves much more realistically, and can be set to both ideal log taper and mass-production two-linear-parts taper, or somewhere in-between.

Available here: linlogpot_prj_lib.tar.gz This archive holds the subcircuit schematic and equations with some extensive explanation, the library conversion of that, and a simple test circuit to show the differences. I'd like to propose this as a useful addition to the standard qucs library; possibly Ideal.lib?

Many thanks for making qucs such an exceptionally useful tool, and keep up the good work! Anne Bezemer

linlog_simul