How to change the temperature of sub-circuits in LTSPICE?

Discussion in 'General Electronics Chat' started by l0st_l0rd, May 2, 2016.

  1. l0st_l0rd

    Thread Starter New Member

    Apr 29, 2013
    12
    0
    I have subcircuits of a solar cell (resistors and diodes) in LTSPICE. I want to connect the solar cells (sub-circuits) together. However, each solar cell has a different temperature. I can set the temperature of the program with .Temp but how can I change the temperature of each sub-circuit separately.

    Here you can see my model. Even by adding the temperature to the sub-circuit, I see no changes in my open-circuit voltage.Any suggestions?
     
    Last edited: May 2, 2016
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    I think you may need to have a TEMP parameter specified as part of the diode models.
     
    l0st_l0rd likes this.
  3. l0st_l0rd

    Thread Starter New Member

    Apr 29, 2013
    12
    0
    Dear Alex

    thank you for your response. It is possible to adjust diode model parameter when I do not define sub-circuits. I will have 72 solar cells, each with different temperature. How can I change the parameter in model diode via .subckt parameters?
    Do you have any suggestions?
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    I was wrong about using TEMP within the diode model. But the following seems to work.
    I created a simple junk subcircuit consisting of just a 1k resistor in series with a default diode, with temperature specified by parameter {th}.
    Here's the subckt definition:-

    .SUBCKT junk a b c
    R1 c a 1k
    D1 c b D temp={th}
    .model D D
    .lib standard.dio
    .ends

    This is a test sim, using two instances of 'junk' with different {th} values:-
    JunkSubckt.PNG

    You should be able to adapt your model like line 3 of the above model.
     
    ericgibbs and l0st_l0rd like this.
  5. l0st_l0rd

    Thread Starter New Member

    Apr 29, 2013
    12
    0
    Dear Alec

    It works now. Thank you very much for your hint.

    Greets, Hamed
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Good to know you got it working.
     
    l0st_l0rd likes this.
Loading...