Voltage Regulator Simulation in LTSpice - Page 1
Forum section: electronics / beginners

author: HoracioDos
author_rank: Frequent Contributor
timestamp: March 10, 2017, 03:04:26 pm
content: I started to simulate a voltage regulator in ltspice to see the rectifier bridge output, ripple, etc.. I want to build a simple PSU which I can understand and repair easily, but in the first place just for learning purpose. (See Pic1).I'm following the Elenco XP720 design with a 220V to 17VAC input and I found some diffences between the spice model and the user's manual. I know I could have done a lot of mistakes but I would like to know how accurate this kind of models can be. For example:a) Block Diagram (see Pic2) shows that the rectifier bridge output voltage is higher than the transformer output, but in the spice model is lower. Am I doing something wrong?b) Output voltage is about 14.5V when it should be 15V. Is it due to some limitations or errors in the model? See Pic3.c) Resistor value for RV is 2Kohms (Elenco's value) but I can see a lot of ripple. It gets lower with 1K5. See Pic3 and Pic4 with 2Kohms.Later, I began to simulate a dual tracking supply with a LM317 and LM337 (See Pic5) and it seems that they are not the exactly opposed or the spice model is wrong because there was to much difference between positive and negative voltage levels.d) Are LT150A and LT103 a better option than LM317 and LM337 to use them this way? Is the model not accurate enough to get a good result?I was tired so I started to play a little bit. I didn't want to set a RC filter to the adj pin at first I only wanted to use a a 2Kohms 10 turns pot that I already have. (See Pic6) and I found that the ripple is a lot lower for 3.3V, 9V and 15V in the regulator output. (See Pic7,Pic8 and Pic9)e) Will it work in real life?f) Am I seeing ripple or it's something else?Thanks!

author: HoracioDos
author_rank: Frequent Contributor
timestamp: March 10, 2017, 03:10:05 pm
content: Quote from: HoracioDos on March 10, 2017, 03:04:26 pmI forgot to tell that I also tested a 20VAC and 24VAC inputs.

author: Zero999
author_rank: Super Contributor
timestamp: March 10, 2017, 08:36:30 pm
content: Is it really necessary to simulate, such a simple circuit in such detail? I can't say I've ever simulated a basc LM317 before in my life.I suppose it's a good exercise for learning LTSpice.The AC voltages are wrong. You've specified the RMS voltages, yet SPICE uses peak voltages. If the mains voltage is 220VAC then you should specify a peak voltage of 220×2½.

author: danadak
author_rank: Super Contributor
timestamp: March 10, 2017, 10:07:00 pm
content: I simed a LM317 the other day examining capacitor esr effects on transientresponse. Simple minded stuff, but found results interesting. Use of wrongcap can easily reset a processor being powered by the 317 if one is notcareful. Load dependent of course.Biggest problem these days is completeness of sim model, some manufacturers betterthan others. Buyer beware. Correlation with bench a must.Regards, Dana.

author: ruiseixas
author_rank: Contributor
timestamp: May 10, 2017, 11:13:19 am
content: Quote from: HoracioDos on March 10, 2017, 03:04:26 pmDon't know, what I would like to know is how you add those LMs to the LTSpice. I'm trying to implement thisregulators LM78xx librarywithout success. Please send me your .ASC simulation file so that I'm able to do so!Thanks

author: HoracioDos
author_rank: Frequent Contributor
timestamp: May 10, 2017, 12:14:57 pm
content: Quote from: ruiseixas on May 10, 2017, 11:13:19 amHiI never used that library. So I can't help you on that right now. But if you want to share .asc files with other It would be better not using libraries and add spice directives to embed models. You may find interesting this link about how to create symbols.http://www.linear.com/solutions/4678I've attached a schematic file and a symbol file for voltage regulators. I hope this help you.PS: Beware that AC input voltage is wrong. It must be Peak Voltage not RMS voltage.