Tiny C64 PSU Rejects Tradition, Embraces USB

The Commodore 64 has, by modern standards, the interesting power requirement of needing both 5 VDC and 9 VAC. Traditionally, one would use an iron-core transformer to step-down the wall current — be it 220 V or 115 V, 50 Hz or 60 Hz — to produce the low-voltage AC.

That’s how Commodore did it, and that’s how most of the aftermarket replacements do it, too. That iron-core transformer is bulky, though, and [Side Projects Lab] decided that in this day and age of switching supplies and USB-PD he could surely do better. Which he did, with the diminutive PD-64.

As you can see, it just covers the power port of the C64, and not much else. Partly that small size comes from offloading some of the hard work onto a USB-PD wall wart. The PD-64 requests 12 VDC, which it then steps down to 5 VDC with the usual buck converter, and inverts to 9 VAC in a circuit that is the most interesting part of the project.

There are various ways one could do this, after all, and we’re sure some of you will have different ideas than [Side Projects Lab], but his method seems sound. In order to provide galvanic isolation between the two outputs, the 12 VDC line is first chopped into a 500 kHz signal, and run through a tiny 5:6 ferrite transformer. That output gets rectified to 13.6 VDC, a voltage that is used to run a class-D audio amplifier to produce the 9 V peak-to-peak, zero-DC-offset signal the C64 needs.

[Side Projects Lab] has released both FreeCAD files for the case and STLs as BY-CC-ND 4.0, and a circuit diagram is available for the electrical side. If you don’t want to design your own PCB, [sideprojectslab] will be selling finished versions.

If you’re interested in further dragging your C64 into the modern era, check out the HDMI output that [Side Projects Lab] hacked together for the iconic computer last year.

36 thoughts on “Tiny C64 PSU Rejects Tradition, Embraces USB

  1. There’s a similar USB-C power adaptor for the Commodore Amiga, known as the PowerShark. However, like most Amiga accessories, it costs 80 euros and it’s out of stock everywhere.

  2. Is there an inductive and/or capacitive filter after that class D to remove the upper harmonics? Because this sounds like it would create some entertaining glitch in the analog parts like dot crawl somewhere.

    1. I work on a Teradyne Eagle automated IC tester, the sort of million dollar equipment that is at the far end of a semiconductor fab to ensure that all the chips you’re selling meet the datasheet specifications. The analog section of the eagle test cage uses a 100VAC 19kHz power supply to run all the test cards. In the tower that provides all the power rails for the system, there are two QSC audio amplifiers, the same as I’ve seen at rock concerts. They spend their whole lives just amplifying a pure 19khz sinewave and apparently they’re much cheaper and more durable than other solutions.

  3. A stereo class-D audio amplifier also makes a fine 3-phase motor driver! (if your controller doesn’t mind) The third motor leg goes to supply return/neutral. You don’t need to float (galvanically isolate) it, like this supply does, but if you don’t the whole winding swings through the voltage range, increasing the capacitive leakage to chassis ground — not usually a big deal.

      1. If they are AC-driven it should be no issue, as long as the impedances are reasonable. If you need to go down to DC, that’s when you need to pay attention to blocking caps and alternate ground paths.

        1. Synchros look superficially a bit like three phase, but all three legs are actually in-phase, 400Hz, just with differing amplitudes. Negative amplitude looks like inversion, but all the zero crossings occur together. So that ought to yield readily to a small amplifier solution.

          1. The neat thing is that the three degrees of freedom (amplitudes on three legs) can be redistributed to two amplitudes and a phase difference. So it’s totally possible to drive a three-legged device with a two-channel amplifier, as long as you don’t have a fourth leg requirement (like a wye connection or other ground).

  4. Given how many c64 power supplies cooked themselves, this strikes me as useful.

    (Commodore’s original power brick for these put the regulator on a reasonable size heat sink, and then encapsulated the whole power supply, heat sink and all, in potting compound… With the obvious result that eventually the regulator would overheat and die.

    Traditional solution was to take a hammer and chisel, cut open the case to take out the potted circuitry, chip off the end of the potting where the heat sink lived (usually breaking the dead regulator when you pulled out the heat sink), attaching new regulator to the heat sink with thermal paste, attached short wires from the new regulator to the broken off pins of the old regulator (might need to do a bit more careful excavation to access those), reassemble in the case and trust that it wouldn’t get hot enough to significantly melt the case plastic. A bit ugly but effective; definitely a hack.

    Replacing the whole brick-sized PSU with a cheap PD adapter makes sense to me.

    1. unfortunately the news of this quirk of C64 has spread and there are a lot of unnecessary hacks and aftermarket power supplies sold for other 80s micros. Because it was so popular, and had so many PSU failures, that people assume they are a function of age or just 8-bit computers generally. This is very much a Commodore thing. I suppose now it does bring in needed extra money for small retro shops. It just annoys me.

      1. what annoys me even more is that people are “recapping” for no good reason. they just assume “old caps are either bad or are going to go bad anytime soon” and spend hours recapping boards unnecessarily

        in my experience fixing dozens of old electronics, “bad caps” are not the widespread problem people think. there are certainly many of them out there but usually they are specific caps. for example, the B+ capacitor in CRT TVs is a classic – every CRT that goes through my bench has this cap checked. most of them are bad (it’s a filter for a half wave rectifier after all)

        but very rarely I see other capacitors fail. even in old TVs that have dozens of them, I always spot check them. 80s vintage have mostly good quality japanese capacitors and they always measure within spec.

        the problem is that the “capacitor plague” of 2 decades ago is how capacitors have always been. ironically old machines from the 80s are often in much better shape than a machine from 2005. latter ones do require recapping.

        and now you have people replacing capacitors on old computers “just in case”, throwing excellent Nichicon or Rubicon caps in the trash for generic trash caps that will inevitably fail in a few years of poor manufacturing.

        it’s just tragic.

        1. There’s a lot of hobbyists treading the same ground with some of these old machines, and more than enough anecdotal reports of destroyed PCBs from leaked caps on specific machines that preventative replacement in some cases is a preservation measure.

          Smoke detectors are likely going to work for far longer than their “best by” date, but manufacturers come by that based on testing data and tracking field failures. The stakes are higher, but there’s a good reason newer detectors have an end of life warning.

          A hobbyist trying to preserve a Mac Classic can spend a few bucks and an afternoon replacing the known leaky early SMT electrolytics and know they won’t have to worry about corroded traces for a few more decades. Someone with an old HP 3478A DMM would want to swap out the Rifa filter caps so they don’t explode and destroy the irreplaceable hybrid module.

          I’m not saying that blindly replacing every cap in a gadget is a good idea, but neither is sticking your head in the sand and ignoring well known failures in certain devices just because the vast majority of old caps aren’t posing a problem.

      2. I think that the problem was specific for some C64 PSU made by some OEM that made it for Commodore, using the same or a similar external box but different internals. some power supplies have a fuse for the 5V line and the 220V input. Some PSU were gued toeghether, some used screws, and of course 220V and 110V models were different. So it’s possible that PSU made from a specific OEM were prone to fail, while others not.

    1. Yes but the 3.0 standard added PPS, so you can select output voltage in 20mV increments and get whatever you want. Many supplies with PPS outputs are available.

      1. So now you can call for 13.5V DC, and then derive 5VDC, and then get rid of the transformer stage. Still need the microcontroller, the opamp, and the class-D amp. But getting rid of the transformer is a significant improvement to have a true transformer-less design.

    2. From the manual: “The PD-64 will not activate the 9vAC output if it is
      not able to negotiate 12vDC input from the USB-PD adapter.”

      Seems safe enough, you will just be without anything that uses the 9vAC. TOD clock, serial, tape drive etc.

    1. Uses a SX3M20.000A10F20TNN as oscillator and a ATtiny402-SS to generate the 5k signal it seems, so as accurate as that combination.
      I suppose you could replace the oscillator with a very expensive super-accurate one, or you could buy an atomic clock and use that :)
      Or .. just get the 50/60HZ signal from mains via an optocoupler and feed it with an extra line.
      Come to think of it, seeing mains has the annoying habit of creating hum in amplifiers, perhaps just use a coil to pick up the hum all around you and filter/clean/amplify it. I wonder if anybody ever did that.

  5. Right, the SFFPC community often considers things like TinyPSU as cheating, because it puts the mein part in a brick outside the PC. I don’t care; i have a SFFPC for convenience, not for some purity requirements. And half of the mainboard power pins are outdated (respective workarounds) anyway.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.