Go Back   Home > Forums > Wiki
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Default

AC to DC Power Supply

return to diyAudio Wiki Main Page
back up

This is a simple framework to model the behavior of an AC to DC power supply, useful for looking at inrush current behavior, capacitor charging, and power supply droop under load. It can easily be extended with more sophisticated models, for example a thermistor in place of R1, a "real" relay model, models of specific diodes, ESR for the capacitors, etc.

The AC line source is modeled as a +/-170V sine wave (120Vrms) sourced by V1. Inrush current limitation is accomplished using a 4.7 ohm resistor that is
shorted by a relay after 2 sec. The relay is modeled using a voltage controlled switch, V2 provides the voltage and delay.

The transformer is simply 3 coupled inductors. Adjust the values for L1, L2, and L3 as described in the model to set the output voltage - currently +/- 80V. You will have to fudge the values a little bit from the ideal values due to the K factor which should be between 0.95 and 0.99. (Caveat: I do not have any measured data to suggest if the values for L1, R1, etc. are reasonable.)

Diodes in the bridge are the default model, pick your favorite. Reservoir capacitance is also the default model with no ESR or other details, this can be added if you wish.

A Class B amplifier load on the power supply outputs V+ and V- is modeled using V3, ideal diodes, and ideal current sources. V3 can be set to a sinewave of any desired frequency, set the delay to turn it on after the caps are fully charged. Assuming V3 will swing +/- 1V, set the gain of the current sources for the maximum desired output swing across Rload. In this case I wanted 80% of the rail voltage across 4 ohms, so each current source is set to 16.

Now here's the cool part, you can drive V3 with a .wav file to look at power supply droop while playing music full blast. Set V3 function to None, then ctrl-right click and on the Value line enter
wavefile = "<path to .wav file>"

for example: wavefile = "C:\Documents and Settings\user\Music\1812_Overture.wav"

The result of this is shown in the jpg "railDroopWithMusic", a zip folder of the LTspice file is also attached.

Unfortunately the .wav starts playing at T=0 of the simulation, I do not know any way to control this. It helps to have some blank time at the beginning of whatever file you choose to allow the power supply rails to come up.

Attached Images
File Type: jpg basicPowerSupply.jpg (47.5 KB, 151 views)
File Type: jpg railDroopWithMusic.JPG (91.7 KB, 128 views)
Attached Files
File Type: zip powerSupplySimulation.zip (93.5 KB, 36 views)

Created by mightydub, 18th November 2009 at 07:37 PM
Last edited by mightydub, 18th November 2009 at 11:32 PM
0 Comments, 777 Views
Page Tools
Search this Page


Posting Rules
You may not create new articles
You may not edit articles
You may not protect articles

You may not post comments
You may not post attachments
You may not edit your comments

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Hide this!Advertise here!

New To Site? Need Help?

All times are GMT. The time now is 03:32 PM.

Page generated in 0.07261 seconds (77.88% PHP - 22.12% MySQL) with 14 queries

Copyright ©1999-2012 diyAudio