Register to reply

Orcad Capture 9.2 LM317 simulation

by krispots
Tags: pspice lm317
Share this thread:
krispots
#1
Jun6-10, 03:32 AM
P: 14
hello

i'm new to using orcad capture 9.2 so i'm having problems with the simulation.

i'm trying to simulate this regulator circuit using transient analysis. then when i clicked run, the green circle appeared. I'm wondering maybe you need to tweak something first on the parameters of the LM317 before it starts working properly, or before the program recognizes that the LM317 is present. Voltage readings indicate that there is really something wrong.


anyone can help me?
Attached Thumbnails
temp1.JPG  
Phys.Org News Partner Engineering news on Phys.org
Comfortable climate indoors with porous glass
Crash-testing rivets
Customized surface inspection
uart
#2
Jun6-10, 10:03 AM
Sci Advisor
P: 2,751
Hi kris. I'm not sure of the actual error you're getting but I would like to point out that the resistor ratio you're using is a little high for that circuit. As it is the desired output voltage set-point is about 5240/240 * 1.25 which is about 27.3 volts. Too high to achieve with a 28 volt supply.
krispots
#3
Jun9-10, 01:37 AM
P: 14
hello uart, i based this simulation on this schematic found on the first page of the datasheet of LM317

http://www.futurlec.com/Linear/LM317T.shtml

i don't know if the schematic there is probable, but i'm just testing for the simulation.

thanks for your reply, i managed to solve the problem by using another library that contains LM317 in pspice.

vk6kro
#4
Jun9-10, 07:04 AM
Sci Advisor
P: 4,016
Orcad Capture 9.2 LM317 simulation

Real life regulators need some voltage across the regulator. So, you can't get any more than 27 volts out if the supply is 30 volts, for example.

That is what was happening before, because of the 5K resistor. Your first simulator was being honest and telling you what would really happen.

If you make R2 = 240 ohms, the output should be 1.25 times (1 + 240/240) + 0.0001 * 240.
This is about 2.5 volts

As you make R2 bigger, the output voltage will increase. Make it 1000 ohms and the output should rise to 6.5 volts or so. Just use Fig 1 in your data sheet, and the formula above it.
uart
#5
Jun9-10, 09:36 AM
Sci Advisor
P: 2,751
Quote Quote by krispots View Post
hello uart, i based this simulation on this schematic found on the first page of the datasheet of LM317
Except you missed one important detail. The 5k resistor in the datasheet circuit is a variable resistor which should be set to some value less than 5k. About 4.6k is the actual maximum value that will let the regulator circuit work properly.
krispots
#6
Jun14-10, 02:09 AM
P: 14
Quote Quote by vk6kro View Post
Real life regulators need some voltage across the regulator. So, you can't get any more than 27 volts out if the supply is 30 volts, for example.

That is what was happening before, because of the 5K resistor. Your first simulator was being honest and telling you what would really happen.

If you make R2 = 240 ohms, the output should be 1.25 times (1 + 240/240) + 0.0001 * 240.
This is about 2.5 volts

As you make R2 bigger, the output voltage will increase. Make it 1000 ohms and the output should rise to 6.5 volts or so. Just use Fig 1 in your data sheet, and the formula above it.
Thanks for your help! the formulas and the schematic are starting to make sense now!

one question though, how can you compute for the Iadj? you replaced it by 0.0001? how did you come up with the value?
krispots
#7
Jun14-10, 02:17 AM
P: 14
Quote Quote by uart View Post
Except you missed one important detail. The 5k resistor in the datasheet circuit is a variable resistor which should be set to some value less than 5k. About 4.6k is the actual maximum value that will let the regulator circuit work properly.
Thanks for pointing it out
vk6kro
#8
Jun14-10, 03:02 AM
Sci Advisor
P: 4,016
Quote Quote by krispots View Post
Thanks for your help! the formulas and the schematic are starting to make sense now!

one question though, how can you compute for the Iadj? you replaced it by 0.0001? how did you come up with the value?
The 100 uA figure came from the application notes for the LM317, above. See page 5 just under fig 1.

Here are some calculated values for voltage out of a LM317 using standard values for the resistors:
R1..... R2..... Vout

220... 0....... 1.25
220... 47..... 1.52
220... 56..... 1.57
220... 68..... 1.64
220... 82..... 1.72
220... 100.... 1.83
220... 120.... 1.94
220... 150.... 2.12
220... 180.... 2.29
220... 220.... 2.52
220... 270.... 2.81
220... 330.... 3.16
220... 390.... 3.50
220... 470.... 3.97
220... 560.... 4.49
220... 680.... 5.18
220... 820.... 5.99
220... 1000.. 7.03
220... 1200.. 8.19
220... 1500.. 9.92
220... 1800.. 11.66
220... 2200.. 13.97
220... 2700.. 16.86
220... 3300.. 20.33
220... 3900.. 23.80
220... 4700.. 28.42
As always, the voltage supplied to the regulator must be about 3 volts more than the output voltage.
krispots
#9
Jun21-10, 09:17 PM
P: 14
so there is no real relationship between the input voltage and the output voltage other than
the 3V difference?

or is there some formula that relates the input voltage, output voltage, R1 and R2?
vk6kro
#10
Jun22-10, 12:03 AM
Sci Advisor
P: 4,016
No. One aim of a regulator is to isolate the output voltage from any input voltage variations.

