URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       Micro-Cap EDA Users
  HTML https://mc12.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Micro-Cap 12 Discussion
       *****************************************************
       #Post#: 47--------------------------------------------------
       Incandescent Light Bulb
   DIR By: Robert
       Date: February 6, 2024, 9:42 am
       ---------------------------------------------------------
       Hello all,
       I want to build a very low distortion 1 kHz oscillator using an
       incandescent light bulb for amplitude stabilisation.
       I didn't find any such device in the MC12 component libraries.
       For my project I intend to use one of the following lamps:
       8V/40mA, 12V/40mA or 24V/40mA.
       I measured the current vs. voltage characteristics of the lamps
       and therefore the lamp resistance vs. voltage functions are also
       known.
       I wonder is there is a way to construct a model of those lamps.
       Any comments are welcome.
       Robert
       #Post#: 48--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: MC12
       Date: February 7, 2024, 6:45 am
       ---------------------------------------------------------
       Hmm.  There's not just a monotonic voltage/current relationship
       to model (which I presume would be possible to build in SPICE),
       but also a temporal relationship which will cause a discrepancy
       in the simulation compared with a real circuit.
       The resistance of the lamp filament depends on its temperature,
       and the moment-by-moment temperature is a dynamic function.  If
       there is (say) a step change in voltage, the temperature does
       not respond as a step change, it is on a logarithmic law of
       diminishing returns until it reaches an equilibrium of power in
       (voltage x current) = power out (light and heat), with the
       thermal mass of the filament dictating the rate of change.  I
       imagine you mapped the voltage/current curve using a very low
       rate of change of voltage.  What you actually need is the
       dynamic response for an instantaneous change of voltage.  Only
       then will you know whether the response of the lamp filament is
       slow enough to be ignored at 1kHz.
       If you try to ignore the (shall we call it) 'thermal inertia'
       and just use (effectively) a special resistor model with
       resistance as a function of voltage, the model won't behave
       properly.  When the instantaneous voltage is high, the
       resistance will be high – and vice versa.  In the real case, the
       resistance will depend on the RMS power being delivered (which
       also depends on the resistance!).
       To create a model from scratch requires a detailed understanding
       of the SPICE underpinnings, but there's plenty of general
       information out there (it just requires tweaking into the
       Micro-Cap version).  I don't know specifically how to go about
       creating a model, but there might be models in other simulators
       which can be adapted.  Surely the newsletters etc contain some
       info.  Perhaps this sheer complexity explains the lack of an
       existing model.
       I think the easiest way to proceed is to use an analogue circuit
       to model the action of the light bulb, with full-wave
       rectification averaging the input and an RC network modelling
       the thermal inertia, acting on a transconductance amplifier or a
       FET to provide the current path.
       However, I suspect what previous designers have done is set up a
       simulation for the oscillator with a fixed resistor taking the
       place of the lamp, and satisfying themselves that slight
       adjustments to the lamp resistance controls the amplitude in the
       way they want.  Then they build the circuit and measure its
       actual performance rather than try to guess what it will be!
       #Post#: 49--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: Robert
       Date: February 7, 2024, 12:59 pm
       ---------------------------------------------------------
       I did practically the same what you wrote:
       "set up a simulation for the oscillator with a fixed resistor
       taking the place of the lamp, and satisfying themselves that
       slight adjustments to the lamp resistance controls the amplitude
       in the way they want."
       This gave me an idea of the component values for the feedback
       network and also for the lamp characteristics.
       Now I am going to "build the circuit and measure its actual
       performance rather than try to guess what it will be!"
       Thanks for your interesting response in your post.
       Regards,
       Robert
       #Post#: 50--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: MC12
       Date: February 7, 2024, 3:32 pm
       ---------------------------------------------------------
       It's good to know somebody is actively using MC12!
       #Post#: 51--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: MC12
       Date: February 8, 2024, 3:01 am
       ---------------------------------------------------------
       Do let us know how it goes.
       #Post#: 52--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: Rohit
       Date: February 12, 2024, 9:56 am
       ---------------------------------------------------------
       --- Quote from: Robert link ---
       >
       > Hello all,
       >
       > I want to build a very low distortion 1 kHz oscillator using
       an incandescent light bulb for amplitude stabilisation.
       > I didn't find any such device in the MC12 component libraries.
       > For my project I intend to use one of the following lamps:
       8V/40mA, 12V/40mA or 24V/40mA.
       > I measured the current vs. voltage characteristics of the
       lamps and therefore the lamp resistance vs. voltage functions
       are also known.
       > I wonder is there is a way to construct a model of those
       lamps.
       > Any comments are welcome.
       > Robert
       >
       --- End Quote ---
       There is no such component in MC12 (or any other spice program I
       know of). You can model the non linear behavior. The simplest is
       using a voltage controlled current source (G source) and Table
       function of spice. Here is a detailed info
  HTML http://www.ecircuitcenter.com/Circuits/ABM1/ABM1.htm
       Just plug in the V,I pairs.
       here are the steps:
       1. Write a subckt (.ckt) file using the G source.
       2. Verify the VI relationship in DC analysis.
       3. Once satisfied with result, Create a component by importing
       the .ckt file
       I have created the model of a with characteristic found here (
  HTML http://www.tronola.com/moorepage/Lamps.html
       ).
       .SUBCKT bulb1819 1 3
       Rser 1 2 1m
       GmyRes 2 3 table {v(2, 3)} = (-28,-36.2) (-26,-34.7) (-24,-33.1)
       (-22,-31.4) (-20,-29.6) (-18,-27.9) (-16,-25.9) (-14,-23.9)
       (-12,-21.8) (-10,-19.47) (-8,-17.17) (-6,-14.46) (-5,-12.98)
       (-4,-11.41) (-3,-9.65) (-2,-7.7) (-1,-5.45) (-0.5,-3.6) (0,0)
       (0.5,3.6) (1,5.45) (2,7.7) (3,9.65) (4,11.41) (5,12.98)
       (6,14.46) (8,17.17) (10,19.47) (12,21.8) (14,23.9) (16,25.9)
       (18,27.9) (20,29.6) (22,31.4) (24,33.1) (26,34.7) (28,36.2)
       Rpar 1 3 1G
       .ends
       Rser and Rpar are resistors to aid convergence.
       Here is the DC characteristic of the model.
       [attachimg=1]
       you can modify the model as per your data. If you could provide
       your model data and schematic, I may be able to provide more
       help.
       the .ckt file and dc analysis schematics are attached.
       #Post#: 54--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: MC12
       Date: February 14, 2024, 2:41 am
       ---------------------------------------------------------
       This sounds good as first-order, but what concerns me is that it
       takes no account of how the filament and the overall lamp warms
       up and cools down.  It probably doesn't matter at 1kHz, but at
       low frequencies there has to be a point where it becomes
       significant.
       #Post#: 56--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: Rohit
       Date: February 16, 2024, 9:03 am
       ---------------------------------------------------------
       you are correct MC12, simple V I characteristics are not enough
       to correctly model a bulb. I simulated a circuit of a wein
       bridge oscillator, the output was heavily distorted. Searching
       on internet, I found a model here:
  HTML https://groups.google.com/g/sci.electronics.cad/c/I9QfewHAaSI
       After some modification for MC format, it worked.
       *VO=NOMINAL OPERATING VOLTAGE
       *IO=NOMINAL STEADY STATE OPERATING CURRENT
       *RCOLD=FILAMEMT RESISTANCE MEASURED AT ROOM TEMP (300K)
       *TAU=CURRENT TIME CONSTANT AFTER A 0 (zero) TO VO STEP IS
       APPLIED
       .SUBCKT LAMP 1 2
       .PARAM VO=28 IO=25m RCOLD=112 TAU=22m TAMB=300
       H1 6 0 VML 1
       RH1 6 0 1
       GP 0 4 VALUE={V(6)*V(1,2)}
       *V(4,0) = FILAMENT TEMPERATURE IN KELVINS
       RT 4 5 {300*(VO-IO*RCOLD)/(IO*IO*VO*RCOLD)}
       CT 4 5 {TAU*IO*IO*VO*RCOLD/(300*(VO-IO*RCOLD))}
       VAMB 5 0 {TAMB}
       El 7 0 1 2 300
       R1 7 0 1
       E2 8 0 VALUE={V(4)*RCOLD}
       R2 8 0 1
       E3 10 0 7 9 10MEG
       R3 10 0 1
       E4 9 0 VALUE={V(8)*V(10)}
       R4 9 0 1
       GR 1 3 10 2 1
       VML 3 2 0
       .ENDS LAMP
       I built a 1khz oscillator, it worked like a charm, clean 1khz
       sine wave.
       [attachimg=1]
       [attachimg=2]
       Modelling a bulb in spice is tough but can be done. In this
       newsletter:
  HTML http://www.intusoft.com/nlpdf/nl11.pdf
       , there is an
       example of modelling a tungsten bulb.
       However getting thermal, electrical parameters is very
       difficult. Manufacturers of bulbs do not provide this data and
       you cannot measure it in your home lab.
       #Post#: 57--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: MC12
       Date: February 16, 2024, 6:38 pm
       ---------------------------------------------------------
       Excellent.  Your original model was simply a non-linear voltage
       dependent resistor, with no thermal inertia, so of course it
       introduced a non-linear component into the circuit response.
       But that's not what I originally said!
       I don't see why it isn't possible to measure bulb
       characteristics as a hobbyist, with a suitably designed
       experiment.
       #Post#: 58--------------------------------------------------
       Re: Incandescent Light Bulb
   DIR By: MC12
       Date: February 17, 2024, 3:38 am
       ---------------------------------------------------------
       --- Quote from: Rohit link ---
       >
       > In this newsletter:
  HTML http://www.intusoft.com/nlpdf/nl11.pdf
       ,
       there is an example of modelling a tungsten bulb.
       >
       --- End Quote ---
       From the reference above, this indicates I was on the right
       track:
       [attachimg=1]
       *****************************************************
       Page 1 of 2
   DIR Next Page