Z80 RAM not storing on battery - Page 1
Forum section: electronics / repair

author: Audiorepair
author_rank: Frequent Contributor
timestamp: May 04, 2023, 01:35:54 pm
content: This has got me scratching my head.This Z80 circuit has battery backed RAM, which doesn't retain its memory on power down.However, if you hold the CPU in Reset by grounding the _Reset pin and then power down, IT DOES!I can't think what might be happening here.

author: pqass
author_rank: Super Contributor
timestamp: May 04, 2023, 03:31:33 pm
content: It's probably not a good idea forcing /RESET (U1, pin 26) to GND since it shorts out the NOR output (U36, pin4).Check the RAM power rail voltage (U9..12, pin 24) under two conditions:a. after power down (no memory retention),b. first /RESET grounded, then power down (the method that you said retains memory).If the voltage is different, then the flip-flop arrangement U33 is stuck in an odd state that consumes just enough extra power to pull down the +5V (solid arrow) backup power rail. Grounding /RESET probably works because the /MREQ would go high and flipping the F-F to that lower power state (although R10 should pull it up; you never know).If I'm right, then the NiCds are marginal. Also, I'd check if all gates on U33 and U36 are still functional. And if R10 is okay (just in case).But before you go replacing chips, you can temporarily replace the NiCds with 3xAA (fresh 3x1.5V, non-rechargeable)and a diodein series with the positive terminal (to prevent recharging). That should give you enough voltage (~3.8V) which is below 5V when power is on, but above 3V so that the RAM isn't starved (overcoming any extra draw) when powered off.

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 04, 2023, 05:38:48 pm
content: Check the operation of U63 on the power supply board. That's what sends the power good signal to the CPU board. It does this by monitoring the unregulated supply of the the +15V rail.For a quick and dirty check of U63, see attached drawing.If that all checks out, and the logic circuit & battery checks suggested by qpass seem OK, then it could be a simple matter of aging power supply capacitors on the +5V rail. They've got some hefty 10,000uF capacitors installed so that the 5V rail stays alive long enough for the +15v supply's capacitor to discharge, U63 to detect that, and put the CPU into reset and engage the RAM disable logic so the memory contents don't get scrambled. Plus there's the large 27,000uF cap just before the 5V regulator.ie: If the 5V rail goes downbeforethe +15V rail does, then the "power stable" line will not deactivate in time to avoid the RAM being scrambled on power down.

author: Audiorepair
author_rank: Frequent Contributor
timestamp: May 04, 2023, 06:21:31 pm
content: Quote from: Kim Christensen on May 04, 2023, 05:38:48 pmOk, I think this and previous posts is what I'm looking for.The original 5v power supply has been replaced by a "home made" one on veroboard, other supplies are as per circuit diagram, and the Nicads are now 3 x AAA cells.The Power Stable circuit appears to be working, but U33 seems to have not been fitted at factory, and Power stable is connected directly to pins 8/9 of U36, so the MREQ functionality designed originally is disabled. (According to the service manual, this was to prevent a valid memory write from being interrupted during power down)But the point is, that after power down, the Z80 continues activity for around 22mSecs or so, but the Power Stable line continues high for 120mSec.So if this situation is likely to corrupt the memory, then that is what is happening.Over the last couple of days I have been investigating modifying the Power Stable circuit, to see if I could get it to shut down in less than 20 mSec, but the Power Stable circuit is too weird and unstable to mess around with, I have had to deal with this before.It has megaohm resistors, and all this is 40 years old. (Scoping pin 14 of U63 is enough to stop it working)It does though introduce a switch on delay on the _reset line as it is supposed to do.So, if the problem is the replaced and poorly constructed 5v rail doesn't have enough capacity to outlast the Power Stable 120mSecs, then the problem is at least now clear.Edit: It's actually just the 5v regulator circuit/Nicads that got replaced, but it does look a bit Mickey Mouse.I'll check all the appropriate caps tomorrow, thanks for all the input.

author: Audiorepair
author_rank: Frequent Contributor
timestamp: May 05, 2023, 09:14:59 am
content: Ah, I see what they've done now.Instead of using the existing big diodes and 27000uF cap, they've cut the transformer secondary winding (6 & 7) and attached it to their veroboard circuit.This has a small bridge rectifier and 2 x 1000uF caps going to a 5 volt regulator module.Not surprising it runs out of puff at 20mSecs then.Oh dear.

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 05, 2023, 05:12:52 pm
content: Shame, because they could have just replaced the regulator/battery PCB with their circuit instead (The one with the 7 pin Molex and chip marked AS 633 in pencil). Then they'd still have the 27,000uF and it would have been so much neater and closer to the original.But maybe the 27,000uF was duff too.

author: Audiorepair
author_rank: Frequent Contributor
timestamp: May 05, 2023, 05:43:27 pm
content: Quote from: Kim Christensen on May 05, 2023, 05:12:52 pmI took the 27,000uF cap out this afternoon, and yes, it is duff, so that kind of explains things.Prior to that I cobbled together around 22,000uF of caps, and that took the Z80 to over 100mS after power down, and the memory saved the data.One time the data wasn't correct, so it needs more capacitance to get the Z80 to overtake the Power Stable signal and shut down nicely.When I first started working on this, I powered the 5 volt rail with my bench supply, and it took 2 Amps, so it's not that it needs loads of power, it just needs a large reserve to cope with the power down requirements.

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 05, 2023, 06:37:55 pm
content: Quote from: Audiorepair on May 05, 2023, 05:43:27 pmQuote from: Audiorepair on May 05, 2023, 09:14:59 amYou could add more caps, but you may have to beef up their small bridge rectifier because it may not handle the power on surge at some point.Or a combo of caps and a quicker reset/power good circuit. More caps is easiest though.EDIT: Are the original two 10,000uF capacitors on the 5V rail still in circuit too?

author: Audiorepair
author_rank: Frequent Contributor
timestamp: May 05, 2023, 07:30:09 pm
content: I can't find anything remotely similar in size/mounting etc to the original cap, (screw terminal, high quality) , but my thoughts would be to bodge in 27,000uF or more of a cap on the now empty space on the mainboard, and run a wire to their veroboard. (There are 2 convenient holes for the screw terminals that could be utilised to cable tie a replacement cap)Maybe even reuse the 4 diode rectifier position and put the transformer wires back on the mainboard and ditch their bridge, as I really don't want to start modifying a dodgy veroboard.Probably best just to leave the regulator, fuse, and AA pack on it. And secondary 5v supply.Not sure about the other original 10,000uF caps, I think there were 2 shonky looking caps waving in the wind instead, but I really didn't pay that much attention.

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 05, 2023, 07:54:56 pm
content: Quote from: Audiorepair on May 05, 2023, 07:30:09 pmYou could add a resistor/diode combo in series with the 27,000uF to limit inrush current.QuoteThis is probably what I would do.QuoteMight make a difference to how many pre-5V-regulator caps you'll need to bodge in to make it reliable. Though pre-5V-regulator caps would be more effective in keeping the z80 alive longer than post-5V-regulator caps.

author: Audiorepair
author_rank: Frequent Contributor
timestamp: May 05, 2023, 09:40:38 pm
content: Might make a difference to how many pre-5V-regulator caps you'll need to bodge in to make it reliable. Though pre-5V-regulator caps would be more effective in keeping the z80 alive longer than post-5V-regulator caps.I was banking on just one.Probably half the size of the original and 105 degrees if possible.