6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Oct 31, 2024 11:50 pm

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Aug 25, 2017 8:41 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10971
Location: England
Nearby, Randall had some questions about power supplies. Maybe it's worth a thread - others here have more and deeper expertise than I have, but I'll start out with the picture as I understand it:

  • For most purposes, we want a constant-voltage power supply. There are situations - like welding maybe - where constant current might be interesting, but that's even further from my expertise.

  • As a complete beginner, just use any 5V PSU which has adequate power output. An ATX PSU for a PC is a popular and inexpensive choice, a bench PSU with digital readout and current limit is a high quality choice, and a little board with a regulator on it is probably fine for many purposes. For small projects, a USB cable gives 5V.

  • But for more detail, read on.

  • There is no such thing as a constant-voltage power supply! But within limits, you can get close. Any given power supply will be able to keep the voltage up, up to a certain amount of current. If the circuit being powered demands more current than this, the voltage will go down, maybe become unstable, maybe cut out or maybe something will melt or catch fire.

  • So a power supply has a maximum current rating. But it isn't a constant current supply - it's not trying to push amps, it's trying to hold up voltage. A decent bench supply will have a variable, selectable, current at which it will trip, which is handy if you don't want to damage your circuit when it misbehaves, or damage your PSU when you short out its outputs.

  • Even within the current limit, a power supply will not be completely constant voltage. There will be some noise or some ripple on the line. A higher quality PSU will produce cleaner power.

  • To a first approximation, your circuit will take the power supply, let's say at 5V, and by means of wires will provide 5V power to every chip and component.

  • But the world isn't quite like that - your power wires will not be zero resistance or zero inductance. Therefore the voltage delivered to each component will generally be less than 5V and will generally also fluctuate up and down.

  • So it helps to use short fat wires. To be numerate about it, you'd have a noise budget and you'd calculate how much current each component uses and how it fluctuates and therefore how much voltage drop and voltage fluctuation you'll get, from the resistance and inductance respectively.

  • It also helps to add capacitance: usually a medium to large electrolytic on each board, and a small to medium bypass cap next to each component. A component with greater peak current demands will benefit from more bypass capacitance nearby. For example, a DRAM might drive just one output wire, but a 6502 drives 16 address wires and 8 data wires.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 28, 2017 3:21 am 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
BigEd wrote:
[*] It also helps to add capacitance: usually a medium to large electrolytic on each board, and a small to medium bypass cap next to each component. A component with greater peak current demands will benefit from more bypass capacitance nearby. For example, a DRAM might drive just one output wire, but a 6502 drives 16 address wires and 8 data wires.[/list]

What is the capacitance for. You place it across the power and ground pins of the component, right? What exactly does it do, and why doesn't it short the power?


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 28, 2017 3:59 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8466
Location: Midwestern USA
whartung wrote:
What is the capacitance for. You place it across the power and ground pins of the component, right? What exactly does it do, and why doesn't it short the power?

Capacitors do not conduct direct current, hence they don't short out the power supply. Capacitors will pass alternating current, which gives them the ability to suppress switching noise in digital circuits.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 28, 2017 8:22 am 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
BigEd wrote:
It also helps to add capacitance: usually a medium to large electrolytic on each board, and a small to medium bypass cap next to each component. A component with greater peak current demands will benefit from more bypass capacitance nearby. For example, a DRAM might drive just one output wire, but a 6502 drives 16 address wires and 8 data wires.


BigDumbDinosaur wrote:
whartung wrote:
What is the capacitance for. You place it across the power and ground pins of the component, right? What exactly does it do, and why doesn't it short the power?

Capacitors do not conduct direct current, hence they don't short out the power supply. Capacitors will pass alternating current, which gives them the ability to suppress switching noise in digital circuits.


The larger capacitances are known as Bulk Capacitors, and they help to smooth overall voltage of the system by being a current reservoir - it normally takes a short while for a power supply IC to respond to an increase in current draw, during which time the voltage would drop if there wasn't a capacitor to draw the extra current from.

The smaller capacitances are known as Bypass or Decoupling capacitors, which you put near individual components, and as BDD said these help to filter out high frequency switching noise from the power inputs to the ICs. They can also act as current resevoirs for the individual ICs, but only for a very small transient - not a larger sustained change in power draw. It is important to suppress switching noise on the power pins because an IC (normally) measures its inputs relative to Ground and Vdd, so if your ground or vdd suddenly "bounces" up or down for a short while, the IC might get confused and momentarily read the input as a value it is not. Similarly the outputs are literally powered from the power pins, so they would bounce around too if not for decoupling caps, so the switching noise gets amplified through the IC ready to confuse the next IC.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 28, 2017 9:41 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8534
Location: Southern California
Alarm Siren wrote:
It is important to suppress switching noise on the power pins because an IC (normally) measures its inputs relative to Ground and Vdd, so if your ground or vdd suddenly "bounces" up or down for a short while, the IC might get confused and momentarily read the input as a value it is not. Similarly the outputs are literally powered from the power pins, so they would bounce around too if not for decoupling caps, so the switching noise gets amplified through the IC ready to confuse the next IC.

Ground bounce is caused by a sudden change in an IC's ground-pin current going through the inductance in the lead frame and traces that connect it to ground, particularly to the ground of the other ICs it exchanges signals with.

Let's say you have six previously-high outputs of an 8-output IC that suddenly get yanked down at the same time.  Suddenly the ground-pin current increases, and that rate of current increase, multiplied by the inductance, equals a voltage.  Now suddenly the ground of the die (ie, the actual silicon chip inside the IC) is above true ground.  If there is no ground plane to call true ground, it will be above the ground level of other ICs.  And yes, one implication is that its inputs may appear to switch logic state, since the different ICs now can't agree on what the reference is, as one IC tries to pass a valid signal level to another.

Can a good decoupling capacitor help this situation?  Very little.  That's not really what decoupling capacitors are for.  VDD should be at AC ground too (although the connection to it probably won't be any better than the connection to ground was); so paralleling another AC connection reduces the impedance to AC ground.  However, keep in mind that those outputs which had previously been connected to VDD (through the top transistor in each totem pole) are now no longer loading the VDD connection, so the decrease in current through its inductance means the voltage at the VDD pin goes up too, right along with the voltage at the ground pin!  The decoupling capacitor can help keep the VDD pin and the ground pin 5V apart; but if they move up and down together, relative to the other ICs' VDD and ground pins, we have a recipe for trouble.

The ringing comes from the resonance of these inductances and the capacitive loading of the lines connected to those outputs.

There's a decent ap. note on ground bounce at https://www.onsemi.com/pub/Collateral/AN-640.pdf .  Another ap note at https://www.onsemi.com/pub/Collateral/AN-680-D.PDF tells about dynamic thresholds and noise margins, which ground bounce is involved in.

I may come back and edit this if I see ways to make it more clear.

(Links updated on 5/15/21.)

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 31, 2017 9:28 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
You already managed to make it about a billion times clearer than any of my university lecturers :?

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 07, 2017 3:18 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10971
Location: England
I just came across this site which has an animated illustration of the idea of putting bypass caps close to the chip they are associated with:
Circuit Integrity - Bypassing

See also the linked 'decoupling' page - no animations there, but plenty of explanation.
Circuit Integrity - Decoupling

Edit: replaced with archive links: original now dead.


Last edited by BigEd on Thu Mar 02, 2023 7:57 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 15, 2017 4:48 pm 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
Sometimes power supplies from home appliances can be useful.
I dismantled an old DVD player and got a power supply on a small separate board, which I successfully apply for my home-made devices. +12v stability was insufficient. I added a few turns to the winding and an low-power LDO-regulator. Works fine.

Edit: spelling


Last edited by Vladimir on Sun Dec 17, 2017 2:22 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 15, 2017 4:50 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10971
Location: England
I like that! How many extra windings? How easy to do this?


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 15, 2017 6:01 pm 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
If the bobbin is completely filled with a wire, there may not be enough room for extra turns. But, if there is a gap between the core and the winding, then everything is as easy as falling off a log. Perhaps, three to five turns will be enough. Because of the low laboriousness, it is easy to find out experimentally, for a specific case.


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 16, 2017 5:40 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8466
Location: Midwestern USA
Vladimir wrote:
Sometimes power supplies from home appliances can be useful.

Yep!

Quote:
I dismantled the old DVD player and got a power supply on a small separate board, which I successfully apply for my home-made devices. +12v stability was insufficient. I added a few turns to the winding and an low-power LDO-regulator. Works fine.

A number of years ago, an external SCSI tape drive came my way. I didn't have any use for the drive mechanism (a DDS2) but the nifty switch-mode power supply in the enclosure has come in handy.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 19, 2017 3:50 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1241
Location: Soddy-Daisy, TN USA
Sorry if this is OT.

But one thing I recommend with any new design is at a bare-minimum have some type of power regulation. Like a 7805 or something at least.

It's completely my fault...but I've fried at least 2-3 chips this year for different kits I've built. All because I just plugged a 9v or even (gasp) 12v wall-wart into a kit I built only to realize I forgot it didn't have any voltage regulation. So I sit there like an idiot wondering why it doesn't work and then I notice some chips are hot enough to roast a turkey.

So I guess what I'm saying is...always plan for idiots like me who plug 12v into 3.3V parts...lol

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 19, 2017 8:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8466
Location: Midwestern USA
cbmeeks wrote:
So I guess what I'm saying is...always plan for idiots like me who plug 12v into 3.3V parts...lol

You haven't lived until you install a 500 volt electrolytic in backwards and then bring the (tube) amp out of standby. :oops: I did that—once—and never forgot about it. :mrgreen:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 20, 2017 5:11 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
BigDumbDinosaur wrote:
You haven't lived until you install a 500 volt electrolytic in backwards and then bring the (tube) amp out of standby. :oops: I did that—once—and never forgot about it. :mrgreen:

Ah yes, the re-invention of the "confetti generator".

Mike B.


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 20, 2017 1:48 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1241
Location: Soddy-Daisy, TN USA
Ha! Glad to know I'm not the only one that isn't perfect. :-)

Speaking of high-voltage and power supplies, I worked for a company one time and we had a little server room that I built with some racks, etc.

Anyway, for different reasons we had the main UPS (that was pretty large) sitting off the floor and onto a shelf about crotch level (wait...it gets better...).

So one day the power company is working outside and they drop a 15KV line onto our building's 1KV line...I don't remember the exact numbers but it's something like that...a main street line being dropped onto our building's much smaller line.

Naturally, they fry a bunch of our equipment. Computers, copiers, modems, etc. Basically everything the owners were too cheap to put surge protectors on. Not that it would have helped with that much voltage.

Of course this knocked out our computers and shut them down. So the idiot that I am decided to turn the UPS back on (remember, it's at crotch level)...

I heard a BANG! And sparks and smoke started spraying out of it....the whole front of my pants took the brunt of the sparks!

Luckily, I was able to move out of the way quickly with no damage....but you should have seen me dancing in that small server room! HAHA.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 11 guests


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 post attachments in this forum

Search for:
Jump to: