Voltage-adjustable resistor model in LTSpice?

Discussion in 'General Electronics Chat' started by gustep12, Apr 22, 2008.

  1. gustep12

    Thread Starter New Member

    Apr 22, 2008
    2
    0
    I am trying to model a light-sensitive resistive element in LTspice, and I can't get it to work even after countless hours and google sessions.

    Imagine an ohmic sensor of 1000kOhm, which varies its resistance by 10% at a rate of 50Hz, because you illuminate it with a 50Hz strobe or similar. Now if you apply an AC voltage of 1V rms, 600Hz to this resistor, then you should get a nice amplitude-modulated current with a mean value of ca. 1mA rms out of your model. Specifically, if you ran an FFT on this, you'd see a large peak at 600Hz, and two sidebands at 550Hz and 650Hz each. I'm interested in how an AM signal generated this way is degraded by additional stray voltages and resistance down the line. However, I simply can't coax LTSpice to give me the equivalent of a modulated Ohmic resistance, which is what I need to simulate this.

    Can anyone help and maybe even draw up an equivalent circuit? This is driving me nuts.

    Thanks for reading.
     
  2. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    It's actually pretty easy. Use a B source which is a voltage controlled current source. For a fixed resistance, the equation would be I=V(Vr)/R, where R is the needed resistance. Then you just replace R with an equation based on another sinusoidal voltage source.

    In this case, create Vmod which is a sin with amplitude 1V @ 50Hz.
    Then R = (1000+Vmod*100)

    The only important part is to make sure that R never can go to zero since it is in the denominator.

    Here is the LTSPICE schematic:
     
  3. gustep12

    Thread Starter New Member

    Apr 22, 2008
    2
    0
    Thank you so much, this is just what I was looking for. I also don't think this is easy, for example I would probably have never (not in a reasonable time) figured out that I need to create a Label first, instead of using the generated voltage directly in the equation. This is a very useful example.
     
  4. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    I have to admit that I just looked up different available parts. Behavioral sources are apparently just for this sort of thing. If they didn't exist, I'm not sure how I would do it...
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,138
    1,786
    You do know about the LTSpice group on Yahoo I hope. They have whole libraries of examples and stuff. The guy who wrote and maintains LTSpice is a regular there along with some other very smart people.
     
  6. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    144
    IIRC it is the largest and oldest active Electrical Yahoo! Group. Are you a member there PB?

    Dave
     
Loading...