Author Topic: Z80 RAM not storing on battery  (Read 1242 times)

0 Members and 1 Guest are viewing this topic.

Offline AudiorepairTopic starter

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: gb
Z80 RAM not storing on battery
« on: May 04, 2023, 01:35:54 pm »
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.
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 726
  • Country: ca
Re: Z80 RAM not storing on battery
« Reply #1 on: May 04, 2023, 03:31:33 pm »
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 diode in 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.
« Last Edit: May 04, 2023, 03:42:40 pm by pqass »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: Z80 RAM not storing on battery
« Reply #2 on: May 04, 2023, 05:38:48 pm »
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 down before the +15V rail does, then the "power stable" line will not deactivate in time to avoid the RAM being scrambled on power down.
« Last Edit: May 04, 2023, 05:42:09 pm by Kim Christensen »
 

Offline AudiorepairTopic starter

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: gb
Re: Z80 RAM not storing on battery
« Reply #3 on: May 04, 2023, 06:21:31 pm »

ie: If the 5V rail goes down before the +15V rail does, then the "power stable" line will not deactivate in time to avoid the RAM being scrambled on power down.


Ok, 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.

« Last Edit: May 04, 2023, 07:25:08 pm by Audiorepair »
 

Offline AudiorepairTopic starter

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: gb
Re: Z80 RAM not storing on battery
« Reply #4 on: May 05, 2023, 09:14:59 am »
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.
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: Z80 RAM not storing on battery
« Reply #5 on: May 05, 2023, 05:12:52 pm »
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.
 

Offline AudiorepairTopic starter

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: gb
Re: Z80 RAM not storing on battery
« Reply #6 on: May 05, 2023, 05:43:27 pm »
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.

I 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.
« Last Edit: May 05, 2023, 05:53:08 pm by Audiorepair »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: Z80 RAM not storing on battery
« Reply #7 on: May 05, 2023, 06:37:55 pm »
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.
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.

You 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?
« Last Edit: May 05, 2023, 06:44:27 pm by Kim Christensen »
 

Offline AudiorepairTopic starter

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: gb
Re: Z80 RAM not storing on battery
« Reply #8 on: May 05, 2023, 07:30:09 pm »
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.



« Last Edit: May 05, 2023, 07:33:51 pm by Audiorepair »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: Z80 RAM not storing on battery
« Reply #9 on: May 05, 2023, 07:54:56 pm »
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)
You could add a resistor/diode combo in series with the 27,000uF to limit inrush current.

Quote
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.
This is probably what I would do.

Quote
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.
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.
 

Offline AudiorepairTopic starter

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: gb
Re: Z80 RAM not storing on battery
« Reply #10 on: May 05, 2023, 09:40:38 pm »

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.
[/quote]

I was banking on just one.

Probably half the size of the original and 105 degrees if possible.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf