Power Supply Design Earth Ground Safety Question - Page 1
Forum section: electronics / projects

author: bostonman
author_rank: Super Contributor
timestamp: May 29, 2025, 12:53:27 am
content: Attached is a picture of a disassembled C64 power supply that I disassembled years ago (including a five-volt regulator datasheet and the C64 power supply schematic).I've desired making a new AC/DC power supply (the original goes bad and blows up the C64). The new design, because AC is present, would be in a sealed box. Since the new power supply (I'm probably going with the TO-220 regulator in the attached datasheet) needs to dissipate heat, the heat sink will be exposed to the outside world. Whether exposed by using a metal box, the box cut out to accommodate the heat sink being exposed to dissipate heat, etc...If you look at the picture I attached of the original power supply, the Earth ground (green wire) comes in, connects to one of the transformer plates, and then to the circuit board. Unfortunately I don't have the board to trace where it goes from there, but, looking at the four wires to the C64, it's not part of grounding the external C64.I'm afraid if I connect the Earth ground incorrectly that I may have a shock hazard. Unfortunately I haven't found a C64 power supply schematic that shows where Earth ground connects, so I'm unable to duplicate it.Years ago I built a power supply, possibly using the same regulator, but it overheats, and it was built haphazardly. The transformer shell was plastic and didn't have exposed plates to connect the Earth ground. I used three MOVs on the input (one across hot to neutral, second hot to Earth ground, and third neutral to Earth ground) and believe Earth ground was connected to the heat sink.My question is: assuming I use the same plastic transformer (or even one with an Earth ground connection, what should I do with Earth ground to avoid a shock, but make the power supply safe?

author: WattsThat
author_rank: Frequent Contributor
timestamp: May 29, 2025, 01:08:28 am
content: You connect any metal that may come into contact with voltage to an earth ground. That’s how you prevent shocks. Nothing more, nothing less. It’s not at all complicated.I will point out that the transformer is a split bobbin type where the primary and secondary are wound side-by-side, not one on top of the other. This provides higher insulation levels and greatly reduces the chance of shock and has some other design benefits that I’ll leave to the more qualified to explain.From a safety standpoint, I don’t see where you would need to ground the heatsink of the regulator, it’s already isolated from mains by the transformer and the voltage is quite low and it would be safe to touch.

author: bostonman
author_rank: Super Contributor
timestamp: May 29, 2025, 02:00:53 am
content: I'll admit that in theory I grasp the concept of Earth ground connections, however, then I see power supplies that have capacitors between ground and Earth ground (?) that are used for high pot.Also, I understand the heat sink would be isolated by way of the transformer, but what if the transformer had leakage?

author: ajb
author_rank: Super Contributor
timestamp: May 29, 2025, 07:06:05 pm
content: Quote from: WattsThat on May 29, 2025, 01:08:28 amIt's anyaccessiblemetallic parts that could come into contact withhazardousvoltage that should be bonded to the equipment ground (aka grounding conductor, third pin on the AC plug, etc). So a metal housing that contains mains wiring should be bonded (unless the internal mains wiring is extremely well protected/double insulated), but you don't have to worry about bonding internal heatsinks, or metal housings containing only low voltage wiring, at least from a safety standpoint. It may be advisable to bond them from an EMC or performance standpointQuote from: bostonman on May 29, 2025, 02:00:53 amThe caps are there to shunt high frequency noise from the switching power supply to improve EMC performance when there is no solid connection between the mains ground and the low voltage output. Whether or not the DC output should be bonded to the equipment ground (and if so, how) or left isolated is a separate question and depends on the device being powered. Or if the PSU doesn't even have a mains ground connection, then the choice is made for you.Looking at the pictures and diagram of the original supply, first of all: they don't match. The pictures show the 5A fuse in line with the 9VAC circuit which otherwise just goes straight thru to the output cable. The picture also shows only a single pair of wires from the transformer to supply the 5V circuit, not a center-tapped winding. I guess there's a full bridge rectifier on the board instead of half-bridge, which would account for a few of the extra pins we can see on the PCB -- but there still a few pins I can't account for, which makes me think there are other discrepancies as well. One thing the picture DOES show is that the AC ground connects to the 5V ground, so that's probably what you should do as well.

author: reodor
author_rank: Contributor
timestamp: May 30, 2025, 06:14:19 am
content: Quote from: ajb on May 29, 2025, 07:06:05 pmThe Commodore power supply came in countless variations. Some had a split secondary, while others had a single secondary with a full bridge rectifier. Some used a 7805 regulator, some even used a zener and transistor based regulator, and also at least one other integrated regulator was used, like in the schematic here. Some used a voltage boosting voltage divider, while other did not. Some had a switch, some didn't. Some had two fuses, while other had one. They also came in different enclosures, and, of course, for different mains voltages.The idea that they are all going to fail in the same manner, cannot possibly be true. They're simply too different.

author: bostonman
author_rank: Super Contributor
timestamp: May 30, 2025, 12:49:01 pm
content: QuoteI failed to mention being unable to find a schematic online that matched my disassembled power supply. Sorry about that. Over the years I've seen a few schematics and swore some were saved on my computer as well, but I didn't find any. That was relatively close to the typical schematics I've found, so I posed it as reference.QuoteEarth ground makes sense to me when I disassemble something relatively simple and see the connections. My first thought was if I use a metal case with Earth ground connected to it, then this is a hazard because then I can be electrocuted if I accidentally touch HOT somewhere while holding the power supply. After thinking more, I realized, this would be the typical case for anything such as a stereo with exposed Earth grounded metal; but also realized most home electronics is surrounded by plastic, so this threw a somewhat wrench in my mental gears.Exposing just the 5V DC metal heat sink to the outside world seemed safe, but questioned whether any leakage could occur (from the transformer?) causing the metal to have AC potential to the outside world. I could make the heat sink floating (i.e. not connected to Earth ground on the PCB). Since I never designed something in such a configuration and uncertain how Earth ground was connected in other devices I've disassembled, I wasn't sure if either method above is safe.As for the C64 showing Earth ground connected to 5V DC ground, due to seeing various schematics over the years and knowing some were drawn by possible amateurs, I wasn't sure whether to follow this practice.If 5V DC has two paths to ground (second side of the transformer and Earth ground), then I'm not quite understanding how a normal ground path would take place; seems it would have a ground loop causing noise.The original supply was full of epoxy, thermal conducting I assume (I don't know anything about such epoxy), so a shock hazard was minimal.Unless I'm overlooking something, the best way to connect Earth ground in this case would be connect Earth ground to: the entire metal case (or any part of the metal case), the 5V DC heat sink as a precaution (unless it's screwed to the metal case), and ground on the 5V DC regulator?