electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
How to design and build a PSU (power supply)...
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [22 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Sat Jan 14, 2012 3:32 pm    Post subject: How to design and build a PSU (power supply)... Reply with quote  Mark this post and the followings unread

OK, well, there's been a bit of banter about power supplies lately, so I figured I'd start something here with the hopes of turning it into a complete document at some point.

Power supplies are one of those silly things - a good power supply won't add anything to your sound, but a bad power supply can really mess things up!

First, let's talk about different types of power supplies. I used to work with tube amplifiers (still have a blackface Showman and a 70's Ampeg SVT!). Tube amps use quite high voltages, maybe 400V or higher. The power supplies are unregulated, meaning that the output from the supply isn't controlled or limited. If the mains voltage goes up or down, the PSU output will go up or down proportionately. Because of this, you may find that your tube amp sounds great in one place but not another. If you don't have enough power, you won't drive your tubes enough, and if you have too much power you might burn them out. One solution to this is to carry a variac around with you and adjust it accordingly...

In a similar manner to controlling your audio levels, you can limit, or regulate, the output voltage from a power supply. There are different kinds of regulators (linear, switching), but they all smooth out the power signal and limit it to a certain voltage. Linear regulators adjust their resistance based upon load and provide a constant output voltage. Because of this resistance, heat is generated inside the linear regulator and must be dissipated. Switching regulators are similar to using PWM to control the brightness of an LED. That is, a switcher turns on and off to control its output. Switchers are much more efficient and there is very little heat generated.

You'll probably hear purists denigrate switching regulators. If you use an older SMPS (switch mode power supply) that has a low switching rate in the audio range, it can really mess up your sound! Newer switchers operate in the MHz range, which won't interfere with your audio at all.

More soon...

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Sat Jan 14, 2012 5:00 pm    Post subject: Deciding what we need. Reply with quote  Mark this post and the followings unread

OK, I know it's tempting to want to dive right in and solder something together, but we have to decide what we're trying to accomplish first.

For the purposes of this discussion, let's set some goals. First, the output of our supply: there are a lot of DIY analog circuit designs that use both positive and negative voltages. Both 12V and 15V designs are quite common. I've chosen 15V since I work primarily with 5U and 3U (Frac) sizes.

Next, we have to take into account what our input is. I'm located in the United States, so I deal with 120V AC mains.

After we get the power set up for our analog modules, then we'll figure out how to run our digital side. The chips I use operate on 5V, so at the end of this example, we'll have a power supply that provides +15V, -15V and +5V.

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Sat Jan 14, 2012 6:23 pm    Post subject: A note about power ratings. Reply with quote  Mark this post and the followings unread

Some people I have talked with have been confused by power ratings.

Most power ratings are just telling you what the maximum possible is allowed to be. For example, if you select a capacitor with a 35V rating, that means it will work with any voltage up to 35V. If you select a regulator that is rated at 1A, that means that you can draw up to 1A out of that regulator. It doesn't take 35V to "run" that capacitor, or 1A to run that regulator...

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Sun Jan 15, 2012 10:57 am    Post subject: Converting AC input to DC... Reply with quote  Mark this post and the followings unread

In my way of thinking, there are two major parts to a power supply. The first section converts your AC mains power to DC and the second section then controls the DC output.

Let's talk AC to DC conversion. I'll make some updated drawings and graphs, but in the mean time, here's an article I wrote almost twenty years ago. The basic ideas haven't changed:

http://www.ampage.org/htac/TAME1

The supply in that article only creates a positive voltage. (Or I suppose, to be pedantic, it only allows positive voltages through.) To create a negative supply, simply reverse the directions of the rectifiers. If you need both positive and negative voltages, we combine the two forward rectifiers with the two reverse rectifiers. You can see an example of that in this CGS power supply diagram:

http://www.cgs.synth.net/modules/cgs14_psu.html

EDIT: Here are some more diagrams like the ones I'm going to make. This should get you started:

http://www.kpsec.freeuk.com/powersup.htm

Regards,
Doug

EDIT: Just to reiterate, I plan to make updated drawings and graphs to include here....

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Tue Jan 17, 2012 3:59 am    Post subject: How to describe things with actual math, oh my...
Subject description: Half the fun is figuring out the tools!
Reply with quote  Mark this post and the followings unread

It's been fun trying to figure the best way to create graphics for this thread. I'm hopelessly old school (yep, I was born in the 50's) so I usually use pencil on graph paper... Laughing

Thankfully, there are some cool people in the E-M Chat Room (see link near top right of this page) so I now know about Wolfram Alpha. Thanks guys!

Here's a plot of a mains AC voltage:

http://www.wolframalpha.com/input/?i=y=sin(x)*120+from+x=0+to+x=30

And here's a plot of that same voltage after going through a transformer:

http://www.wolframalpha.com/input/?i=y=sin(x)*21+from+x=0+to+x=30

Here's that voltage rectified with the diode facing one way:

http://www.wolframalpha.com/input/?i=y=sin(x)*21+for+y=0+to+25+from+x=0+to+x=30

And here's that voltage rectified with the diode facing the other way:

http://www.wolframalpha.com/input/?i=y=sin(x)*21+for+y=0+to+-25+from+x=0+to+x=30

Here's the voltage plot from a center-tapped transformer:

http://www.wolframalpha.com/input/?i=y=|sin(x)|*21+for+y=0+to+25+from+x=0+to+x=30

EDIT: Yeah, I know I cheated on that last formula, but I hope you can forgive me. (The end justifies the means?)

Now to make some graphics of transformers and rectifiers so you can see what I'm really talking about...

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Tue Jan 17, 2012 10:44 am    Post subject: Alternating current... Reply with quote  Mark this post and the followings unread

I'll set up a wiki or some kind of document with more links, but here's a nice write up of what AC is about:

http://www.allaboutcircuits.com/vol_2/chpt_1/1.html

Here's a chapter on transformers:

http://www.allaboutcircuits.com/vol_2/chpt_9/1.html

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Tue Jan 17, 2012 1:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Something I always find a PITA is the math behind a basic 78xx/79xx supply.

I know that having raw DC enter the reg at 3 volts above (for positive) the regulator's output is ideal to keep heat dissipation to a minimum.

We should have formulae posted here I think to help with that. For example, if I want a +/- 12 volts supply (1 ampere each), how many volts should the transformer output - for halfwave and also for fullwave.

How large should I make the caps? (again, for both half and full wave rectifiers)... I know too large can cause an inrush problem, but too small allows possibly excess ripple. So we want it "just right".

I admit that I use a sort of rough guesstimate - and it has worked for me, but there's got to be formulae that we can use to make sure we buy the correct value stuff the first time.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Tue Jan 17, 2012 1:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

Always good to hear from a fellow plown... Cool

I've been using two capacitors on the input myself. One small one and one large one. That seems to smooth things out a bit...

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Wed Jan 18, 2012 6:18 am    Post subject: Reply with quote  Mark this post and the followings unread

OK, just for grins, here's a power supply design that is used in the MB-808. Hopefully we can use it for a good example of some of the trade-offs that are made in power supply design.

This design uses the very common 7805 +5V regulator, the 7815 +15V regulator and the 7915 -15V regulator.

Regards,
Doug


MB-808 PSU.png
 Description:
Example Power Supply Design
 Filesize:  31.12 KB
 Viewed:  664 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

MB-808 PSU.png



_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
theglyph



Joined: Aug 15, 2008
Posts: 31
Location: Jachsonville, FL

PostPosted: Wed Jan 18, 2012 8:34 am    Post subject: Reply with quote  Mark this post and the followings unread

In the above supply, what exactly do D35/D36 (D39) and D37/D38 perform in the circuit?

Thanks!
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Wed Jan 18, 2012 2:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Those are the paranoia diodes...

Laughing

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Wed Jan 18, 2012 2:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

And D41?
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
theglyph



Joined: Aug 15, 2008
Posts: 31
Location: Jachsonville, FL

PostPosted: Wed Jan 18, 2012 4:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dougster wrote:
Those are the paranoia diodes...

Laughing

Regards,
Doug


HA, I should have the the CGS14 doc more clearly. There are two Diodes "PER REGULATOR!" Embarassed

Also as Blue Hell asked, what's D41 for?
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Wed Jan 18, 2012 4:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, I was going to post more before now, but I had a department meeting to go to. Day jobs, heh... Rolling Eyes

Anyway, yes, those two diodes are about protecting the regulator output. As I said, "paranoia" diodes, you can take that two ways, 1) if you're paranoid that you'll damage something it's a good idea to put them in, but 2) if you're paranoid enough to make sure that everything is exactly perfect, you won't need them... Laughing

D41 is a simple one, without it, the 5V section is separate and needs its own transformer, and with it, the 5V section takes its input from the same place as the +15V. I could have used a jumper, but I'm a bit paranoid... Wink I had some transformers made up that have three secondary windings, two for 15V and one for 5V, so I leave that one out of my builds. For extra points, what about C21 and C26? Are they necessary if D41 is in place?

