Author Topic: Does a Photoresistor Exist in LTSpiceIV ?  (Read 20175 times)

0 Members and 1 Guest are viewing this topic.

Offline joydivisionmanTopic starter

  • Newbie
  • Posts: 1
  • Country: us
Does a Photoresistor Exist in LTSpiceIV ?
« on: October 01, 2015, 12:18:33 am »
I'm a novice with LTSpice.  I've built simple circuits and I see the value of the software.

For whatever reason, I've tried to find a photoresistor, but have not succeeded.  I've scoured the web, and have found some alternative routes, but they look more difficult than need be.

Certainly I am missing something here.  LTSpice IV certainly has the ability to provide a photoresistor, doesn't it?
 

Online DimitriP

  • Super Contributor
  • ***
  • Posts: 1300
  • Country: us
  • "Best practices" are best not practiced.© Dimitri
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #1 on: October 01, 2015, 12:54:17 am »
LTSpice doesn't  seem to care if a resistor value varies due to changes in  light,  temperature or someone  turning a knob.

There is a way to simulate a variable resistor:

http://eecs.oregonstate.edu/education/docs/tutorials/LT%20Spice_VarResistor.pdf
   If three 100  Ohm resistors are connected in parallel, and in series with a 200 Ohm resistor, how many resistors do you have? 
 

Online IconicPCB

  • Super Contributor
  • ***
  • Posts: 1534
  • Country: au
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #2 on: October 01, 2015, 07:42:35 am »
Go to Yahoo groups and find LTspice group ( there are two ) join up and search extensive model database .
 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #3 on: October 01, 2015, 12:25:53 pm »
LTSpice doesn't  seem to care if a resistor value varies due to changes in  light,  temperature or someone  turning a knob.

There is a way to simulate a variable resistor:

http://eecs.oregonstate.edu/education/docs/tutorials/LT%20Spice_VarResistor.pdf

As Dimitri put it, its really just varying a resistor value rather than making it change with lumin.

Have a look at this vid, it'll explain a few things in LTSpice that helped me. However don't get the title confused with what your trying to do, you can just apply the same parameters to the actual value of a resistor
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline liquibyte

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: us
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #5 on: October 01, 2015, 07:16:03 pm »
Rather than using the .step command, you can use a voltage source to program the value of a variable resistor. This means you can vary the value during the run and see how your circuit reacts (for instance if it is going into a comparator circuit that you want to test triggers and releases at the correct values).

Unfortunately, I can't remember the syntax for this. I have it in a simulation at work - I'll try to remember to post it tomorrow.

[EDIT]

I've remembered the syntax. Set the resistor value to "R=V(x)" where x is the voltage you want to represent. See attached
« Last Edit: October 01, 2015, 07:47:09 pm by Neilm »
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #7 on: October 01, 2015, 07:56:49 pm »
a demonstration of what Neil said:

You can use a PWL voltage source, give a name to its output net, and set R=V(the_named_net) and this makes the R follow the voltage source.

In the image below, R1 is the name of the V2 output,  V(R1) is the resistance of R1.
« Last Edit: October 01, 2015, 08:05:13 pm by codeboy2k »
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #8 on: October 02, 2015, 02:09:02 pm »
a demonstration of what Neil said:

You can use a PWL voltage source, give a name to its output net, and set R=V(the_named_net) and this makes the R follow the voltage source.

In the image below, R1 is the name of the V2 output,  V(R1) is the resistance of R1.
I do this all the time to test power supply designs. You can check the response of the design to a change in load (or input voltage or ...). By changing the rise or fall time, you can get anything from a gradual change to a sharp step.
 

Offline eetech00

  • Regular Contributor
  • *
  • Posts: 64
Re: Does a Photoresistor Exist in LTSpiceIV ?
« Reply #9 on: October 02, 2015, 11:40:42 pm »
No. but you can use a behaviorial voltage source to generate a voltage representing light intensity,
then use that voltage to control a resistors value.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf