6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 3:43 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Power Circuit
PostPosted: Wed Mar 10, 2021 10:23 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
I'm adding the power circuit to my design. There's going to be a lot of chips (about 19) so I haven't calculated the total draw yet.

I'd like to implement some basic reverse polarity protection along with a fuse. Some examples I've read about and seen recommend using a diode and fuse.

But I definitely could use some advice on what values to use for them. I figure this thread might help some other people too. :-)

Anyway, my schematic is attached below. Any and all advice welcomed!

Thanks!


Attachments:
Power.PNG
Power.PNG [ 25.34 KiB | Viewed 1078 times ]

_________________
Cat; the other white meat.
Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Wed Mar 10, 2021 11:04 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
The 1N4148 may not be able to handle the current, depending on the load. I would put in a 1N4001 instead. Actually, maybe you could use the 4148 as a fuse, LOL. Keep in mind that even fast-blow fuses are not fast at all. The manufacturers' data sheets will show how many minutes it will take to blow it at various overcurrents.

On the switch, how about putting external power on pin 3, and swap pins 1 & 2, so the switch selects which power source you're using. If only one is connected, the opposite position will be the OFF position. Or, you could forgo the switch altogether and put a 1N4001 diode from each power source to the fuse, and the other end of the fuse to the regulator.

_________________
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  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 12:00 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
The old fail-safe for this is to use a standard full-wave diode bridge. Granted, you'll always the voltage drop of two forward-biased diodes (~1.4v) but you'll never have to worry about DC polarity or frying a circuit.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 2:13 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
GARTHWILSON wrote:
On the switch, how about putting external power on pin 3, and swap pins 1 & 2, so the switch selects which power source you're using.

From the design, I'd assumed that "External Power"meant that this header was a supply for additional peripherals which would be turned on and off with the main board. Just goes to show that it's important to think carefully about what you're communicating with the labels on your schematics. (And even moreso, boards, where a poor choice of label on the silk screen might lead someone to plug something in the wrong way!)

floobydust wrote:
The old fail-safe for this is to use a standard full-wave diode bridge. Granted, you'll always the voltage drop of two forward-biased diodes (~1.4v) but you'll never have to worry about DC polarity or frying a circuit.

Oh, that's a brilliant idea! ("Why didn't I think of that?") The extra diode drop doesn't strike me as much of an issue: if you're using a 5 V regulator, a 6 V wall wart would borderline (not that they're all that common anyway), and once you've taken the step to 9 V or higher there's plenty of room for a couple of diode drops. I guess it might even accept an AC PSU, if you had enough capacitance after the bridge?

The other thing I wonder about is protecting against overvoltage. I've got a friend with a video upscaler that came with a 5 V wall wart; the board regulates its input down to the 3.3 V it uses with a small surface-mount regulator. She's blown up the 3.3 V regulator at least twice due to plugging a very similar-looking 12 V wall wart into the device. (The regulator is soldered to a big pad on the board, but even with the extra heat sinking that provides, I guess it's just not enough to handle regulating down from 12 V.) Is there a safe and reasonably cheap and compact way of dealing with that problem, preferably one that doesn't just short the PSU itself?

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 5:13 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
A single Schottky diode will suffice for reverse polarity protection, developing a forward drop about 0.5 volts, compared to the 0.8 volts typical of a conventional diode, such as a 1N4001. Be generous with the diode's current rating to handle the inrush when the capacitors in the circuit charge at power-on. An SB230TA is a good choice for this application and is in the same package as the 1N4001.

The 7805 regulator is self-protecting against overloads and outright shorts. However, I'd use the 78S05 to gain a higher current rating. The fuse's primary worth will be in protecting the power source should the capacitor at the regulator's input go south. No fuse is fast enough to protect the silicon in the circuit from damage.

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


Last edited by BigDumbDinosaur on Thu Mar 11, 2021 5:19 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 5:18 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
cjs wrote:
The other thing I wonder about is protecting against overvoltage.

The 78xx series of regulators can tolerate a wide input voltage range if adequately heatsinked. For example, the 78S05 I mentioned in my previous post can tolerate up to 35 volts at the input. Hence almost any commonly-available wall wart that produces DC output is suitable for this application.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 8:44 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1431
1N4148 is too small, it only can take 100mA of continous current.
1N4001..1N4007 can take 1A of continous current, but to be on the safe side it's better to use a diode which is able to handle twice the current to be expected.
The price of Schottky diodes has dropped over the years, so I think that SB230 (or SB560) would be the best choice.

Would suggest to put a 330nF ceramic capacitor (or 3* 100nF in parallel) between the input of the 7805 and GND to prevent the 7805 from oscillating.
The 7805 datasheet gives some hints about what capacitors to use at the input and output of the 7805.

When inserting a diode into a power supply line like that, it becomes a RF demodulator,
means if your circuitry becomes part of a machine park where there is some RF interference to be expected
(and when your cable between wallwart and 7805 isn't too short for working as an antenna),
professional tinkerers put a 220pF..1nF ceramic capacitor in parallel to the diode to get rid of that effect.
(Because that capacitor in parallel to the diode plus the capacitor at the 7805 input would shunt RF signals to GND).


The problem with wallwarts is, that for some wallwarts the center pin of the output connector is VCC,
and that for some other wallwarts the center pin of the output connector is GND,
so to be on the safe side we can't get around using a diode.

If the diode is inserted into the power supply line, it has a voltage drop, and Schottky diodes have a lower voltage drop.
Another approach would be putting the diode in reverse between the output of the fuse and GND,
so when a wallwart gives out a reverse polarity the diode becomes conducting and blows the fuse.


Note, that the 7805 needs more than 7.5V at the input for generating 5V at the output,
means when a 7.5V powered 7805 gives out 1A, it burns more than (7.5V - 5V) * 1A = 2.5W,
so for the sizing of the heatsink it's better to be safe than sorry.


The average hobby shop is supposed to have the 7805 on stock.
Another option would be buying the Microchip MIC2940A-5.0WT low drop voltage regulator,
because it's more rugged than the 7805 (from the datasheet it can survive -20V...+60V at the input),
and because it's able to generate 5V from a 5.35V input voltage at 1A.

Also, there are switchmode DC-DC converters like the TR2024S05 which are more power efficient than linear regulators.

If quality of wallwart (output) power jack connectors becomes a topic, switchcraft connectors might be useful.
Sometimes we had to replace unreliable wallwart power jack connectors with switchcraft locking power jacks at work...


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 8:58 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
The reason I did not initially recommend a Schottky rectifier is that they leak a lot more than a standard silicon rectifier. They have seem to have improved substantially in recent years, but I have not taken the time to compare the leakage at the worst temperature with how much current the regulator can handle in the reverse direction. Some of the regulators have reverse-polarity protection. Consult the data sheet of course. (As you can tell, I'm not taking the time to do that, only raising the considerations.)

If you go for an LDO (low-dropout) regulator, be careful to follow the data sheet's recommendations for keeping it stable. LDOs are very picky about that. They will specify input and output capacitors within specific limits of capacitance and ESR. If you have 9V or 12V to bring down to 5V, I would just say the easiest for the beginner is something like a 7805 with adequate heatsinking.

_________________
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  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 10:21 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1431
GARTHWILSON wrote:
If you go for an LDO (low-dropout) regulator, be careful to follow the data sheet's recommendations for keeping it stable. LDOs are very picky about that.

LT1084 certainly is very picky about the capacitors at low output currents.
MIC2940A had caused me less trouble.

I agree with Garth that the easiest for the beginner is something like a wallwart with 9V output plus a 7805 with adequate heatsinking.


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Thu Mar 11, 2021 2:03 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Thanks everyone for the input!

I have revised a few things such as dropping the fuse, beefing up the diode and putting a 0.33uF cap near the 7805.

This design is already 10x better than my last so I think I will stick with the 7805 with a large heatsink. Mainly because I already have a lot of them in stock. :-)

Thanks!

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Sat Mar 13, 2021 4:37 pm 
Offline
User avatar

Joined: Thu May 14, 2015 9:20 pm
Posts: 155
Location: UK
It’s still worthwhile having a fuse. Very, very occasionally, a 7805 or similar regulator can fail in such a way that it becomes a short circuit. A fuse may not blow in time to protect your circuit, but it should blow before the mains PSU / wall wart sets the house on fire (assuming you have used an appropriate rating).

A bonus of having a fuse, is that can also be used as a test point to measure the current flow of the power circuit.

Mark


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Wed May 19, 2021 11:49 am 
Offline
User avatar

Joined: Mon Feb 01, 2021 1:07 am
Posts: 44
Location: Sydney, Australia
Hi guys,

Attached is my power circuit (pdf) designed from the information gathered within this thread.
I'd like to have a mobile 65C02 computer that I can take around with me. Size doesn't matter here (within reason).
What I'm trying to do is to have a circuit with two power sources, a Raspberry PI power supply (5.1V, 2.5A), and a 9V battery.
E.g.
On the go: flick the switch to the "Battery" mode
At home: flick the switch to the "Mains" mode

1. How is my circuit? Are there any critical design flaws? Excuse the crudeness, I am quite the newbie.
2. I have duplicates like the polyfuse and the pairs of capacitors (100uF, 0.1uF) one for each power source where it enters the board. I think there's no way around this, which is fine.
3. I'm not sure if I'm using the most appropriate polyfuse (Mfr. No: 06R075BPR) for my cct:
- Hold Current: 750 mA
- Maximum Voltage: 6 V
- Trip Current: 1.3 A
- Current Rating - Max: 40 A

I'd like to use a 78S05 as recommended in one of the posts above, but I already have a 7805 and a heatsink. Plus running in Battery mode wouldn't use much current (I'd imagine).


Attachments:
power cct.pdf [867.34 KiB]
Downloaded 43 times

_________________
Greetings Professor Falken.
Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Wed May 19, 2021 2:43 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
ttlworks wrote:
GARTHWILSON wrote:
If you go for an LDO (low-dropout) regulator, be careful to follow the data sheet's recommendations for keeping it stable. LDOs are very picky about that.

LT1084 certainly is very picky about the capacitors at low output currents.
MIC2940A had caused me less trouble.

I agree with Garth that the easiest for the beginner is something like a wallwart with 9V output plus a 7805 with adequate heatsinking.


I used 1117s a lot (hundreds of boards) without ever having problems - even when sourced from China and using questionable capacitors. If you go with a couple of tantalum caps, I doubt you will have any problems.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Wed May 19, 2021 4:18 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Firefox6502 wrote:
Hi guys,

Attached is my power circuit (pdf) designed from the information gathered within this thread.
I'd like to have a mobile 65C02 computer that I can take around with me. Size doesn't matter here (within reason).
What I'm trying to do is to have a circuit with two power sources, a Raspberry PI power supply (5.1V, 2.5A), and a 9V battery.
E.g.
On the go: flick the switch to the "Battery" mode
At home: flick the switch to the "Mains" mode

1. How is my circuit? Are there any critical design flaws? Excuse the crudeness, I am quite the newbie.
2. I have duplicates like the polyfuse and the pairs of capacitors (100uF, 0.1uF) one for each power source where it enters the board. I think there's no way around this, which is fine.
3. I'm not sure if I'm using the most appropriate polyfuse (Mfr. No: 06R075BPR) for my cct:
- Hold Current: 750 mA
- Maximum Voltage: 6 V
- Trip Current: 1.3 A
- Current Rating - Max: 40 A

I'd like to use a 78S05 as recommended in one of the posts above, but I already have a 7805 and a heatsink. Plus running in Battery mode wouldn't use much current (I'd imagine).


Unless I'm missing something, you have the battery and the Pi +5V supply coming in and going thru a pair of caps in parallel. Caps won't pass DC, so neither position of the switch will result in having +5V to power your circuit.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: Power Circuit
PostPosted: Wed May 19, 2021 8:03 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
The National Semiconductor datasheet for LM1117 has this reference circuit with a battery:
Attachment:
lm1117.circuit.png
lm1117.circuit.png [ 31.93 KiB | Viewed 767 times ]

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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: