Here is a good link on how to do it, including background information..
http://web2.murraystate.edu/andy.batts/ps/POWERSUPPLY.HTM
Benjamin Sølberg Electronics, Links