Repairing lower RAM - which approach?

Post Reply
hackdog
Posts: 6
Joined: Wed Jul 31, 2019 12:45 pm

Repairing lower RAM - which approach?

Post by hackdog »

I'll be repairing a friend's ZX Spectrum (Issue 4), which started misbehaving one day. Voltage measurements indicated that the -5V was being shorted to ground. The scope also showed that the low RAM data signals were garbled. So, some of the infamous 4116s have blown. I plan to desolder and test them in the weekend.

I'm now contemplating the best way to approach the repair, as there are several options, each with pros and cons.

1) Replacing each broken 4116 with another 4116 is the most straightforward. But this can get expensive, depending on the number of busted chips. Any replacements, when available, will also be well past their prime. And it doesn't really solve the underlying design problem. I'd rather fix issues like this permanently.

2) The 4164 which only needs +5 can be substituted with some pin bending and rewiring. You still need one new chip for each broken chip however. Fitting the modifications inside the crowded case wil also be challenging.

3) One 4464 (also +5 only) could replace four broken 4116s. I can get some 4464s locally for cheap. But aside from the rewiring, how do you drive their /OE pin?

4) You can use half a 32K SRAM with some glue logic for /RAS and /CAS. This has been offered commercially as a Lower RAM Replacement Module, but not sure about its current availability. I'm also concerned about propagation delays in glue logic messing up the timing.

What is a good course of action here?
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: Repairing lower RAM - which approach?

Post by Lardo Boffin »

Here is one option:

https://www.retroleum.co.uk/spectrum-repairs-mods


I have managed to find dodgy lower RAM by piggybacking a working chip on top of the each one in turn until it works. I literally just pushed the good chip on top of the soldered in chips.
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
User avatar
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Repairing lower RAM - which approach?

Post by Paul »

Option 4 works fine in my Spectrum.
Option 3 /OE will be the same as the /OE for a one bit solution.
Kind regards Paul
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Repairing lower RAM - which approach?

Post by 1024MAK »

The first thing to do is to sort out the +12V and the -5V power issues. When a 4116 DRAM (or equivalent) chip fails, often it draws excessive current from the +12V (this is the main supply for these chips). The -5V is a bias supply and the current from this supply should be low.

This is assuming that the on board DC/DC converter circuitry has not been damaged by the removal or inserting of an interface / device on the edge-connector while the ZX Spectrum was powered up. Or said interface/ device is missing the locating pin/key...

Note, unless the on board power circuitry has been upgraded, the voltage on the +12V rail may be misleading due to current flowing from the +9V (nominal) rail to the +12V rail via the “coil”. If the +9V and the +12V are at the same voltage and the -5V is missing or very low, the the DC/DC converter formed by TR4, TR5, the “coil” and associated components is damaged.

The easiest way is to see which 4116 DRAM chips are faulty is to see if any are running significantly hotter than the others, but you need an external bench/test power supply providing +12V, +5V and -5V which has current limiting or short circuit protection on its outputs.

Or you can use the resistance technique detailed in this repair guide.

Once you have some suspect 4116 chips, cut the +12V, +5V and -5V supply pins. Has the short circuit now gone? If you think it has, repair the Spectrums DC/DC converter (TR4 and TR5, TR4 is the transistor that normally dies, but it can sometimes take TR5 with it). You may also want to bring the board in to line with Sinclair’s recommended modification. Details are here.

Now power up and see if the voltages on the +12V, +5V and -5V supply rails are correct. And see if TR4 survives for at least 5 minutes.

If no, you still have a faulty 4116 chip drawing excessive current (most likely from the +12V rail).

If the supplies are okay, then you can now replace the faulty 4116 chips with either new old stock 4116 chips, or used 4116 chips.

I strongly recommend cutting all the legs of any DRAM chip that you are removing, then desoldering each cut pin one at a time. This is much less risky than trying to remove the chip all in one go. The PCB tracks, pads and through hole plating are easily damaged. And if you don’t notice the damage before soldering in replacement chips or sockets, can be a nightmare to diagnose and fix.

Alternatively as you indicated, you can use 4164 chips if you isolate the extra address lines and tie them to either 0V/GND or to +5V/VCC AND rewire the 4164 +5V VCC pin to +5V. Do double check and test that the -5V and +12V rails are not connected to any pin of the 4164 before powering up! There should be no problem in fitting them in if soldered to the board. Alternatively, if all the 4116 DRAM chips are removed and all of them are replaced with 4164 chips, then instead of bending the chip pins, cut the relevant PCB tracks between the power section and the DRAM chip area. Then rewire on the bottom of the board.

You can use two 4464 chips, this does require a fair amount of extra wiring though. If you go this route, I recommend removing all the 4116 chips and only using 4464 chips.

You may also be able to get hold of, and use 4416 chips. These are 4 bit X 16K.

With both of the above, the order of the address input pins does not matter. Also the order of the data pins does not matter.

Where you are using DRAM chips that have an output enable (/OE or /G) pin (typically on pin 1), just connect it to 0V/GND. The /RAS and /CAS control inputs will still control the chips output buffers.
hackdog wrote: Tue Sep 17, 2019 8:50 am 4) You can use half a 32K SRAM with some glue logic for /RAS and /CAS. This has been offered commercially as a Lower RAM Replacement Module, but not sure about its current availability. I'm also concerned about propagation delays in glue logic messing up the timing.
You can do this. However using a “ZX Spectrum Lower RAM Replacement Module” (or LRR) is by far the easiest and most reliable method.

Here is a link to the original seller of these modules: http://zx.zigg.net/LRR/

Lardo in his post gave a link to an alternative supplier.

Both are a lot easier than wiring up your own circuitry.

The modern SRAM used is far faster than the DRAM chips that it is replacing. So there should not be any timing problems.

And 4164, 4416 and 4464 DRAM chips do fail from time to time in other 1980s/1990s computers...

Hence if there are more than one or two failed DRAM chips, I would recommend the LRR module.

Oh, one more thing, if a 4116 DRAM is powered with the +12V and/or the +5V present, but with the -5V missing or very low, this can cause damage to previously working 4116 DRAM chips. So only power up as long as you need to carry out a test or measurement.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Repairing lower RAM - which approach?

Post by 1024MAK »

Lardo Boffin wrote: Tue Sep 17, 2019 9:13 am I have managed to find dodgy lower RAM by piggybacking a working chip on top of the each one in turn until it works. I literally just pushed the good chip on top of the soldered in chips.
I don’t recommend this method unless you cut the output pin of the suspect DRAM chip. There are too many DRAM chip failure modes. If the original DRAM chip tries to output one logic level and the piggy backed ‘good’ DRAM tries to output a different logic level, they will try to short out each other’s output driver circuit. And who knows what the CPU will make of the resulting bad logic level...

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
hackdog
Posts: 6
Joined: Wed Jul 31, 2019 12:45 pm

Re: Repairing lower RAM - which approach?

Post by hackdog »

Thank you all for your excellent guidance! The SRAM module indeed seems like the best way forward.

I'm actually quite surprised that those 4116s have lasted so long on this dodgy power supply. The -5V should power on first and power down last for the 4116s, but that's not respected here at all. Since the +5 powers the inverter for all other voltages, the +5 will always be on earlier than the others. If I understand the +12V regulation correctly, when it gets too high, it starts turning off TR5, which then turns off the inverter section. When the +12 then gets low enough, TR5 turns on again and restarts the inverter. The -12V just tracks +12V. Apart from the single zener for -5V everything depends on carefully chosen component values. I must admit though that it's very clever in terms of component count and cost!
1024MAK wrote: Tue Sep 17, 2019 4:17 pm I strongly recommend cutting all the legs of any DRAM chip that you are removing, then desoldering each cut pin one at a time. This is much less risky than trying to remove the chip all in one go. The PCB tracks, pads and through hole plating are easily damaged. And if you don’t notice the damage before soldering in replacement chips or sockets, can be a nightmare to diagnose and fix.
I was hoping to "capture them alive" as it were! :) But indeed it's not worth risking the PCB and perhaps I can identify the culprits by the heat or resistance.

The thing is, I actually just made an automatic Arduino-based DRAM chip tester. Finally got it working last weekend. I had some DRAM chips of unknown provenance and at least one bad 4116 from a 16K RAMPACK. It turned out that only one of my chips was indeed broken (which came from that RAMPACK) so that's a good result. I need to clean things up a bit first and then it can be published.
1024MAK wrote: Tue Sep 17, 2019 4:17 pm Where you are using DRAM chips that have an output enable (/OE or /G) pin (typically on pin 1), just connect it to 0V/GND. The /RAS and /CAS control inputs will still control the chips output buffers.
Oh, that's interesting. I thought that it would require something opposite of the /W pin, because the datasheet says "In a delayed write or read-modify-write cycle, /G must be high to bring the output buffers to high impedance prior to impressing data on the I/O lines." In that case, when writing, the output buffers must be off; when reading, they must be on. So NOT(/W), or perhaps NOT(/W) OR /CAS. But perhaps the Spectrum does early writes where this doesn't apply.
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Repairing lower RAM - which approach?

Post by 1024MAK »

hackdog wrote: Tue Sep 17, 2019 10:51 pm Since the +5 powers the inverter for all other voltages, the +5 will always be on earlier than the others. If I understand the +12V regulation correctly, when it gets too high, it starts turning off TR5, which then turns off the inverter section. When the +12 then gets low enough, TR5 turns on again and restarts the inverter. The -12V just tracks +12V. Apart from the single zener for -5V everything depends on carefully chosen component values. I must admit though that it's very clever in terms of component count and cost!
The actual arrangement is:
The nominal +9V DC input from the external PSU powers the 7805 voltage regulator, which provides a regulated +5V.
The nominal +9V DC input also feeds the “coil” and feeds to the edge-connector. It is also used in issue 3 boards onwards to power the loud speaker.
TR4, TR5, the “coil” (actually a transformer) and associated components form a DC/DC converter. This converts the nominal +9V DC input to a semi-regulated +12V and a Zener regulated -5V. TR5 acts as a comparator comparing the regulated +5V and the +12V via the potential divider formed by R58 and R59. This then controls the power fed to TR4, which forms an oscillator. TR5 will start to turn off once the +12V supply gets to 12V. But turns on more when the +12V supply voltage drops. This in turn controls the oscillation of TR4. This affects how much energy is delivered to the “coil”. TR5 operates in a linear region.

In a 16K/48K/plus machine, there is no -12V. What appears to be labelled as -12V is actually a 12V AC signal. “~” (tilde) being mistaken for “-”.

A significant number of ZX Spectrum faults are due to short circuits when an interface/ expansion is connected or disconnected with the computer powered up. Or where the edge-connector locating key/pin has gone missing.

Electrolytic capacitor failure is also suspected of causing problems with the DC/DC converter circuit.

One of the reasons for Sinclair modifying the DC/DC converter circuit, is due to a rise in the mains voltage causing the unregulated mains adapter / external PSU to output more than 11.9V. This could cause TR5 to turn off, as DC current flowed from the nominal +9V rail (but which was actually greater than 11.9V) into the +12V rail via the coil winding. Hence TR5 would think that the +12V rail was at or above the required +12V. But if TR5 turns off, TR4 will also turn off and the -5V supply will decay to 0V. Hence killing the 4116 DRAM chips...

The use of the DC/DC converter circuit did allow a simple and cheap unregulated mains adapter / external PSU ;-)

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Post Reply