Friday 18 November 2022

Replacing the CMOS Battery in the Acorn A7000+

 Last time, whilst I was waiting for some Game Gear parts to arrive, I decided to take a look at my A7000+. I learned that it was getting on a bit and was in a poor way. The CMOS battery had failed in a dramatic manner and leaked across the motherboard, we left the previous post with the battery removed and the board cleaned up for the next step, but before we do anything else, there are a couple of jobs that we need to take care of first.

Some of the gunk from the battery covered the legs of the IC's in the effected area, one of these IC's is the CMOS memory itself. Whilst I took care with cleaning this area up, trying not to break traces or legs etc, there still may be some damage in a different layer of the board. So I needed to make sure we had continuity between the CMOS memory and the battery terminals. We also need to make sure that the battery terminals have continuity with the power bus on the motherboard. This is the easiest thing to test, so we can start with this, simply use the multimeter to test the positive and negative terminals against any ground or + voltage connection on the motherboard itself.

The first test passed fine, so to test further I would need to test the battery terminals against the CMOS memory's VDD and Ground pins. The memory installed on my A7000+ is marked as an 8583T, when researching this product code, I discovered a datasheet from 1997, which would have been contemporary for this machine. The datasheet is available from here and gives us a wonderful amount of information on what this part does and most importantly, it gives us the pin out.

The IC is described as a clock/calendar with 8-bit RAM. This makes sense, because near to its location, there is a 24Mhz clock. Interestingly, this IC also has an I2C interface, so you could hook an Arduino or Pico or even an ATTiny85 to one of these... The datasheet also advises us that the IC has an operating voltage of 1 - 6 volts, this is useful information when it comes to replacing the old battery. And in there it gives us the pin out. We are going to be testing two specific pins here, pin 8 - VDD against the positive battery terminal and pin 4 - VSS against the negative battery terminal.


It passed the test fine, so I know I have a good connection from the battery to the motherboards power bus and from the battery to the CMOS memory. I also know that this is, at the very least, the system's real time, or RTC, clock with an operating voltage of between 1 and 6 volts. This is important because I know that the battery can be at least recharged by the motherboards power bus, if the battery and motherboard are compatible with regards to charging. I also now know that the battery is capable of providing power to the power lines for the CMOS memory, which means if the battery has a charge, it can provide power to this IC when the main power is off.

All I needed to do now is find out about the battery that I removed. Frustratingly there is almost no official information on the factory installed battery, and reading any information from my battery was out of the question due to the amount of corrosion present. I tried scraping some of it off, but it resulted in too much damage to the surface. 

Whilst I was going about these tests, a member of one of the Acorn groups I am in on Facebook asked if I could check the connectivity between the SoC and the CMOS memory. Basically to confirm which pins were used for I2C from the SOC to this IC. His reason for this was quite interesting, he had a Bush IBX board, which is the guts of a smart TV box from a few years back, Apparently, these are cut down versions of the A7000/7000+. Modifying them to have the same CMOS functionality is part of the process of getting them to run RISC OS, its quite an interesting process and if I get my hands on one of those boards, it will definitely be something I will try out. I saw the end result of his efforts posted in the group recently and he had managed to get RISC OS 3.71 installed and running on it, which I think is pretty cool.

One of the things I wanted to address with the battery was could I use a battery of a different voltage, and could I use a battery of a different type? The battery that is normally installed on these machines is a Varta 280H or sometimes 300H NiMh 1.2 volt rechargeable cell with a capacity between 250 - 300 mAh. This is the component that was physically soldered to the board. Here it is still attached to the board:


I know that the CMOS RAM has an operating voltage of between 1 and 6 volts, so I know I can replace the damaged battery with another one that is between this range with a similar capacity. The next thing I wanted to find out is if I could swap from using a NiMh battery to a LiPo. After doing a lot of searching I discovered that the first Li-Ion batteries went on sale in 1991, which was only six years before this machine was made. After asking a few questions here and there it became apparent that no, I couldn't use a LiPo due to the fact the motherboard has no way to recharge the battery. I would need to provide the electronics for such a battery to do this safely and ensure it would work with the existing logic.

Naturally, I chose to use a NiMh instead.

As a complete stroke of luck, I happened to have the exact battery I needed for this to work. I was stunned to the point that I needed to take a moment and have an energy drink - so far I have embarked on a project and I just happen to have all the things I need to do what I need to do without ordering things in. Surely something is going to go wrong soon? The only difference being that the replacement battery was physically completely different, in the AA format, but thats OK.

Checking the battery over made sure that it put out something in the region of 1.2 volts and I set myself to learning why a NiMh is the easiest choice for this application. It turns out, according to Wikipedia, that NiMh batteries can trickle charge when connected to a power source over time. However, they cannot be used as they are being charged, and it takes time for them to charge up. My battery was almost fully charged, I think it came out of a solar powered light that I took the solar panel out of and just kept the battery next to my keyboard, so it is pretty new with almost no charge cycles. I also learned why having a battery with a higher voltage would have been a bad solution.

Because the battery installed on the motherboard would be trickle charging, it would take quite a long time for it to be available to the CMOS memory. If, for example, we had five of them connected together for 6 volts, it would take a lot longer for them to charge completely. Which means that the battery would not be available to the CMOS memory for a lot longer than it would take to charge a 1.2 volt battery.

This means that when you power off the machine, you lose your clock. You would need to reset the clock each time your turned on the machine and save that to CMOS until your battery pack had fully charged.

So keeping it broadly the same as the original part is the best course of action here. All I need to do is connect the AA battery to the relevant terminals and we are golden. But, before we do, lets address one of the design oversights with this board - the battery placement.

NiMh batteries like to leak, pretty much every AA battery I have come across in the last couple of weeks likes to leak, and when they do it can be a disaster. So connecting this battery directory to the board is a bad idea. So lets add a lead with a connector to the board, so we can move the battery away from it, reducing the ability to cause damage in the future.

We are going to solder a lead into the battery terminals that were exposed after removing the damaged part. The top two are marked as positive, red - you dont need to connect both of these to positive, one will do. But if you want you can fly a connection over between the two. Use the square pad to help you keep track of what you are doing. The single terminal on the opposite side is for negative, black. To keep things neat, you might want to poke the wires through the top of the board and solder from below.

Once soldered, we have a connector that takes us all the way to the edge of the motherboard:

Now that part is sorted, I need to take care of a battery holder or retainer. I had a go at making my own with some perf boards and some spare battery terminals that I was hoping to use on the Game Gear, but I wasnt happy with the result, so will keep that for prototyping. Instead, when looking through a box of potential stuff, I found some fairy lights that were powered by two AA batteries in a little enclosure. This was perfect for what I needed.




Removing the switch and single spring terminal gave me the basis to create a single AA battery holder. This also had a switch installed, which was also removed. The unused side of the battery enclosure was used to run a wire down to the double terminal. An opposing connector was added to the newly installed leads and I once again tested the output voltage to make sure it was OK. With the length of wire between the two new leads, I have quite a lot of flexibility when it comes to hiding this box in the case.



Now, what I really wanted to do was plug it straight in and see if it worked. But - this machine hadn't been turned on for a few years, and there had been damage to the board that I needed to clean up. Plus, I didn't know if having a completely wiped CMOS memory was a good thing at this point or what hitting it with 1.2 volts was going to do to it beyond the control of the motherboard. I also didn't just want to plug the PSU in and fire the mains up either without checking to make sure that the PSU was putting out the correct voltages etc - there was still a bit of testing to do, but as of right now I have almost achieved my goal...

But what I can do is install the battery holder in the chassis somewhere out of the way. 


Using a single command strip, the battery case is held in its new spot, tucked away from anything it might hurt if a battery might go pop in the future. I think using a closed battery case will also help prevent any potential damage in the future.

Next up, we need to get started on testing the power supply and see if this is going to cause an explosion with my new battery...

Friday 11 November 2022

Looking at the Acorn A7000+ in 2022

 Back in 2010, I made a little post about my Acorn A7000+, where I mentioned my past experiences with the machine and its OS.

The other day, I thought to myself that I should get it down and get it powered on again in order to try some things out with DNS. Before pumping mains electricity through it, I thought it would be a great idea for me to take a look inside it because it hadn't been powered on for about four years.

And I am glad I did.

During that four year break, the CMOS battery attached to the board decided to leak and its contents were deposited on the board itself. This requires me to replace the battery and repair the damaged area, This is the story of how I achieved this.

The A7000 and the A7000+ are very compact machines for their period. Despite the outward appearance of the case, which is only really that large due to Acorn recognising that a CD drive would be used at some point, the system itself is quite small and has a remarkably low profile. I am not sure if Acorn had different hardware options in mind when they designed the board etc, but I do know that this design made its way in to a lot of set top boxes.

The low profile is achieved, in part, due to the use of passive cooling - no heatsink or fan is on the CPU here, which is in stark contrast to the time in which this article was written. At the present time, heatsinks and fans can be quite large, and water cooling solutions are becoming more popular. When this machine was made, not having a fan was still something that happened - but more and more systems were getting fans installed at the factory.

The CPU in the A7000+, the machine I have, is probably better being described as being an SoC. I found the datasheet for it here. The main areas it controls are as follows:



This makes the layout on the motherboard quite clean and uncluttered and allows for it to be as small as it is.

This model also provides two methods for expansion in the form of a backplane connector for a hardware format named "podule" by Acorn and a standard internal network connector that is compatible with past Archimedes models. Sadly, Acorn didn't think that networking was going to be such a big deal for their ecosystem, in my opinion, at least. I think it has always remained an after thought.

For the backplane connector, I dont really remember much being commercially available for it at the time. However, these days there are quite a lot of things that are available to buy or to build yourself, including USB interfaces and GoTek interfaces. Sadly, due to the design of the board, you cannot use a CD drive and the backplane interface at the same time. I think this was an oversight and the main reason why I didn't see many expansions for it. These machines were intended to be used in schools, and schools were always going to go for media rich CD ROM based software over an expansion card.

The network cards were useful though, a lot of them at the time supported both Ethernet and BNC, which was really useful. But they were expensive, and to the best of my knowledge still are. The one I have now is just Ethernet, but works perfectly well on my network.

As standard, the A7000+ came with 8MB of RAM from the factory soldered to the board. It also had one memory expansion slot for a SIMM - anyone remember them? They were the bane of PC owners lives, tantalising us with their ever lowering prices. Always knowing that we would have to buy two of them at a time. However, the A7000+ didn't have that drawback, you just needed one to increase the available memory, and could support up to 128 MB, it also supported EDO RAM as well as FPM. This was a pretty big deal back then, EDO was the fast RAM that the cool gamers would have in their systems.

When it came to storage, it came with a 3.5" floppy drive as standard - the mere thought of not having one of these was pure ridiculous, and an IDE hard disc. I think there were various SKU's offering different amounts of HDD space and expanded memory, as well as with a CD drive option. Mine had come from a school, and still has the factory HDD, but the CD drive currently installed is mine (it just happens to be the first ever CD burner I ever owned...). One of the interesting things about RISC OS, at least up to 4.02, is that you have to tell the OS if you have a particular type of drive installed. It doesnt seem to be able to auto-detect them in the same way that a lot of contemporary x86 based desktops would have been able to.

Other than the network port, the A7000+ also has one DB9 RS-232 serial port and one printer port. It also has a PS/2 port for the keyboard and mouse separately. Another one of the oddities with RISC OS is its dependency on having a three button mouse. Annoyingly, the context menu appears on a middle click in this OS as opposed to a right click in Windows. At the time, PS/2 mice with a scroll wheel were still not ubiquitous. Whilst we cannot imagine a mouse not having a wheel now, there were still a lot of places that didn't automatically get wheel mice as soon as they became available, these places include offices and schools who typically only replaced mice as they broke. So if you didn't have an Acorn mouse, or it broke and you couldn't get a replacement, you might have been in quite a pickle. It happened to me when I was testing the machine out later on.

One really quirky feature of RISC OS that, quite frankly, annoys me, is that you need to define a monitor configuration in order to take best advantage of its video capabilities. To this day, I am not really quite sure why you have to do this, naturally all of the relevant Acorn monitors are supported and I have seen them in action. So I know how wonderful the OS can look, and at the time this has to have been the best looking OS on the market. You do get a stock 640x480 mode, but you cant change any visual settings. So lets see if we can change that.

Back to the problem at hand, I need to deal with the battery and the damage it might have caused. Opening up the case reveals that the leak has been largely localised to one specific area, covering the case and the board. So I needed to dig the board out from there to start working on the problem. As this meant taking the whole machine apart, I decided to test out the PSU at the same time and replace a bunch of missing screws etc.


With the drive chassis and the drive cables removed, I was able to extract the motherboard from the case. As we are dealing with a battery leak, I am using white vinegar. According to Google and "people on Facebook", this neutralises the acid from the battery and stops further damage? I am willing to believe it without checking it for myself, you can almost see it working at times. I sprayed some vinegar on the effected area in the case and set it to one side whilst I took a look at the motherboard. You can see in the picture that it is localised to one specific area, which is really quite lucky. Also, you can see that the silicon looks amazing for a device this old. This specific area holds the CMOS memory and the Super IO controller for the floppy drive. The battery was here to provide power to the CMOS memory.


After looking at the affected area under a microscope, I realised that the damage may simply be superficial at this stage - which would be very lucky for me. So after carefully cleaning the area with some vinegar and a toothbrush, I was able to remove most of the gunk caused by the leaky battery. With that done, I was able to heat up the iron and remove the battery itself from the board.


I think the quality of the product helped a lot when it came to cleaning up the mess, that and being able to catch it at this stage. After cleaning up from the removal of the battery with some IPA I was left with a nice, clean set of holes for attaching a replacement. Looking at the battery itself, it looks as it one side of it failed, and its guts spilled out.





The negative side was covered in the same crust that was on the motherboard, but the positive side looked almost as if it were brand new. Obviously, the negative side was the one pointing at the rest of the motherboard. There was no chance life would let that one pass by :).

Now that I have removed the cause of the damage, and the superficial damage, I need to replace the battery with an equivalent that is less likely to leak. I should also mount this battery somewhere that, if it does leak, then it would be less likely to cause any damage to any part of the machine. But this post is getting a bit long, so I think a part two is in order.