I wanted to check the I²C devices on my E250, but found that the M48T59Y NVRAM battery was dead. This meant that it took 20 minutes to get to the OFW prompt, but marked all the RAM as failed. Adding an external battery seemed like a sensible plan. Remembering that I'd accidently stopped the oscillator on the bq4802y on my U45, and from this message mentioning a way to stop the oscillator on the SS20 from the firmware prompt:

I looked at the specifications for the M48T02, M48T08, M48T59 and bq4802y chips. There is a flag to stop or start the oscillator, and the M48T59 and bq4802y also have a flag for low battery voltage. As the low voltage flag seemed like system monitoring, I added code to show the status via envstat. Stopping and starting the oscillator seemed to fit better with sysctl, so I added code there for that.

On my Ultra 45, I could then see:

  # envstat -d bq4802rtc0
                     Current  CritMax  WarnMax  WarnMin  CritMin  Unit
  [bq4802rtc0]
    battery low:     FALSE
  # sysctl hw.bq4802rtc0
  hw.bq4802rtc0.stop_oscillator = 1
  # dmesg | grep bq4802rtc0
  [     1.000000] bq4802rtc0 at ebus0 addr 100000-10000f: real time clock
  [     1.000000] bq4802rtc0: autoconfiguration error: WARNING: oscillator is stopped (0x02)
    

and on my E250 and Ultra 2:

  # envstat -d clock0
                     Current  CritMax  WarnMax  WarnMin  CritMin  Unit
  [clock0]
    battery low:      TRUE
  # sysctl hw.clock0
  hw.clock0.stop_oscillator = 0
  # dmesg | grep clock
  [     1.000000] clock0 at sbus0 slot 15 offset 0x1200000: mk48t59
  [    32.180024] clock0: critical limit on 'battery low'
    

The U45 has a new battery here, but I stopped the oscillator, whilst the E250 and U2 didn't have new batteries when I ran this.

Having done the software part, the next job was hardware - adding an external CR2032 battery holder to the NVRAM chips. Most online tutorials show taking off the tophat part of the chip, but this one:

suggested removing material on the bottom instead. This looked to me like a much neater solution. I didn't like the way that the chip holder was modified for space for the wires, but it otherwise seemed good. Searching online, I found a holder that already had wires attached:

Using that would half the amount of soldering and the wires are completely covered by the case, so could not touch any components inside the computer.

With a spare NVRAM and the NVRAM from the E250, the battery holder, a file, and a craft knife I was ready to go.

[IMG_1403]

With the spare NVRAM held in a vice, I filed an angle of 45° until the metal of the connections was just visible. Note, that pin 1 is at the far end of the chip and the positive terminal is on the left in this orientation. I double checked with a volt meter and saw about 0.3 volts between the two connections. I removed more resin towards the middle of the chip with the knife to expose more metal. I could them prepare the connectors for soldering. I repeated this with the NVRAM for the E250.

[IMG_1406] [IMG_1414] [IMG_1416]

The next step was to solder the wires. With the 45° cut-out on the chip, the wires fit nicely into the chip holder without needing to cut it. I attached the battery holder to the chip using double-sided tape. Make sure that the switch is set to on and install inside the E250.

[IMG_1417] [IMG_1424] [IMG_1425]

I powered on the E250, waited a bit, reset the NVRAM parameters and saw that the low battery warning was gone.

  set-defaults
  setenv diag-switch? false
  80 1 mkp
  8 0 20 c4 47 4c c4474c mkpl
  ^D^R
  rsc-mac-update
  setenv mfg-options server
  setenv input-device rsc
  setenv output-device rsc
  setenv system-board-date 3a41c148
  setenv system-board-serial# 5015440079499
    

On the subject of hardware, the 250 is hard to move around and I had been using furniture movers underneath it. However, it has threaded holes in the base. So, with some wheels with just a hole for attachment, some US-threaded screws that I had for a 19" rack, and some washers to make the mounting holes smaller, my E250 is now much easier to move.

[IMG_1436]

In the U2, there is no space to put the battery holder on top of the NVRAM because that would block the SBus slot, so I attached the holder to the side of the CPU cage instead. When I powered it on, I saw the low battery warning. However, this was because I had forgotten to move the battery holder switch to on! The NVRAM here is already a replacement (it doesn't have the Sun barcode on top).

[IMG_1445] [IMG_1449]

-^- More notes -^-