LTSpice Help

Status
Not open for further replies.

mgeno216

New Member
**broken link removed**

So what I want to do is make a circut that fades an group leds (in paralell) on and off when power is applied. I was trying to model this in LTSpice, but since I am very new to the program, I am unsure of how to go about testing this. How do I change the data being graphed. I want to change it to volts over time. Can that be done. I am not sure if this circut will work. I saw a similar circut on youtube months ago, but cant find it, so I am trying to recreate it.

Thanks
Mike
 
Your circuit is doing a DC sweep, where V1 is stepped from 0V to 12V in steps of 1V. There is no "time" implied in this sweep; rather, you are doing 13 discrete .DC solutions, at 0V, 1V, 2V,...12V.

To change this simulation to a "time based" .TRAN simulation, you have to do two things. First, you have to decide how the independent voltage source V1 varies with time. Do you want it to ramp up, be a sine wave, square wave, pulse, a lookup table of volts vs time, etc, etc? You tell me what you what to do, and I will suggest a way.

The second thing you have to do is to tell Spice that you want to simulate where time is the independent variable. You do that by right clicking on the schematic background, selecting EDIT SIMULATION COMMAND off the menu, selecting the TRANSIENT tab, and putting in the ending time of the simulation to be run.
 
What I want the chart to display is:
The volts the led sees over 10 seconds with a constant supply of the leds forward voltage.

So lets say the led has a forward voltage of 3 volts at 20ma. I want to then have a constant supply of 3v. I want to build a circut that allows the led to fade on and off, it doesn't matter how it does. I am not sure if I am saying this right. Is there some tut on LTSpice. I have googled and youtubed, but haven't found anything too in depth.

Thanks,

Mike
 
Wiki LTSpice

Many ways to skin a cat. Note how big a capacitor it takes to create a time constant of several seconds when the series resistor is only 220Ω. Even then, I had to use a source voltage of 10V to get enough LED current.

This is not a practical way of ramping your LED brightness; and the LTSpice sim shows why. I can help you do that using some transistors and small capacitors, but I am out of time tonight...
 

Attachments

  • DF33.png
    29.9 KB · Views: 327
Here is a hack at it. Note that it only works with a 2n7000 because of its low threshold voltage. You will have to raise the supply voltage if you try to use an NFet with a higher Vt. The 1n4148 is there to discharge the gate circuit for the next cycle. Bit of a delay after the switch is closed while the gate charges toward the Threshold voltage.
There really is no good way to do this with only a 3V supply. I'm including the *.asc circuit so you can play with it in LTSpice.
 

Attachments

  • LedDelay.png
    30.6 KB · Views: 282
  • LedDelay.asc
    1.5 KB · Views: 255
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…