Author Topic: Understanding Retro Electronics  (Read 11593 times)

0 Members and 1 Guest are viewing this topic.

Offline Lazy Dude

  • Supporter
  • CPC6128
  • *
  • Posts: 296
  • Country: england
    • index.php?action=treasury
  • Liked: 91
  • Likes Given: 159
Re: Understanding Retro Electronics
« Reply #25 on: 23:57, 05 February 18 »
Got to get me one of those T-shirts   :D

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.978
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3874
  • Likes Given: 400
Re: Understanding Retro Electronics
« Reply #26 on: 11:00, 01 March 18 »
Another good video from Dave. This time showing how to find a shorted power rail on a massive board full of TTL chips:


https://www.youtube.com/watch?v=11YX-yByl10


Bryce.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.978
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3874
  • Likes Given: 400
Re: Understanding Retro Electronics
« Reply #27 on: 14:31, 17 April 18 »
Power supplies

It's been a while, so once again I thought I'd write a small piece to explain an aspect of retro electronics that I get asked quite often. This time I'd like to talk a bit about power supplies. The differences between Analogue PSU's and Switched Mode Power Supplies (SMPS) and why SMPS's (especially cheaper ones) aren't recommended for powering retro gear.
So what's the difference and why are there two different types of PSUs? The first noticeable difference is the weight. Any Amiga fan out there will tell you that there are "Heavy Amiga PSUs" and "Light Amiga PSUs". The heavy ones are analogue, the light ones SMPS. Both supply 5V and +/-12V so why have two different types? Let's see...

This is what's in an analogue PSU (5V) and how it works:


* ANPSU.png
(4.37 kB, 630x169 - viewed 321 times)


Starting from the left, the 220V AC mains comes in at JP1 (there's most likely a common mode choke / fuse / MOV / PTC and other bits, but this is a very simplified description). The transformer then reduces the 220VAC to about 15VAC in this example. A transformer is nothing more than a chunk of laminated iron with two or more copper coils wrapped around it. The ratio of the turns of coil determines the value of the secondary (output) voltage. So if the secondary coil has half as many turns as the primary (input) coil, the voltage would be halved. Two important things to know: Transformers only work with AC, not DC (the voltage needs to be constantly changing value) and (very important for this discussion) the size of the iron core required is relative to the frequency of the varying voltage. Mains AC is 50Hz in Europe, so a big chunk of iron is required. The higher the frequency, the smaller the core can be.
After the voltage has been stepped down, it then needs to be rectified (converted to DC). This may be done by a single bridge rectifier component (B1) or by discrete diodes (a bridge rectifier is just 4 diodes in a single package), depending on what the designer preferred (or what was cheaper). The voltage will still have a small amount of ripple (a varying wave on top that is in time with the AC frequency) and this can be reduced with capacitors (C1 and C3). The voltage at this stage is still unregulated, meaning that it's value still depends on the original input voltage. So if the 220V were to increase or decrease, the 12VDC would do the same. Obviously not good, so the next stage is the regulator. This component (or circuit) will take a voltage and regulate it to an exact, stable voltage. The output will always be the same whether the input voltage varies or not  as long as the input voltage is sufficiently higher than the required output voltage. Exactly what our CPC needs. The last stage of the PSU is some more capacitors. These help the regulator do its thing by stabilising the output in moments where the CPC suddenly pulls more or less current from the PSU.
Here's a picture of the inside of an Amstrad MP-1 which contains an analogue PSU. The transformer is pretty obvious, the rest is on the PCB at the front. Amstrad chose discrete diodes for the rectification and the regulators can be seen attached to the heatsink on the right.


* MP2_Power_Connections.png
(830.04 kB, 640x744 - viewed 316 times)



Switched mode power supplies.


* SMPSU.png
(7.11 kB, 810x333 - viewed 316 times)


At first sight, this might look quite similar to the analogue PSU above and it uses many of the same components. However, it works completely different. The first big difference you'll notice is that the rectifier is now before the transformer. But, but... you said transformers only work with AC...?? This is where that controller IC and that big transistor comes into play, but we'll get to that in a minute.
Starting again from the left, the 220VAC mains comes in through JP1, but this time it's immediately converted to DC with B1 and a pretty big capacitor (C1) stores this energy. This is what makes SMPS's so dangerous to work on. This capacitor can store a massive amount of energy at very high voltages (about 310VDC from a 220VAC mains source). R1 is called a "bleed resistor" and its job is to discharge the capacitor when the power goes off, however this part is not present in many cheap SMPS's although its cost is tiny. So touching the contacts of any parts on the primary side of the transformer could result in instant death if you are unlucky, even if the device has been turned off for days! Moving quickly along... R2 and D1 create a local low voltage to power the controller and a few other components on the primary side. The controller is the bit that does all the magic. It switches TR1 on and off very quickly (usually some frequency above 100kHz) which creates a sort of artificial high frequency AC. In reality just a square wave, but this is enough to keep the transformer happy that it's AC. But because the "new AC" is at a very high frequency and also current limited (R3 does this), the transformers core (and windings) can be considerably smaller than in an analogue PSU. The output of the transformer is then rectified with just one diode (because the "new AC" doesn't go negative) and a capacitor (C5) for smoothing.
The regulation is also done by the controller. By monitoring the output voltage, the controller can vary the pulse width of the transistor on/off times to make minor voltage adjustments. The feedback is done via an opto-isolator so that if something went badly wrong, there is no direct connection between the scary voltages and the output connector. This monitoring is also the reason why some SMPS's need a certain current to flow before they will start. If the current isn't detected by the monitor, the controller thinks something is wrong and shuts down.
To summarise, an SMPS converts the AC to DC, then creates a new high frequency AC and transforms this down to the voltage required and regulates the output voltage by adjusting the pulse width on the input to the transformer.

Here's a picture (not from me) of a homemade SMPS designed very similar to what I've just described. The 8 pin IC is the controller and the 4 pin IC next to the transformer is the opto-isolator. He has also used discrete diodes for the rectifier. As you can see, the transformer is considerably smaller than those in an analogue PSU.


* SMPS.jpg
(66.65 kB, 800x600 - viewed 315 times)
[/attach]
« Last Edit: 14:35, 17 April 18 by Bryce »

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.978
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3874
  • Likes Given: 400
Re: Understanding Retro Electronics
« Reply #28 on: 14:35, 17 April 18 »
This is of course the simplest version of an SMPS. There are fancier solutions that use 4 transistors in a bridge configuration to create a more realistic AC signal (that goes negative) or produce more than one output voltage (such as in the Amiga light PSU). Good SMPS's will also have many additional components such as capacitors and inductors to further filter and clean the output signal even more and proper input protection too.

Advantages and disadvantages.
The main advantages of an SMPS is the fact that they are a lot lighter, less bulky, cheaper and a lot more efficient. Their size and shape is also more flexible. This was needed to allow new designs. Take for example a modern TV, just a few cm deep. Without SMPS's the TV would always have to be wide enough to house the analogue PSU transformer. Regarding cost, it's not just the cost of the iron and copper in the transformer has been reduced, but also the transport costs due to less weight. All this made SMPS's pretty popular and finding a decent analogue PSU is getting more difficult every year.

But there are disadvantages too. As the switching frequency is relatively high (compared to the 50Hz mains), they tend to be noiser, transmitting spurious signals all over the place. For this reason they are usually housed in a metal case, but they also have conducted EMC (ie: the frequencies travel out of the unit along the output wires). This is usually reduced by filtering the output through capacitors and inductors.

But these are used all over the place without an issue, why is using one on a retro computer any different?
Modern equipment is usually better screened against high frequencies. Their power input is also filtered with capacitors and inductors to stop high frequency noise. Our retro computers were designed to stop the 50Hz ripple expected from an analogue PSU using a few capacitors, but they have no protection against the high frequency spikes that come from an SMPS. These spikes can be considerable, causing bits to flip, CPUs to crash and even over voltages which could cause ICs to die. Another complication is the fact that a 50Hz ripple can be filtered with almost any electrolytic capacitor, the value isn't all that important, so anywhere between 100µf and 470µf might be used and will do a half decent job. With higher frequencies it's a different story, the filtering components in commercial devices will have been chosen to filter the exact switching frequency of SMPS in the device. If a different SMPS is installed, the filtering may no longer be sufficient. When you buy some cheap SMPS, you have no idea what frequency it switches at (or even if it remains at a single stable frequency), so trying to filter out these spikes can be extremely difficult.

So what's the difference between the cheap and expensive SMPS's?
The cheap ones save where they can. Metal housing - gone. Bleed resistors - gone. Safety components - gone. Minimal filtering and the cheapest of components. The biggest danger here is that the cheap capacitors used may reduce the high frequency spikes for a few weeks, but they quickly degrade and the noise gradually gets worse. The unprotected CPC will work as expected until (without warning) things get too bad and the CPC suffers.

As usual, if you have any questions, write them down, tie them to a brick and hurl them through my livingroom window.

Bryce.

Anyone interested in better understanding how transformers work should check out:
Faraday's Law, Lenz's Law, Eddy Currents and the Skin Effect.

Offline tjohnson

  • Supporter
  • 6128 Plus
  • *
  • Posts: 680
  • Country: gb
    • index.php?action=treasury
  • Liked: 220
  • Likes Given: 135
Re: Understanding Retro Electronics
« Reply #29 on: 21:18, 17 April 18 »
I have a 2.4a 5v switched mode power supply via an ebay seller who specialises in selling things like retro scart cables, but judging by the fluctuations that occur on screen when current draw increases, due to things like disk activity, I would say it was turd.  I could be wrong but I have another that doesn't have this issue which says it is 4a and is physically much bigger.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.978
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3874
  • Likes Given: 400
Re: Understanding Retro Electronics
« Reply #30 on: 15:22, 11 June 18 »
Just a quick explainer here: I've had a few people ask me what these strange looking components on some 464's are. (with some interesting descriptions: "Those brown things with a set of balls"... "The capacitors with tits", etc).These are LC Filters in a single package (often wrongly called Pi Filters, when technically they are T-Filters). Inside there are 2 inductors with a ferrite core (the bumps) and a capacitor. Their function is to remove high frequency noise from the keyboard lines to stop electrical interference being mis-interpreted as a key press.

Here's what they look like on the PCB and a diagram of what's actually inside. If they need to be replaced on a 464, you can bridge the outer two pins together and leave the centre pin disconnected and most likely not have any issues.


Bryce.



Offline ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.185
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1330
  • Likes Given: 2554
Re: Understanding Retro Electronics
« Reply #31 on: 20:41, 11 June 18 »
Hi Bryce,

Forgive my ignorance on this subject but a question.
With a standardised design and (I assume) standardised components why would this be necessary on some machines and not on others?

Cheers,

Peter
« Last Edit: 20:43, 11 June 18 by ComSoft6128 »

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.978
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3874
  • Likes Given: 400
Re: Understanding Retro Electronics
« Reply #32 on: 09:42, 12 June 18 »
They either added them to comply with some emmissions regulations in some country/region, or they really were having issues and decided to add them later. My bet is that they added them for compliance.
There's no such thing as a "standard design" though. Electronics is like making a cake, all the ingredients might be great on their own, but every mixture will give different results.

Bryce.

Offline Andrew Musson

  • CPC464
  • **
  • Posts: 7
  • Country: gb
  • Liked: 11
  • Likes Given: 0
Re: Understanding Retro Electronics
« Reply #33 on: 01:21, 02 July 18 »
Just come across this, great source of information on retro electronics. Thanks for posting.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.978
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3874
  • Likes Given: 400
Re: Understanding Retro Electronics
« Reply #34 on: 09:32, 02 July 18 »
Thanks. If there's any particular subject or aspect that you'd like me to cover, then just send me a PM.

Bryce.