-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add potentiometer component #122
Comments
No, I don't planning to add potentiometer device. Qucs-S has no interactive simulation mode so the potentiometer will be not so useful. For Ngspice it's need to emulate potentiometer using the connection of two resistors and define its resistances using the variable. It will be not easy to use this combined device in parameter sweep, because the parameter sweep is implemented using the |
I did some experimenting trying to get a potentiometer to work. Having issues passing multiple "W" values via Parameter Sweep. Not sure how to use .PARAM to do it. |
The So you can sweep only device but not variable. Your schematic will not work and you need only to write a custom nutmeg script (Simulation->Nutmeg script device). Something like this. There is no other way to get the variable sweep with Ngspice.
|
I'm missing something. Tried multiple changes but no Bueno |
Hate to beat a dead horse.... Something is either either wrong with my Nutmeg script or I am doing something wrong. I cannot reproduce your plot even though the console output shows "Vout" is correct, 0.1, 0.2...0.9. Netlist doesn't work running under the DuSpice GUI either
|
The node name
Automatic variables recognition may fail sometimes. Just append the missing variables to the semicolon separated list manually. |
Assume this issue has been resolved. Closing ticket. |
It makes sense to add potentiometer after implementation of the tuner feature and adding |
I know this isn't what is needed, but I recreated the Verilog Potentiometer component used in Qucs 0.0.19. The symbol files may be useful for a ngspice compatible potentiometer. Qucs doesn't allow using the same component name in a project as a "native" component. I had to rename potentiometer.va to variable_resistor.va. |
The related work should be done in C++ level. It's need to provide a SPICE entry for potentiometer like it was done for INDQ and CAPQ. The symbol for this device already exists, but is hidden as SPICE-incompatible. |
I have added SPICE entry for the potentiometer. This device will be available since the next release. |
Yesssss THANK YOU SO MUCH kind sir!!! Any estimate when will the next update be available? ...and/or can i clone/checkout the source code with potentionmeter from git right now? |
I am planning to make an update in January or February. Yes, you may compile the |
Hello, i just compiled current branch, it does indeed have the potentiometer device but it's not possible to wire it, i think because the pins don't "align" to the grid. I was able to get the wires to cross once and it stayed connected, but this is unusable. How can i fix this? |
@BURN-MICROSUCK Use right click on the device and then "Align to grid" from the context menu. It is a known issue. See #92 |
Thanks again. Another issue i'm facing is that capacitors don't filter like they're supposed to. Doing a quick test circuit that uses an op-amp to mix 3 sinewaves at different frequencies (100Hz, 1KHz, 10KHz) the shunt cap (output to ground) should filter out nearly all of the 10KHz signal, see screenshot: I'm presuming the same would go for inductors in series and parallel, making it impossible to simulate RC / RCL circuits. |
This simulation is correct. The ideal opamp has zero output resistance. The time constant of the output stage RC=0. The output signal doesn't depend on the capacitance. Try to replace the opamp with the model from the library. But it also may have very low output resistance. For example for LM358 is set to RO=50 Ohm in the model. And RC gives 2.35us, which gives cutoff frequency 425kHz. |
In real life you would never place a large capacitor across the output of a "standard" OpAmp. It can cause instability. The circuit must be designed to drive capacitive loads. https://www.analog.com/en/analog-dialogue/articles/ask-the-applications-engineer-25.html |
@BURN-MICROSUCK I have just added a fix for device rotation. See #92 (comment) You may compile and test the |
I'm not getting the potentiometer working. I used the standard method from Qucs. |
I converted a Qucs tone control project in December using the new potentiometer model. I don't remember uploading it. |
Is a potentiometer in a future release? Since log or alternate taper pots are pretty much gone today a simple linear one would suffice. The ability to alter resistance via a variable would be a plus.
The text was updated successfully, but these errors were encountered: