Maker Pro
Maker Pro

OT: Can CMOS battery on PC motherboard be hot-swapped?

J

Joerg

Folks,

Got a Dell Vostro 200 mini tower with XP on there that seems to be a bit
off in the realtime clock lately. Around five years old so needs a new
3V coin cell on the mobo.

In order not to lose all the setup stuff, can those CR2032 coin cells be
hot-swapped while the PC is running?

Of course using ESD straps, being careful and all that.
 
S

SoothSayer

Folks,

Got a Dell Vostro 200 mini tower with XP on there that seems to be a bit
off in the realtime clock lately. Around five years old so needs a new
3V coin cell on the mobo.

In order not to lose all the setup stuff, can those CR2032 coin cells be
hot-swapped while the PC is running?

Of course using ESD straps, being careful and all that.


the BIOS flash update utility has a backup feature which keeps settings
as well.
you back it up, swap the battery, and then re-apply the backed up flash
image.

And yes, you CAN apply an external 3V source to the MOBO. Just
remember that you will be fighting the very low internal resistance of a
dead battery for the few seconds you are under power as you remove it,
and for the few seconds you re under external power as you install the
new one.

Be very careful about polarity, and do not exceed 3 volts so you do not
begin "feeding" the battery.

As a side note, many modern motherboards have enough capacitance at
that sub-circuit location to retain things long enough for you to swap
the battery. I do not know if yours is such a design.

another side note is that RTCs in PCs are not very accurate with the
original Pc deign and crystal. Newwer designs may use more accurate
clock sources, but most do not, and your most accurate clock possible is
your cell phone, or iPad or other cell system connected or GPS enabled
device. Always bet to keep your PC's clock referenced to such a more
accurate source.

Internet updates are prone to latency errors , so do not expect better
than plus or minus about 1.5 seconds in that realm.

The phone or GPS device is the clear winner, and a good modern wrist
watch usually tracks those pretty well once set. Usually within mere
seconds per year. The phones are ALWAYS accurate as they are ALWAYS
constantly updated.
 
W

whit3rd

Got a Dell Vostro 200 mini tower with XP on there that seems to be a bit
off in the realtime clock lately. Around five years old so needs a new
3V coin cell on the mobo.

In order not to lose all the setup stuff, can those CR2032 coin cells be
hot-swapped while the PC is running?

I've done it. The backup function of the battery means the circuitry
only draws battery power while power is OFF (and I do mean OFF,
'standby' of ATX power supplies is an ON state, even though
the computer seems powered down).

There's also a hold capacitor, usually a few seconds of power is assured while
swapping the coin cell.
 
J

Joerg

SoothSayer said:
the BIOS flash update utility has a backup feature which keeps settings
as well.


Thanks. Now I've got to find that sort of utility, somewhere.

you back it up, swap the battery, and then re-apply the backed up flash
image.

If I had a flash update utlity :)

And yes, you CAN apply an external 3V source to the MOBO. Just
remember that you will be fighting the very low internal resistance of a
dead battery for the few seconds you are under power as you remove it,
and for the few seconds you re under external power as you install the
new one.

So I assume even with a running PC one would still have to hook up a 3V
supply in order not to lose data?

Be very careful about polarity, and do not exceed 3 volts so you do not
begin "feeding" the battery.

As a side note, many modern motherboards have enough capacitance at
that sub-circuit location to retain things long enough for you to swap
the battery. I do not know if yours is such a design.

No clue, I think it's a Foxconn G33M mobo in there.

another side note is that RTCs in PCs are not very accurate with the
original Pc deign and crystal. Newwer designs may use more accurate
clock sources, but most do not, and your most accurate clock possible is
your cell phone, or iPad or other cell system connected or GPS enabled
device. Always bet to keep your PC's clock referenced to such a more
accurate source.

Internet updates are prone to latency errors , so do not expect better
than plus or minus about 1.5 seconds in that realm.