So, you want the output to remain at whatever voltage you set it to, hopefully independent of load or input voltage, within limits.

The main effect the input voltage has is that it limits the maximum output voltage you can get from the regulator.

There is another effect. If you set the regulator output to 5 volts and have an input of 35 volts, the regulator will run hotter than if you supplied it with 15 volts, say, for the same output current. This is because the dissipation in the regulator is greater with 30 volts drop than with 10 volts drop.
krispots
#11
Jun22-10, 01:56 AM
P: 14
That wraps things up for my problem. Thanks a lot!
invertedP
#12
Jun1-12, 04:55 AM
P: 1
How did you get a LM317? Which library did you get it from?
vk6kro
#13
Jun1-12, 05:32 AM
Sci Advisor
P: 4,016
You don't need a library. There are simple formulas given in the data sheet which you can use directly with a calculator or you can enter them into Excel.

Welcome to Physics Forums.
yungman
#14
Jun1-12, 11:25 AM
P: 3,883
On a related subject, how is OrCad simulation compare to LTSpice? I have the Orcad also, but I happened to learn the LTSpice THANKS TO ALL THE HELP FROM vk6kro.
Kholdstare
#15
Jun1-12, 03:09 PM
P: 390
IMO, OrCAD is very sophisticated and powerful design system. It has generally three programs: Capture for Schematic (Capture CIS has vendor part sync), PSpice for simulation (PSpice A/D for mixed mode simulation) and Layout for PCB design. However, to realize what OrCAD can do and to fully utilize it one must go through the reference manual very thoroughly. It is one of the reason its difficult to get used to. But once you have got it, you'd feel it is very convenient.

I had tried LTspice only once and immediately disliked it. I had actually tested two circuits which had convergence issues. I first ran them on ngspice and I got time-step error. I changed simulator timestep using .option but it did not work. I ran them on OrCAD, but it is Lite version and does not support over 60 MOSFETs. I could have done some trickery, but it would be time-consuming. So I ran them on Synopsys HSPICE and I got correct(expected) output at the first try without any problem. It has internal algorithms to manage convergence. HSPICE is one of the BEST simulator in the industry. Then I downloaded and installed LTspice and ran them. Those did run without errors to my surprise and delivered plain WRONG results.
Kholdstare
#16
Jun1-12, 03:23 PM
P: 390
@invertedP - It is much easier to define SPICE models than to find OrCAD libraries. However, you can be lucky and still find them. I have some extra part libraries, which I had downloaded from an OrCAD site. It contains most parts from various manufacturers.

It seems that if you buy the full version, you get a large collection of libraries.

EDIT: Here, i've found the link for those libraries.
http://www.cadence.com/products/orca...downloads.aspx
copy the .olb files under "C:\Program Files\OrcadLite\Capture\Library\PSpice" and they will appear when you click add library button in Capture.
yungman
#17
Jun1-12, 04:28 PM
P: 3,883
Quote Quote by Kholdstare View Post
IMO, OrCAD is very sophisticated and powerful design system. It has generally three programs: Capture for Schematic (Capture CIS has vendor part sync), PSpice for simulation (PSpice A/D for mixed mode simulation) and Layout for PCB design. However, to realize what OrCAD can do and to fully utilize it one must go through the reference manual very thoroughly. It is one of the reason its difficult to get used to. But once you have got it, you'd feel it is very convenient.

I had tried LTspice only once and immediately disliked it. I had actually tested two circuits which had convergence issues. I first ran them on ngspice and I got time-step error. I changed simulator timestep using .option but it did not work. I ran them on OrCAD, but it is Lite version and does not support over 60 MOSFETs. I could have done some trickery, but it would be time-consuming. So I ran them on Synopsys HSPICE and I got correct(expected) output at the first try without any problem. It has internal algorithms to manage convergence. HSPICE is one of the BEST simulator in the industry. Then I downloaded and installed LTspice and ran them. Those did run without errors to my surprise and delivered plain WRONG results.
I have been doing OrCad Layout and Schematic for a long time, enough to draw a big schematic, create symbol and parts footprints, import to layout, layout, padstacks and create Gerber to send out. Just never get to the Spice part. Does the spice program has anything in common to the capture and layout? Would that help in the OrCad Spice?

So far, I got what I want out of LTSpice. I use Microwave Office a lot instead.
Kholdstare
#18
Jun1-12, 09:56 PM
P: 390
@yungman - The program has internal design data file to communicate between Capture and Layout (nothing to do with SPICE). However, PSpice is all about SPICE and does not understand anything else. So there is SPICE line for each Capture parts and additional SPICE stuffs in simulation settings, which are used by Capture to write SPICE code and send it to Pspice for simulation. That's how they do it.

LTspice is alright for small analog and power design. It ok as it does not need to be better in simulating all kind of circuits as its primary customers work in those specific areas. But definitely its not the best simulator. What annoys me is that it does not even show error when it cannot simulate something. All other simulator does that.


Register to reply

Related Discussions
PSpice/OrCAD Sources help yet again :/ Engineering, Comp Sci, & Technology Homework 0
LM317 LDO pin compat replacement for CC op? Electrical Engineering 3
Pcb layout in orcad Electrical Engineering 4
Multisim VS Orcad Electrical Engineering 2