While I'm at it, C211 through C237 are distributed across the MB-808 PCB. (There are eleven separate voice sections.)

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Wed Jan 18, 2012 5:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dougster wrote:
D41 is a simple one, without it, the 5V section is separate and needs its own transformer, and with it, the 5V section takes its input from the same place as the +15V.


Ok, thought it might be that.

Could you clarify DGND a bit too? People will break their heads over that one once they built I guess ... as it goes "nowhere" now.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Wed Jan 18, 2012 5:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
Could you clarify DGND a bit too? People will break their heads over that one once they built I guess ... as it goes "nowhere" now.

In this particular design, everything is included on a single board, so DGND (digital ground) and PE (analog ground) are planes that are poured copper on the PCB. L1 is a ferrite bead that connects the two. The two and three pin output headers are optional...

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Wed Jan 18, 2012 5:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dougster wrote:
PE L1


Oops - had missed both Laughing

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Wed Jan 18, 2012 5:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Looks like we're going to reach critical mass for power supply discussions here on E-M...

Linear Power Supply For Modular Synth Application

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Wed Jan 18, 2012 5:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Looks like, yes, good idea to cross link the threads as everyone likely will, and thus far seems to, have a different focus on the subject.
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
theglyph



Joined: Aug 15, 2008
Posts: 31
Location: Jachsonville, FL

PostPosted: Wed Jan 18, 2012 5:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Doug!

Yes, I'm paranoid enough to make sure everything is exactly perfect and certain enough that I'll still screw something up so in goes the Diodes! Laughing
Back to top
View user's profile Send private message
Tony Deff



Joined: May 25, 2008
Posts: 51
Location: Suffolk, UK

PostPosted: Sat Sep 22, 2012 1:15 pm    Post subject: "Floating-ground" PSU
Subject description: How "relocating the ground" can simplify things elsewhere
Reply with quote  Mark this post and the followings unread

Dougster wrote:
Looks like we're going to reach critical mass for power supply discussions here on E-M...

I had thought that this tip comes a few decades too late, as virtually nobody seems to build their own analogue supplies these days..

In an era when packets of peanuts are emblazoned with the statutory Health and Safety banner: "Warning: contains nuts", old-timers sometimes forget that some people have not yet learnt that electricity is dangerous. An earthed metal case for a power supply not only reduces the fire risk and protects you from exploding capacitors (!), but also cuts-down on hum pickup in amplifiers, shields fingers from lethal voltages and guards against the line/mains wire coming loose. When constructing the PSU, an earthed metal plate (perhaps the heat-sink for the bridge rectifiers) can be situated to shield the "hot" side of the transformer. A rubber grommet in the metal case protects the input supply lead and fitting a tie-wrap or simply tying a knot in the cable protects against bare wires being jerked free.

The end result can be much safer than cheap imported light-weight supplies in plastic boxes which radiate and in which the critical capacitor can break down and the box melt. Now we've got the legal stuff out of the way, let's get to the point...

Conventionally, one output of the bridge rectifier is grounded, or in a dual ± supply the centre-tap of a 12-0-12 transformer is grounded. For a heavy-duty supply requiring heat-sinks, this requires insulating the regulator/output transistor from the grounded heatsink (messy and awkward), else risking sparks flying by having the heat-sink at the full "raw" rectified voltage.

If you choose a transformer with separate 0-12V, 0-12V outputs, you are free to re-locate the ground. In the attached diagram, the output power transistor is mounted directly on a grounded heat-sink and the "regulated output" comes straight from the bridge rectifier!

The diode completes a "poor-man's long-tailed pair" with the advantage that it can tolerate a large reverse-voltage. If an accidental output load is your screwdriver to ground, the diode cuts-off and current is limited to the current through the emitter resistor, multiplied by the gain of transistor Q2. This protects the components until the fuse blows.

The MJ3001 is a power Darlington, with built-in base-emitter resistor. Its TO3-style metal case is connected to the collector.


PSU.gif
 Description:
Simple current-limited regulator "turns things upside-down"
 Filesize:  23.43 KB
 Viewed:  355 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

PSU.gif


Back to top
View user's profile Send private message
bubzy



Joined: Oct 27, 2010
Posts: 594
Location: United Kingdom
Audio files: 64

PostPosted: Mon Sep 24, 2012 2:07 am    Post subject: Reply with quote  Mark this post and the followings unread

hey dawg!

i have a 160va transformer, which by my calculations would provide me with more than 1amp per regulator in your design.

so im guessing that i can just add another "regulator phase" after the fuses of +-15 and have 2 rails at 1amp?

hope that makes sense :p

_________________
_Richard_ Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [22 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use