The phone or GPS device is the clear winner, and a good modern wrist
watch usually tracks those pretty well once set. Usually within mere
seconds per year. The phones are ALWAYS accurate as they are ALWAYS
constantly updated.


Actually, without web updates the RTC in this PC was remarkably accurate
for all those years. Well, until yesterday. I rarely had to set it.
 
J

Joerg

whit3rd said:
I've done it. ...


So maybe I should just hot-swap then.

... The backup function of the battery means the circuitry
only draws battery power while power is OFF (and I do mean OFF,
'standby' of ATX power supplies is an ON state, even though
the computer seems powered down).

That's odd. Because the PC here is always sent to hibernate and the
power is turned off. But it remains connected to 120VAC. Still, this
morning the RTC was off again by more than five minutes from yesterday.

There's also a hold capacitor, usually a few seconds of power is assured while
swapping the coin cell.


And then the coin cell slips and our dog carries in to the kitchen,
"Look, ma, I found bling-bling!" :)
 
J

Joerg

Jeff said:
Yes, I do it all the time. Two methods:

1. Leave the computah plugged in and running. On most machines, the
CMOS memory runs on computer power, instead of battery power, when
running. Use a wood or plastic stick to remove the battery. Insert a
new battery as fast as possible. Watch out for bending the the
negative terminal connector thing. Don't short the battery socket or
all your settings will go away.

Done, new battery is in. Did a power-down into hibernate, came back up
like usual. The old battery still measures 3.272V but when loading it
with as light a load as 10k it collapses to 2.5V. With 1k it goes to
1.6V. So I guess the old battery was truly exhausted. It was made by
"Newsun" in Japan, never hear of that brand.

While I had the PC open I saw that I have quite a build-up of dog hair
in there, got to take it apart and clean it. Our big lab likes to curl
up down there when I am doing SPICE runs and warm air comes out. It's
amazing how tight of a space they can snuggle themselves into.

2. I have a 2032 battery and holder with two clip leads. I clip them
across the holder terminals to maintain power while the battery is
being changed. Locating the battery connections on the motherboard is
a problem, but I can usuallly find a suitable connection by poking
around with a voltsguesser.

There are a few CMOS backup and write utilities scattered around the
web. I've had no success with these and don't use them. Check the
dates as many are ancient.

Supposedly there is a Dell tool but I haven't found it yet.

Thanks for the help, Jeff.
 
J

Joerg

Jeff said:
[...]

While I had the PC open I saw that I have quite a build-up of dog hair
in there, got to take it apart and clean it. Our big lab likes to curl
up down there when I am doing SPICE runs and warm air comes out. It's
amazing how tight of a space they can snuggle themselves into.

Yeah, number crunching does make the machine run warm. Suggestions:
1. Buy the dog a heated blanket.


It ain't the same. In his opinion :)

2. Elevate the PC a few inches above the floor with a cardboard box,
blocks of wood, or pile of old phone books. The air intake for the PC
is at the lower front of the machine, turning it into an effective
vacuum cleaner. It will dutifully suck up everything within range
from the floor. Dog hair is theoretically heavier than air and will
therefore rapidly settle onto the floor or carpet and not float
through the air much. By elevating the machine, you'll suck in fewer
dog hairs and less dust.


Unfortunately on the Dells the intake is on the left side and that's
exactly where the Labrador snuggles up. Raising the PC would not help
but make it more prone to keeling over. For example when he hears the
Fedex truck and tries to travel from underneath the PC table to the
front door in milliseconds.

3. Build less complex SPICE models. That will make the machine run
less hot, which will not attract the dog as much, which will not clog
the machine as much, which will make the machine run even less hot,
which will eventually reduce the need to clean out the dog hair from
the machine.

:)

What makes it sweat is when you are almost done with a switcher and then
have to enter real xfmr coupling of 0.97 and such. Important to gauge
the dissipation in snubber parts. That really taxes a PC.

I searched but couldn't find anything. There are plenty of tools to
save the BIOS image (usually as part of a BIOS upgrade), but nothing I
could find that saves the settings.

I guess then the digital camera is the only option. Or paper and pen :)
 
B

Baron

Joerg Inscribed thus:

Don't mess about ! Do it live. Use an anti static strap. Take care not
to damage the cell holder while removing the old battery and don't let
it flip out onto the circuit board. Make sure that you put the new
battery in the right way up, positive uppermost.

It should not take more than a few seconds to do the swap.

PS. A wood or plastic toothpic might help depending on the holder type.

HTH.
 
B

Baron

Joerg Inscribed thus:
Done, new battery is in. Did a power-down into hibernate, came back up
like usual. The old battery still measures 3.272V but when loading it
with as light a load as 10k it collapses to 2.5V. With 1k it goes to
1.6V. So I guess the old battery was truly exhausted. It was made by
"Newsun" in Japan, never hear of that brand.

A tip that might be usefull... A yellow led with the leads sprung across
the battery will give an instant indication of the battery state.
 
J

Joerg

Baron said:
Joerg Inscribed thus:

Don't mess about ! Do it live. Use an anti static strap. Take care not
to damage the cell holder while removing the old battery and don't let
it flip out onto the circuit board. Make sure that you put the new
battery in the right way up, positive uppermost.

It should not take more than a few seconds to do the swap.

PS. A wood or plastic toothpic might help depending on the holder type.

Well, it's already done. So not I am wondering about the laptops.
They've got to have such batteries as well. Maybe time to check those out.
 
J

Jasen Betts

Folks,

Got a Dell Vostro 200 mini tower with XP on there that seems to be a bit
off in the realtime clock lately. Around five years old so needs a new
3V coin cell on the mobo.

In order not to lose all the setup stuff, can those CR2032 coin cells be
hot-swapped while the PC is running?

yeah. but be careful if you drop it it could short something out,
 
J

Jasen Betts

the BIOS flash update utility has a backup feature which keeps settings
as well.
you back it up, swap the battery, and then re-apply the backed up flash
image.

The BIOS flash is not the config CMOS NVRAM
And yes, you CAN apply an external 3V source to the MOBO. Just
remember that you will be fighting the very low internal resistance of a
dead battery for the few seconds you are under power as you remove it,
and for the few seconds you re under external power as you install the
new one.

dead battery is about 50 ohms and 2.7 volts
clock sources, but most do not, and your most accurate clock possible is
your cell phone, or iPad or other cell system connected or GPS enabled
device. Always bet to keep your PC's clock referenced to such a more
accurate source.

Internet updates are prone to latency errors , so do not expect better
than plus or minus about 1.5 seconds in that realm.

NTP is much better than that.
 
J

JW

[snip]
That's odd. Because the PC here is always sent to hibernate and the
power is turned off. But it remains connected to 120VAC. Still, this
morning the RTC was off again by more than five minutes from yesterday.
[snip]

RTC's are often rather crappy.

I use Socketwatch from...

http://www.robomagic.com

I'm currently within 50ms of UTC/

That's $10. I use Time synchronizer from Softnik Technologies. Better yet,
it's free. http://time-synchronizer.software.informer.com/
 
J

Joerg

Jeff said:
Laptops do not have button cell holders. They have wire leads spot
welded or soldered to the button battery, a short pair of wires, and a
tiny connector. The battery is insulated in shrink tube. The ritual
is the same if you want to preserve the settings. Leave the power
applied to the laptop and the laptop running. Unplug the old battery
and quickly insert the new battery. Most such batteries are easily
accessible through a door on the bottom of the laptop, although there
are a few abominations where the manufacturer elected to hide the
battery in difficult to find location.

Why does the change have to be quick? Isn't the circuit powered as long
as the laptop is? Because then one could solder in a new battery and
re-use the connector instead of shelling out lots of dough for a
specialty battery plus shipping charges.

Hey, it's nice, this morning the PC showed the correct time again :)

What I really don't understand why in this day and age they don't write
the settings into flash. I mean, we even successfully do that on totally
cheapo uC design.
 
J

Joerg

Jeff said:
In the dark ages of laptops, the clock and CMOS memory were powered by
the main battery with the button cell as a diode isolated backup. The
button cell would draw no current until the main battery was either
removed or depleted. Somewhere about 10 years ago, the clock chips
and CMOS (serial) memory started drawing less power than the self
leakage on the button cell. So, it was decided to just run them on
the CMOS battery and not involve the main battery. ...


That was not a very smart decision by the industry. Serviceablity has
suffered as a consequence.

... I found this out
the hard way by unplugging the battery with the computer running, and
losing both the clock and CMOS settings. There's usually an
electrolytic capacitor across the battery to deal with battery
changes. I don't know how long it is expected to last, but it's
probably measured in seconds.

And we know how that does. Battery is out ... cell phone rings ... oh,
got to take this one real quick ... :)

I'm not 100% sure of the above, but I can check when I get to the
office tomorrow, where I have some laptop schematics.


If your soldering iron is grounded and your charger grounds the laptop
case, you'll probably short the battery terminals as soon as you hit
it with the soldering iron tip. Also, replacement batteries are
something like $3 to $8/ea, which is not a big deal. If you must roll
your own, you can salvage a battery connector and cable from a dead
laptop at the local recycler, and use that with a new battery.

My iron can be operated sans ground. With a laptop it's not really that
tough anyhow because one can unplug the charger (many of those aren't
grounded anyhow). Just watch for ESD.

Every time your PC loses an interrupt, the clock drops 15.6 msec.
That's because most I/O devices have priority over the timer ticks. If
you're doing lots of disk bashing or playing a DVD movie, you're going
to see the clock slow down. How much depends on how many interrupts
are lost.

Drivel: Many years ago, I decided that I wanted GPS accuracy on my
office Unix server. I took the NEMA 183 output from an old Garmin 65
GPS, parsed the data with a shell script, and reset the PC clock
according to the GPS time. What I forgot to include was a sanity
check on the data. When the receiver lost sync, the GPS would produce
00:00:00 etc as the current time. It took a while to clean up my log
files and recover from that mistake. This is another reason why I
don't do much programming.

Whoops :)

Here's what's stored in the CMOS:
<http://www.bioscentral.com/misc/cmosmap.htm>
Note that the first few bytes are the RTC current time and date (but
not the TZ time zone). This info gets written to the CMOS chip once
every second. If that were flash memory with an optimistic 100,000
write/erase cycles, the flash chip would be dead in several days.

Not really. Almost everything beyond 0Fh gets written once and then left
alone the next five years of so. Ok, maybe someone buys a new drive and
enters that. This would cause two write cycles to that location in five
years.
 
Jim Thompson said:
Sounds like that synchronizer is functional only at boot or
manually...

If you're using Windows (XP and up for sure, don't remember about 2000),
it has a built-in time sync functionality, *as long as the machine is
not part of a domain*. Just go to the time and date settings in Control
Panel and you should have an option for "Internet Time". It will
default to the server time.windows.com (which probably round-robins to
several machines at Microsoft) but you can add other servers if you
like.

If your Windows machine is part of a domain, its time is synchronized
from the domain controller as part of the networking protocol. If the
domain controller is listening to an Internet time server, then it will
propagate the correct time to its clients.

If you have old Windows or otherwise want some kind of independent
time-setting software, nistime-32bit.exe is free of charge from
http://www.nist.gov/pml/div688/grp40/its.cfm . It says: "The program
can be configured to query the server periodically and run in the
background." I have used it before on Windows 98 and it seems to work
OK; the minimum query interval is one hour. That NIST page also has a
link to a list of other time-setting software for various OSes.
(Trivia: it's called -32bit.exe, not to distinguish it from the 64-bit
version, but from the 16-bit version!)

If you have Linux, you can run ntpd. Most recent distributions do this
and provide some kind of happy clicky control panel. The real skinny is
in /etc/ntp.conf . ntpd can get its reference time over the Internet,
or from a local GPS receiver.

I don't know what OS X runs under the hood but I wouldn't be surprised
if it's some flavor of ntpd. The knobs are apparently at Applications >
System Preferences > Date & Time .

Matt Roberds
 
J

Joerg

Jeff said:
[...]

My abilities to write defective software is well known. I can do many
things, but programming is not one of them.

Same here, I think we somehow must have the same forefathers :)

Although my dad was a pro when it comes to programming, and so is my
sister, so maybe it's just me who didn't get the programmer's gene or
where it mutated into a circuit design gene.

True. It's the clock and status registers below 0Fh that get
scribbled to constantly. One could split the CMOS function in half,
with the lower half continuing to be CMOS, while the rest is changed
to flash. However, that will add front end cost and additional
complexity, which are not good things.

Wouldn't it be a zero-cost piece of cake to at least write those to hard
disk and in case of finding a blank offer the user to restore from
there? Also, the BIOS is in flash so why not store there instead?

It would behove the industry to think about this because there is one
major reason why PC sales are slumping: The things became to darn
complicated for ol'Leroy. He does not want to face a pricey Geek Squad
call every time some obtuse "unrecoverable error" has occurred. So he
invests his money into a smart phone instead. Because that's not
complicated. A PC is complicated.
 
M

miso

Internet updates are prone to latency errors , so do not expect better
NTP is much better than that.

Yep, though on windows you need Meinberg for NTP. Windows Time service
isn't as good. Linux real real NTP.

Tuning up NTP is a bit of work if you want to be optimal. Even though
people claim the accuracy is independent of the time reference, I make
it a point to find servers close to me (less hops) and that experience
low jitter, which can be determined via logging features of NTP.

I have found that running the antivirus check will effect the NTP
accuracy. It pays to plot the time error and then correlate it to known
time dependent programs.

You should be able to get the time error under 20ms.
 
S

SoothSayer

Yep, though on windows you need Meinberg for NTP. Windows Time service
isn't as good. Linux real real NTP.

Tuning up NTP is a bit of work if you want to be optimal. Even though
people claim the accuracy is independent of the time reference, I make
it a point to find servers close to me (less hops) and that experience
low jitter, which can be determined via logging features of NTP.

I have found that running the antivirus check will effect the NTP
accuracy. It pays to plot the time error and then correlate it to known
time dependent programs.

You should be able to get the time error under 20ms.
Get it to synch to your phone and you'll get better accuracy than that.

Call NIST directly with a hard connected modem and you can get within
2ms. Regularly. Every time.. repeatably.

Your claim of 20ms is falsely based. Do it 25 times, and I'll bet you
get 25 different offsets from the real. So more likely plus or minus
about 80ms. You could probably get closer by hand synching to your phone
with the mouse click.
 
J

Jasen Betts

Get it to synch to your phone and you'll get better accuracy than that.

Call NIST directly with a hard connected modem and you can get within
2ms. Regularly. Every time.. repeatably.

11000km in <2ms ! I don't think so.
Your claim of 20ms is falsely based. Do it 25 times, and I'll bet you
get 25 different offsets from the real. So more likely plus or minus
about 80ms. You could probably get closer by hand synching to your phone
with the mouse click.


25 times? ****! do it a million times the offset is still always under 5ms,
and that's using third tier timeservers.

These graphs are from someone else's server but are typical of a
carelessly installed NTP setup:

http://www.papy-team.org/munin/org/papy-team.org/ntp_offset.html
 
Top