Author Topic: Homemade Commodore C64 switch mode power supply and ground potential  (Read 7373 times)

0 Members and 1 Guest are viewing this topic.

Offline nharrerTopic starter

  • Contributor
  • Posts: 19
  • Country: at
    • Netzgewitter
Hi.

The original power supply of my good old C64 is not working anymore. The 5V rail is dropping to 2.5V with a load connected. Everything is potted, so I can’t fix it. I read they are unreliable and dangerous with age anyway. So I would like to build a replacement power supply.

The original C64 power supply provides 9V AC and 5V DC. They don’t have a common ground and are floating relative to earth. This is the schematic (except I have the 220V version):



I plan to put something together like this:



For the 5V I plan to use a switch mode power supply:
https://www.meanwell.co.uk/media/productPDF/EPS-15-spec_7.pdf

Mean Well EPS15-5
Voltage Out: 5V
Max Current: 3A
Power: 15W
Ripple Max.: 50mVp-p

The 9V Transformer is this one:
https://secure.reichelt.at/printtrafo-10-va-9-v-1111-ma-rm-27-5-mm-ei-48-16-8-109-p27482.html
https://www.reichelt.com/at/de/index.html?ACTION=7&LA=3&OPEN=0&INDEX=0&FILENAME=C500%252FEI48.pdf

Is there anything I could do better? I read that the floating voltages can be up to hundred volts relative to other (earthed) points. Which is not dangerous to humans. But could damage the C64 chips if the bare pins on the C64 connectors are touched with fingers. I think I read in another post here, that this is not a problem with the original power supply which is fully isolated. But might be with a switch mode power supply which has leakage current to the primary side? I can't find that post anymore - and I am not sure at all if I understood that correctly.

Should I connect the ground point after the voltage regulator to earth potential?

Here is a schematic of the C64 power section:
http://personalpages.tds.net/~rcarlsen/cbm/c64/SCHEMATICS/250425/251469-2of2.gif



The way I understand it, it’s not ok to connect any 9V pin to the 5V ground however. Is that right?

Thanks and regards,
Norbert
« Last Edit: February 15, 2019, 09:42:19 pm by nharrer »
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #1 on: February 15, 2019, 09:43:35 pm »
You sure it isn't something drawing a lot of current on the 5V line and pulling it down to ~2.5V? The PLA, SID and RAM in a C64 are all well known to have a failure mode where they're internally shorting 5V to ground. The failure mode of the 5V supply in a C64 PSU seems to be that it starts to rise far above 5V.
« Last Edit: February 15, 2019, 11:11:58 pm by tsman »
 

Offline nharrerTopic starter

  • Contributor
  • Posts: 19
  • Country: at
    • Netzgewitter
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #2 on: February 15, 2019, 11:30:54 pm »
You sure it isn't something drawing a lot of current on the 5V line and pulling it down to ~2.5V? The PLA, SID and RAM in a C64 are all well known to have a failure mode where they're internally shorting 5V to ground. The failure mode of the 5V supply in a C64 PSU seems to be that it starts to rise far above 5V.

I cut off the the 5V from the power supply cable and hooked up a bench supply. The C64 is working well. It draws 800mA in idle. I was about to replace the power supply anyway some day. Read too many scary reports about overvoltage faults (like you said).
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3338
  • Country: ca
  • Place text here.
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #3 on: February 20, 2019, 02:25:18 am »
Keep the Commodore power supply for the 9VAC, and splice in a 5V 2A wall wart.
Problem solved, if not very pretty.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline nharrerTopic starter

  • Contributor
  • Posts: 19
  • Country: at
    • Netzgewitter
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #4 on: March 20, 2019, 03:31:40 pm »
The guy in this video explains why it is a bad idea to use a non isolated switch mode power supply on the C64 (at 3:40):



I guess some wall warts would fall under the same category and could be dangerous to the delicate exposed ports of the C64. I try to summarize it (and I am not sure if I understood it correctly at all): The switch mode power supply is not 100% isolated from mains. Tiny capacitances and the high switching frequency allow small charges to cross the power supply through the c64 and then through your fingers to ground. Not dangerous to humans. But enough to damage some chips of the c64, whose ports are exposed on the outside and can be touched with fingers (I heard the CIA chips are especially sensitive).

