On Thursday, January 1, 2015 7:36:48 AM UTC-5, Piotr Wyderski wrote:
> I am unable to simulate the followingg PUT-based relaxation oscillator
> in the most recent LTspice (with BC547B and BC557B):
>
> https://upload.wikimedia.org/wikipedia/commons/9/9f/PUT_LED_blinker.png
>
> Nothing wants to oscillate.
>
> Looking for a bug I have also tried the simplest possible neon lamp
> oscillator (with Vstrike=100V, Vhold=50V, R=220k, C=1u), but there are
> no scillations either: the voltage on the capacitor saturates at 50.25V.
>
> What magic should I apply to make such circuits work as expected?
>
> Best regards, Piotr
One trick to remember while simulating
oscillators with SPICE is to provide
initial asymmetry conditions. That is
use the ".IC" directive in SPICE to
set the initial voltages on the nodes
to some perturbed vales e.g.,
V(1)=0.0 V(2)=5.0 ... etc., etc.,
Hope that helps.
Reply by Maynard A. Philbrook Jr.●January 5, 20152015-01-05
In article <m86ihm$vbm$1@dont-email.me>, tauno.voipio@notused.fi.invalid
says...
>
> On 2.1.15 16:43, Maynard A. Philbrook Jr. wrote:
> > In article <m84732$6hc$1@node2.news.atman.pl>, peter.pan@neverland.mil
> > says...
> >>
> >> Tauno Voipio wrote:
> >>
> >>> The 220k timing resistor is too small, keeping the PUT continuosly on.
> >>> The following thing oscillates.
> >>
> >> Thank you all very much, in both cases the non-oscillation
> >> seems to be caused by too low resistor value. In the case
> >> of the PUT-based circuit I have not enough experience to
> >> judge whether Spice is right or wrong, but I remember well
> >> my experiments performed over a decade ago with a *real* neon
> >> oscillator. It used to work with pretty any reasonable resistor.
> >> The simulation provided by John does not oscillate with 470k
> >> and with 560k it oscillates *exactly twice*. With 680k it works
> >> well. I must confess that my excitement about Spice has just
> >> entered a colder period... :-/
> >>
> >> Once again, thank you for your help!
> >>
> >> Best regards, Piotr
> > Here is your example with an LED, I added a R to the base of the
> > NPN and a R in series with the LED to not over do it.
> > You will also notice the Trans set point, it shows "Startup".
>
>
> You forgot to correct the time constant. The oscillation frequency
> was spoiled to 12 ms/cycle, due to changed trip voltages. The
> frequency cannot be sensed as blinking.
Sorry!
Jamie
Reply by George Herold●January 2, 20152015-01-02
On Thursday, January 1, 2015 7:36:48 AM UTC-5, Piotr Wyderski wrote:
> I am unable to simulate the followingg PUT-based relaxation oscillator
> in the most recent LTspice (with BC547B and BC557B):
>
> https://upload.wikimedia.org/wikipedia/commons/9/9f/PUT_LED_blinker.png
>
> Nothing wants to oscillate.
>
> Looking for a bug I have also tried the simplest possible neon lamp
> oscillator (with Vstrike=100V, Vhold=50V, R=220k, C=1u), but there are
> no scillations either: the voltage on the capacitor saturates at 50.25V.
>
> What magic should I apply to make such circuits work as expected?
>
> Best regards, Piotr
As Jim T. said, I sometimes have to "jump start" oscillators in LTspice. Hit them with a little pulse.
George H.
Reply by Tauno Voipio●January 2, 20152015-01-02
On 2.1.15 16:43, Maynard A. Philbrook Jr. wrote:
> In article <m84732$6hc$1@node2.news.atman.pl>, peter.pan@neverland.mil
> says...
>>
>> Tauno Voipio wrote:
>>
>>> The 220k timing resistor is too small, keeping the PUT continuosly on.
>>> The following thing oscillates.
>>
>> Thank you all very much, in both cases the non-oscillation
>> seems to be caused by too low resistor value. In the case
>> of the PUT-based circuit I have not enough experience to
>> judge whether Spice is right or wrong, but I remember well
>> my experiments performed over a decade ago with a *real* neon
>> oscillator. It used to work with pretty any reasonable resistor.
>> The simulation provided by John does not oscillate with 470k
>> and with 560k it oscillates *exactly twice*. With 680k it works
>> well. I must confess that my excitement about Spice has just
>> entered a colder period... :-/
>>
>> Once again, thank you for your help!
>>
>> Best regards, Piotr
> Here is your example with an LED, I added a R to the base of the
> NPN and a R in series with the LED to not over do it.
> You will also notice the Trans set point, it shows "Startup".
You forgot to correct the time constant. The oscillation frequency
was spoiled to 12 ms/cycle, due to changed trip voltages. The
frequency cannot be sensed as blinking.
--
-TV
Reply by Maynard A. Philbrook Jr.●January 2, 20152015-01-02
In article <m84732$6hc$1@node2.news.atman.pl>, peter.pan@neverland.mil
says...
>
> Tauno Voipio wrote:
>
> > The 220k timing resistor is too small, keeping the PUT continuosly on.
> > The following thing oscillates.
>
> Thank you all very much, in both cases the non-oscillation
> seems to be caused by too low resistor value. In the case
> of the PUT-based circuit I have not enough experience to
> judge whether Spice is right or wrong, but I remember well
> my experiments performed over a decade ago with a *real* neon
> oscillator. It used to work with pretty any reasonable resistor.
> The simulation provided by John does not oscillate with 470k
> and with 560k it oscillates *exactly twice*. With 680k it works
> well. I must confess that my excitement about Spice has just
> entered a colder period... :-/
>
> Once again, thank you for your help!
>
> Best regards, Piotr
Here is your example with an LED, I added a R to the base of the
NPN and a R in series with the LED to not over do it.
You will also notice the Trans set point, it shows "Startup".
Version 4
SHEET 1 880 680
WIRE 304 -32 176 -32
WIRE 448 -32 304 -32
WIRE 176 -16 176 -32
WIRE 448 0 448 -32
WIRE 304 32 304 -32
WIRE 176 80 176 64
WIRE 176 80 16 80
WIRE 448 96 448 80
WIRE 304 128 304 112
WIRE 304 128 240 128
WIRE 304 144 304 128
WIRE 16 160 16 80
WIRE 240 192 240 128
WIRE 176 240 176 176
WIRE 336 288 304 288
WIRE 176 304 176 240
WIRE 240 304 240 288
WIRE 304 304 304 288
WIRE 304 304 240 304
WIRE 208 384 176 384
WIRE 240 384 208 384
WIRE 336 384 336 368
WIRE 336 384 304 384
WIRE 208 416 208 384
FLAG 448 96 0
FLAG 304 224 0
FLAG 208 416 0
FLAG 16 224 0
SYMBOL pnp 240 176 R180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL npn 176 192 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 288 128 R0
SYMATTR InstName R1
SYMATTR Value 3.9k
SYMBOL res 288 16 R0
SYMATTR InstName R2
SYMATTR Value 3.9k
SYMBOL res 160 -32 R0
SYMATTR InstName R3
SYMATTR Value 220k
SYMBOL voltage 448 -16 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 9
SYMBOL res 160 288 R0
WINDOW 0 -39 22 Left 2
WINDOW 3 -54 50 Left 2
SYMATTR InstName R4
SYMATTR Value 220k
SYMBOL LED 304 368 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 72 32 VTop 2
SYMATTR InstName D1
SYMATTR Value NSPW500BS
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL cap 0 160 R0
SYMATTR InstName C1
SYMATTR Value 150n
SYMBOL res 320 272 R0
SYMATTR InstName R5
SYMATTR Value 50
TEXT -112 -24 Left 2 !.tran 1 startup
TEXT 352 288 Left 2 ;Prevent detonation
Reply by ●January 1, 20152015-01-01
On Thu, 01 Jan 2015 11:51:56 -0800, John Larkin
<jlarkin@highlandtechnology.com> wrote:
>On Thu, 01 Jan 2015 12:45:40 -0700, Jim Thompson
><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>
>>On Thu, 01 Jan 2015 20:31:09 +0100, Piotr Wyderski
>><peter.pan@neverland.mil> wrote:
>>
>>>Jim Thompson wrote:
>>>> (2) Oscillators, in any form of Spice, _often_ will not start on their
>>>> own.
>>>
>>>And what do you do then?
>>>
>>> Best regards, Piotr
>>
>>You didn't read the last line of my post...
>>
>>"Try .IC of capacitor as zero volts."
>>
>>This _should_ be settable in the capacitor part attributes, if Spice
>>conventions are followed by LTspice (likely).
>>
>>If not, add this "Spice directive"...
>>
>> .IC V(Node_Name_At_Top_Of_Cap)=0
>>
>>Some forms of oscillators (LC is one) require a "kickstart", a current
>>pulse into the tank.
>>
>>(This is because, unlike in the real world, transient Spice
>>simulations have no noise to start the oscillation.)
>>
>> ...Jim Thompson
>
>In LT Spice, just check "skip initial operating point solution" in the
>transient analysis setup window. I do that a lot, for power supplies
>and such where powerup matters.
>
>The other thing to do is use a pulse generator for the power supply,
>and bring it up after some small time delay, optionally with some
>realistic rise time.
That was our standard solution to convergence and startup problems
forty years ago. I still regularly use the trick, without even trying
without.
Reply by Tim Williams●January 1, 20152015-01-01
"Piotr Wyderski" <peter.pan@neverland.mil> wrote in message
news:m848sf$7m3$1@node1.news.atman.pl...
> Why don't they set the
> initial voltage at the nodes (esp. capacitors) to some small,
> random values instead of 0?
Then it would be nondeterministic. It's a simulator, not reality -- it just
churns numbers. It's your duty to build a model that's representative of
reality.
If reality means adding noise voltage/current sources for important
components (or all of them), that's what you have to do!
Also keep in mind, .MODELs (diodes, BJTs, and bad MOSFET models) are an
idealized approximation of the internal chip only. You must add package
parasitics yourself. .SUBCKTs usually include this, but inspect the source
to be sure it's reasonable.
Tim
--
Seven Transistor Labs
Electrical Engineering Consultation
Website: http://seventransistorlabs.com
Reply by John Larkin●January 1, 20152015-01-01
On Thu, 01 Jan 2015 13:34:37 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>On Thu, 01 Jan 2015 11:53:10 -0800, John Larkin
><jlarkin@highlandtechnology.com> wrote:
>
>>On Thu, 01 Jan 2015 12:46:35 -0700, Jim Thompson
>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>
>>>On Thu, 01 Jan 2015 20:27:31 +0100, Piotr Wyderski
>>><peter.pan@neverland.mil> wrote:
>>>
>>>>Tauno Voipio wrote:
>>>>
>>>>> The 220k timing resistor is too small, keeping the PUT continuosly on.
>>>>> The following thing oscillates.
>>>>
>>>>Thank you all very much, in both cases the non-oscillation
>>>>seems to be caused by too low resistor value. In the case
>>>>of the PUT-based circuit I have not enough experience to
>>>>judge whether Spice is right or wrong, but I remember well
>>>>my experiments performed over a decade ago with a *real* neon
>>>>oscillator. It used to work with pretty any reasonable resistor.
>>>>The simulation provided by John does not oscillate with 470k
>>>>and with 560k it oscillates *exactly twice*. With 680k it works
>>>>well. I must confess that my excitement about Spice has just
>>>>entered a colder period... :-/
>>>>
>>>>Once again, thank you for your help!
>>>>
>>>> Best regards, Piotr
>>>>
>>>
>>>Do the math first and you won't get cold >:-}
>>>
>>> ...Jim Thompson
>>
>>The LT Spice neon model isn't right.
>
>Try this one (fix the wraps before using)...
>
>******************************************************************
>.SUBCKT NE-2H A1 A2 PARAMS: Vs=130 Ii=50u Ti=1m Vh=80 Rh=1k Ia=4m
>Varc A1 arc 0 ; current sense
>Garc arc A2 VALUE =
>{sgn(V(arc,A2))*LIMIT((abs(V(arc,A2))-V(ref))/(Rh*V(abn)),0,1)}
>Carc arc A2 5p ; stray terminal capacitance
>Gref 0 ref VALUE = {Vh+(Vs-Vh)/(1+V(ion)**2)} ; Rpar=1 ; voltage
>transition
>Rparref 0 ref 1
>; Cref ref 0 1n ; tiny capacitance here aids convergence
>Gion 0 ion VALUE = {abs(I(Varc))} ; Rpar={1/Ii} ; measure of free
>ions
>Rpar 0 ion {1/Ii}
>Cion ion 0 {Ti*Ii} ; gas ionization time constant
>Gabn 0 abn VALUE = {Ia**2}+I(Varc)**2 ; Rpar={1/Ia**2} ; abnormal
>glow
>Rparabn 0 abn {1/Ia**2}
>Cabn abn 0 1p ; tiny capacitance here aids convergence
>.ENDS NE-2H
>******************************************************************
>
>This was originally posted on the LTspice list by analog@ieee.org and
>I then modified some of the behavioral expressions to improve
>convergence.
>
> ...Jim Thompson
Actually, I don't design much with neon bulb oscillators lately.
--
John Larkin Highland Technology, Inc
picosecond timing laser drivers and controllers
jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com
Reply by Jim Thompson●January 1, 20152015-01-01
On Thu, 01 Jan 2015 11:53:10 -0800, John Larkin
<jlarkin@highlandtechnology.com> wrote:
>On Thu, 01 Jan 2015 12:46:35 -0700, Jim Thompson
><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>
>>On Thu, 01 Jan 2015 20:27:31 +0100, Piotr Wyderski
>><peter.pan@neverland.mil> wrote:
>>
>>>Tauno Voipio wrote:
>>>
>>>> The 220k timing resistor is too small, keeping the PUT continuosly on.
>>>> The following thing oscillates.
>>>
>>>Thank you all very much, in both cases the non-oscillation
>>>seems to be caused by too low resistor value. In the case
>>>of the PUT-based circuit I have not enough experience to
>>>judge whether Spice is right or wrong, but I remember well
>>>my experiments performed over a decade ago with a *real* neon
>>>oscillator. It used to work with pretty any reasonable resistor.
>>>The simulation provided by John does not oscillate with 470k
>>>and with 560k it oscillates *exactly twice*. With 680k it works
>>>well. I must confess that my excitement about Spice has just
>>>entered a colder period... :-/
>>>
>>>Once again, thank you for your help!
>>>
>>> Best regards, Piotr
>>>
>>
>>Do the math first and you won't get cold >:-}
>>
>> ...Jim Thompson
>
>The LT Spice neon model isn't right.
Try this one (fix the wraps before using)...
******************************************************************
.SUBCKT NE-2H A1 A2 PARAMS: Vs=130 Ii=50u Ti=1m Vh=80 Rh=1k Ia=4m
Varc A1 arc 0 ; current sense
Garc arc A2 VALUE =
{sgn(V(arc,A2))*LIMIT((abs(V(arc,A2))-V(ref))/(Rh*V(abn)),0,1)}
Carc arc A2 5p ; stray terminal capacitance
Gref 0 ref VALUE = {Vh+(Vs-Vh)/(1+V(ion)**2)} ; Rpar=1 ; voltage
transition
Rparref 0 ref 1
; Cref ref 0 1n ; tiny capacitance here aids convergence
Gion 0 ion VALUE = {abs(I(Varc))} ; Rpar={1/Ii} ; measure of free
ions
Rpar 0 ion {1/Ii}
Cion ion 0 {Ti*Ii} ; gas ionization time constant
Gabn 0 abn VALUE = {Ia**2}+I(Varc)**2 ; Rpar={1/Ia**2} ; abnormal
glow
Rparabn 0 abn {1/Ia**2}
Cabn abn 0 1p ; tiny capacitance here aids convergence
.ENDS NE-2H
******************************************************************
This was originally posted on the LTspice list by analog@ieee.org and
I then modified some of the behavioral expressions to improve
convergence.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Reply by Piotr Wyderski●January 1, 20152015-01-01
Jim Thompson wrote:
[cut -- thanks Jim, I have never used additonal directives except of the
coupling factor for coils]
> (This is because, unlike in the real world, transient Spice
> simulations have no noise to start the oscillation.)
Yes, the differential equation which describes many oscillators
has the valid solution V(t)=constant. But IMHO in the case of a
simulator it is a bug, not a feature. Why don't they set the
initial voltage at the nodes (esp. capacitors) to some small,
random values instead of 0?
Best regards, Piotr