I'm using a LM317 to regulate dc voltage output from mains power(240V ac). For PSPICE simulation, I was instructed to use an ideal OpAmp and Darlington BJT to model the IC in PSPICE. I came up with the following model, which satisfies the equation Vo=Vref(1 + RL/RH), where Vref = 1.25V(nominal voltage for the IC). Function of the circuit is to supply power to another device.
Refer to attachment regulatorDC.jpg
[For OPAMP, VPOS = 50V, VNEG= -50V]
I tried using a dc input to the circuit and it works as expected i.e. Output voltage = 1.25(1+RL/RH) for any input voltage and load resistance as long as the input is higher than the desired output. For example, having RL=1320, RH = 120 and Vin = 10, I only obtain 10.2V instead of 15V.
To obtain power from the mains, a transformer and a rectifier is required. So firstly, I attempted to simulate the circuit without the transformer.
I have tried connecting a AC source(VSIN) to a full-wave diode rectifier(w/ smoothing cap) to the circuit. However, the circuit still gives a output of 15V(same resistor values as example above), for any VAMPL of the VSIN, even VAMPL = 0. I used two VSIN with ground in the middle because PSPICE requires me to ground that loop else I get an convergence error.
Refer to regulatorAC.jpg
What is the mistake I'm making? I tried the function of the rectifier seperately in a simple test circuit, and it works fine. Is it something to do with the OPAMP's VPOS and VNEG? It didn't seem to affect during the test with dc input. Or is the current being drawn for the source(although the voltage isn't sufficient) to give the desired voltage at the output? If that's the case, do I need to use the transformer to isolate the regulator from the source? I have tried using XFRM_Linear as a transformer and still have the same undesired results.
Please tell me if any clarification is needed. Thank you in advance.
EDIT: The circuit still gives 15V output WITHOUT any input source connected. Only sources remaining are the 1.25V VDC for the reference voltage and the supply to the OpAmp
Refer to attachment regulatorDC.jpg
[For OPAMP, VPOS = 50V, VNEG= -50V]
I tried using a dc input to the circuit and it works as expected i.e. Output voltage = 1.25(1+RL/RH) for any input voltage and load resistance as long as the input is higher than the desired output. For example, having RL=1320, RH = 120 and Vin = 10, I only obtain 10.2V instead of 15V.
To obtain power from the mains, a transformer and a rectifier is required. So firstly, I attempted to simulate the circuit without the transformer.
I have tried connecting a AC source(VSIN) to a full-wave diode rectifier(w/ smoothing cap) to the circuit. However, the circuit still gives a output of 15V(same resistor values as example above), for any VAMPL of the VSIN, even VAMPL = 0. I used two VSIN with ground in the middle because PSPICE requires me to ground that loop else I get an convergence error.
Refer to regulatorAC.jpg
What is the mistake I'm making? I tried the function of the rectifier seperately in a simple test circuit, and it works fine. Is it something to do with the OPAMP's VPOS and VNEG? It didn't seem to affect during the test with dc input. Or is the current being drawn for the source(although the voltage isn't sufficient) to give the desired voltage at the output? If that's the case, do I need to use the transformer to isolate the regulator from the source? I have tried using XFRM_Linear as a transformer and still have the same undesired results.
Please tell me if any clarification is needed. Thank you in advance.
EDIT: The circuit still gives 15V output WITHOUT any input source connected. Only sources remaining are the 1.25V VDC for the reference voltage and the supply to the OpAmp
Attachments
Last edited by a moderator: