One pot symbol is all you need. You change the value and the percent rotation.once it's on the schematic.I am tearing my (little that I have) hair out trying to get more symbols in LTsplice. That "pot" thing wouldnt show in the components list in "misc". There was only 1 POT sym in that zip file. It was just called "pot" and had about 694kb. Can you share with me where to get more libraries? I couldnt find any info on the website.
Stu
One pot symbol is all you need. You change the value and the percent rotation.once it's on the schematic.
Pot.asy is 699 bytes, pot.sub is 195 bytes.
Show us the complete path to each file on your computer (C:\program files\...).
Version 4
SymbolType CELL
LINE Normal 16 88 16 96
LINE Normal 0 80 16 88
LINE Normal 32 64 0 80
LINE Normal 0 48 32 64
LINE Normal 32 32 0 48
LINE Normal 16 16 16 24
LINE Normal 16 24 32 32
LINE Normal 40 64 64 64
LINE Normal 40 64 48 56
LINE Normal 40 64 48 72
WINDOW 0 36 32 Left 0
WINDOW 3 36 88 Left 0
WINDOW 39 36 128 Left 0
SYMATTR Value Rtot=10K wiper=.5
SYMATTR Prefix X
SYMATTR SpiceModel potentiometer
SYMATTR Description Resistor Potentiometer, must include potentiometer.sub
SYMATTR ModelFile pot.sub
PIN 16 16 NONE 0
PINATTR PinName A
PINATTR SpiceOrder 1
PIN 16 96 NONE 0
PINATTR PinName B
PINATTR SpiceOrder 2
PIN 64 64 NONE 0
PINATTR PinName C
PINATTR SpiceOrder 3
* This is the potentiometer
* _____
* 1--|_____|--2
* |
* 3
*
.SUBCKT potentiometer 1 2 3
.param w=limit(wiper,1m,.999)
R0 1 3 {Rtot*(1-w)}
R1 3 2 {Rtot*(w)}
.ENDS
Not sure why you're having trouble with Zip files. My computer recognizes them and apparently unzips them automatically.
Here's another way. Copy and paste the following to Notepad. Save it as pot.asy in C:\Program files\LTC\SWcadIV\lib\sym\misc.
Copy and paste the following into Notepad and save as pot.sub in C:\program files\LTC\SWcadIV\lib\sub.Code:Version 4 SymbolType CELL LINE Normal 16 88 16 96 LINE Normal 0 80 16 88 LINE Normal 32 64 0 80 LINE Normal 0 48 32 64 LINE Normal 32 32 0 48 LINE Normal 16 16 16 24 LINE Normal 16 24 32 32 LINE Normal 40 64 64 64 LINE Normal 40 64 48 56 LINE Normal 40 64 48 72 WINDOW 0 36 32 Left 0 WINDOW 3 36 88 Left 0 WINDOW 39 36 128 Left 0 SYMATTR Value Rtot=10K wiper=.5 SYMATTR Prefix X SYMATTR SpiceModel potentiometer SYMATTR Description Resistor Potentiometer, must include potentiometer.sub SYMATTR ModelFile pot.sub PIN 16 16 NONE 0 PINATTR PinName A PINATTR SpiceOrder 1 PIN 16 96 NONE 0 PINATTR PinName B PINATTR SpiceOrder 2 PIN 64 64 NONE 0 PINATTR PinName C PINATTR SpiceOrder 3
Code:* This is the potentiometer * _____ * 1--|_____|--2 * | * 3 * .SUBCKT potentiometer 1 2 3 .param w=limit(wiper,1m,.999) R0 1 3 {Rtot*(1-w)} R1 3 2 {Rtot*(w)} .ENDS
I got my EE in 1966. I retired in 2007. Two old farts.I would probably take out the cap and see if it still acts the same, but that's just me. You could also go by the old adage, "If it works, don't fix it.".
Hysteresis is calculated by simple math. It's just the change in voltage at the noninverting input when the output switches. In this case, first calculate the voltage swing at the comparator output. Since R6>>R5, you can safely ignore R6 for this calculation. The swing will be from ≈0V to ≈1.4V, or about 1.4V p-p. This gets attenuated by the network consisting of R6, R9, and the resistance looking into the pot wiper. The wiper impedance varies from zero to about 8k, depending on where it is set. Thus, your present hysteresis is approximately
Vh=1.4*((R9+Rpot)/(R6+R9+Rpot). This calculates out to be a range of 88mV to 150mV.
Actually, the circuit won't trigger when the wiper is at max voltage, but simulation shows Vh=152mV with the pot voltage at minimum, almost exactly what I calculated.
If you try to leave R9 at 10k, the change in pot resistance will cause your hysteresis to vary even more wildly if you lower the value of R6. That's why I suggested changing R9 to 100k.
Too much information here.I have found what I need for the hysteresis. I have a circuit I just tested that was made by others (professional). ALthough I would love to just use it because it works, it is way too big. So after my testing this other circuit, it does not oscillate at all. When I bench test it at a 4.5v trigger, it drops to 3.65v. Best I can get on mine is from 4.5v to about 4.1v. Not enough. I am wondering now If it is even possible to get this large of a drop. By the way, the "range" for this circuit will never be below 4.0v. More like the range will run at 4.3v to 4.7v. Which it works great for this. If I can "lick" this 4.5v--> 3.65V drop it will work.
So I tried working this LTspice and I am stumbling a bit. Have to read more. I tried your math on calculating the hysteresis and stumbled there as well. So I hope I can figure this out, but if you have a quick suggestion for acheiving this hysteresis, i am all ears (-:
Stu
Too much information here.What range do you want for the threshold when the input voltage is rising? How much hysteresis do you want? Or do you want the threshold to drop to 3.65V, independent of the rising threshold?
The definition of hysteresis is a delta (change in) voltage.OK.... My Vset will always be from 4.5 to 4.7v. No less, no more. The Vsrc (sensor) range is from 3.0v to 5.v.
Now, assuming a Vset at 4.5v I need a hysteresis of 3.65 once it has triggered. This is a critical bottom threshold to acheive. If not, it will oscillate (loop)
What happens, is when it triggers at 4.5v, the Vsrc immediatly drops to 3.7v. (just the way it is)
So all my previous circuits do not have this great of hysteresis range for my Vsrc drop. So it was going to a "loop" cycle. 0n-off-on-off-on. I want it t go on and stay on until I start over (back to car idle)
The definition of hysteresis is a delta (change in) voltage.
With a Vset of 4.5V, do you want it to drop to 3.65V? And if Vset is 4.7V, do you want it to drop to 3.85V?
I still don't understand.
With the threshold set at 4.5V, when the sensor voltage reaches 4.5V, what voltage do you want the threshold voltage to drop to?
With the threshold set at 4.6V, when the sensor voltage reaches 4.6V, what voltage do you want the threshold voltage to drop to?
With the threshold set at 4.7V, when the sensor voltage reaches 4.7V, what voltage do you want the threshold voltage to drop to?
So, independent of the threshold voltage, you want the relay coil current to go off when the sensor voltage goes above the threshold voltage, and stay off until the sensor voltage drops below 3.65V. Am I interpreting this correctly?ALL Above need to be at a threshold drop of 3.65v. I assume making the 4.7v at 3.65v, the other lower 2 will fall into the same range.
So, independent of the threshold voltage, you want the relay coil current to go off when the sensor voltage goes above the threshold voltage, and stay off until the sensor voltage drops below 3.65V. Am I interpreting this correctly?
I know I sound stupid, but you and I don't interpret electronics language exactly the same way, and i hate spending a lot of time designing something, only to find that I misunderstood the specs.
OK, I looked at the PDF you PM'ed. Have you noticed that it is very similar to your circuit? If you add the voltage regulator, which I recommended, it is even closer. You could get rid of the zener if you add the regulator.YES SIR~! EE to dumb EE ha..ha.. that is exactly what I want.
BTW, if your interested in seeing the circuit that "does" work, I can send it to you as a PM. It is too elaborate and more universal. Hence why I prefer to make mine simpler and more specific.
I'm working on it. I've been busy on other stuff today. I might get back to it tomorrow afternoon.I will eventually add that into the final design ONCE i figure this damn drop voltage I need. Any luck or ideas so far? Did you note the 1M in-line resistor after the Vref? There resistance for hysteresis is from the 1M pot. I should take that pot out and read it's resistance. I suppose I could copy there 2 values. But it is enough different, that may not be all in the equation.
Stu
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?