PS: I would love it, if someone could confirm or deny the above facts. My electronics knowledge is not deep enough (yeah, yeah - the one who doesn't know has to believe).

PS2: I ended up building the PSU from the video.
« Last Edit: March 20, 2019, 03:40:17 pm by nharrer »
 

Offline jaycee

  • Regular Contributor
  • *
  • Posts: 206
  • Country: gb
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #5 on: March 22, 2019, 10:03:03 am »
I would be weary of SMPS noise with a C64. A dual secondary 9V transformer would work brilliantly - use one secondary with a 5V regulator, and the other secondary to provide the 9V AC. This is basically what the original power supply does.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #6 on: March 22, 2019, 10:39:02 am »
SMPSU noise isn't the major issue, its the leakage current through the class Y capacitor that is commonly fitted from 0V on the secondary side side of the SMPSU to the negative of its primary side DC bus.  The capacitor exists to provide a return path for the HF leakage via the interwinding capacitance from the 'hot' end of the primary to the secondary, to let the PSU comply with  EMI regulations.   Unfortunately, as well as passing HF from the secondary to the primary, it also passes a line frequency leakage current from the primary to the secondary, which although small, has lots of voltage driving it so can easily punch through the gate oxide of unprotected CMOS devices.   It is possible to avoid having a capacitor between primary and secondary side, but to do so requires an interwinding screen which pushes up the cost significantly and is usually only found in medical grade PSUs.  Its also possible to ground the secondary side to ground out the leakage current, (which is what most modern PCs do), but then there is a small possibility of problems with ground loops when you connect a grounded monitor or printer, and there is still a risk of damage if the PSU ground ever gets disconnected.

Although it would be preferable to use a transformer with two 9V secondaries, as the 9V AC supply goes to a bridge rectifier in the C64, with its negative terminal connected to 0V (chassis ground),  you could use a transformer with a *SINGLE* 9V secondary feeding the C64 with 9V AC with a bridge rectifier in the PSU from the same secondary providing the raw DC for the 5V regulator.  The negative sides of the two bridges would be in parallel.  As you need to avoid overloading the bridge in the C64, use Schottky diodes for the bridge in the PSU, rated for the full secondary current  so you can guarantee that its negative side diodes will carry the bulk of, or all the current.   If you do this, fuse both AC lines to the C64.

There's no reason *NOT* to use a switching regulator on the secondary side of a conventional mains transformer for the 5V supply - just make sure its output is well filtered.   Avoiding a linear regulator is desirable if you want the PSU to run cool.

In all cases I'd fit a TL431 + TRIAC crowbar circuit on the PSU 5V rail to prevent it overvoltaging the nearly irreplaceable C64 if the regulator fails.
 

Offline bostonman

  • Super Contributor
  • ***
  • Posts: 1790
  • Country: us
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #7 on: July 05, 2023, 02:36:58 am »
I'm digging up an old thread.

I also plan to build my own power supply, but read switching regulators can spike when switching. From my understanding, this could be dangerous for the old CMOS (?) IC chips in the C64.

Are switching regulators not a good idea to use?
 

Offline Phil_G

  • Regular Contributor
  • *
  • Posts: 71
  • Country: gb
  • G4PHL
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #8 on: July 07, 2023, 02:06:00 am »
For 800mA I wouldnt even bother with switch mode. 
 

Offline mathsquid

  • Regular Contributor
  • *
  • Posts: 247
  • Country: us
  • I like math.
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #9 on: July 07, 2023, 02:19:12 am »
I would be weary of SMPS noise with a C64. A dual secondary 9V transformer would work brilliantly - use one secondary with a 5V regulator, and the other secondary to provide the 9V AC. This is basically what the original power supply does.

I've done this before, and it works great. 5V USB power supplies are everywhere, and 9V AC wall warts aren't too hard to find because they were widely used by external modems in the dialup days.
 

Offline bostonman

  • Super Contributor
  • ***
  • Posts: 1790
  • Country: us
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #10 on: July 07, 2023, 02:39:36 am »
Quote
For 800mA I wouldnt even bother with switch mode. 

I built a linear one (nearly identical to the original), and the regulator gets too hot and shuts down (but it's when I have the box closed).

I'm using a MIC29300-5.0WT in a TO222 package. It has 2 degrees C per watt rise. If it's dropping about 5V across it (approx. 10v on the input) at an amp, that's 5W. That's about 20 degrees C above ambient.

Doing the math doesn't seem like it should exceed the operating temperature of 125, so I'm uncertain.

In any case, I'm not confident enough to make a case that exposes the heat sink due to electrocution issues, so I prefer a sealed case, and why I thought a switching would be better. Also, as mentioned above, the existing linear design (and the original) gets very hot.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6911
  • Country: ca
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #11 on: July 07, 2023, 04:14:00 am »
You need an AC supply because AC is fed into the interface chip(s) as timing reference for the computer's clock. As well as it is used for external add on boards. I'd think if AC clock signal is missing you will not get the related functionality in games such as game timers, or system time. If your supply is DC you need to build a 50/60 Hz clock reference and connect it as replacement for the timing reference.
Facebook-free life and Rigol-free shack.
 

Offline bostonman

  • Super Contributor
  • ***
  • Posts: 1790
  • Country: us
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #12 on: July 07, 2023, 12:58:10 pm »
Yes, I'm aware of the AC portion.

My message was primarily focused on the DC section as that's the part that gets hot. The AC portion comes directly off the transformer.
 

Offline Ed.Kloonk

  • Super Contributor
  • ***
  • Posts: 4000
  • Country: au
  • Cat video aficionado
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #13 on: July 07, 2023, 01:29:44 pm »
How much current is the 5v consuming? I thought 1.5A was the max. ?

Whilst you -could- run a cooler SMPS, with the noise it generates, you'd have to identify and quench yourself. But you should be able to provide 5v @ 1.5A with a linear regulator with the right amount of heat sinking.

Are we on the same page?
https://www.c64-wiki.com/wiki/Power_Supply_Connector
iratus parum formica
 

Offline bostonman

  • Super Contributor
  • ***
  • Posts: 1790
  • Country: us
Re: Homemade Commodore C64 switch mode power supply and ground potential
« Reply #14 on: July 07, 2023, 01:49:06 pm »
I forget how much current I measured, but I'm using 1A as a baseline (with 1.5A being the max).

You're correct, with a good heatsink, a linear would be possible. As I mentioned, I'm reluctant to have an exposed heatsink due to grounding and shock hazards, but I'd prefer linear since it's quiet.

My question was based on whether a switching is possible without damaging the C64, but, as stated above, I'd rather linear since it's quieter.

The original power supply was encapsulated in epoxy that I assumed dissipated the heat since the whole unit got warm. Currently I'm using the original heat sink for my linear regular and the heat sink is hot to touch in open air. I assume a larger mass heatsink would help, but it would need to be exposed to the air to dissipate the heat.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf