Keep an Old Real Time Clock Module Ticking

Sometimes we run into real problems restoring old machines. [RedruM69] recently ran into a system with a dead Real Time Clock (RTC) module. These modules were used on computers and all sorts of other equipment, storing time, date, and 100 or so bytes of battery backed SRAM (before the days of cheap, plentiful flash memory). Often an external coin cell would supply power to the module. In some cases though, cost savings would take over, and the battery would be incorporated into the module. Such is the case with many Dallas Semiconductor models, and the benchmarq bq3287 module [RedruM69] was working with. If we’re reading the date code right, the module was produced in mid 1995 so we’re well past the advertised 10 year battery life.

Apparently Texas Instruments is the current owner of this design, and they even have a datasheet online. (PDF link). It turns out that the bq3287 is a descendant of the bq3285, except that the battery pin is internally disconnected. For most people this would mean a search for a compatible replacement. An industrious hacker might even whip up something compatible from modern components. Not [RedruM69] though. He broke out his Dremel tool and cut into the potted case. Exposing the internal connections above pins 16 and 20 allowed him to solder two wires on. Connecting these wires to an external coin cell brought the module back to life.

[RedruM69] isn’t the first one to perform this hack. Sun computers kept their MAC address in chips like this. When the battery went dead, the computer was off the network. Hackers have been cutting the modules open and adding batteries for years. You could always forgo RTC modules completely and use the power grid as your timebase.

Temperature and electricity monitoring

[Willem] has been using an Arduino to monitor temperatures and electricity usage. For the temperature monitoring he picked up some 1-wire temperature sensors similar to those we’ve featured in the past. To pick up on electricity usage he’s not using an amp sensors, but because he’s in the UK he does have a flashing LED on his power meter. There’s a known trick to pick up these flashes with a photo cell to calculate energy usage based on meter readings. Finally, the data from the three sensors (indoor temp, outdoor temp, and energy usage) is piped over the Internet via an Ethernet shield so that it can be collected and graphed.

[Willem] has had the system running for a year. If you’re nosy you can look at the temperature graph generated from his collected data.

Parts: 1-Wire temperature sensor (DS1822)



Dallas/Maxim’s 1-Wire protocol is the most requested addition to the Bus Pirate.  We finally got some 1-Wire parts, and today we’ll demonstrate the DS1822 1-Wire digital thermometer. Grab the datasheet (PDF) and follow along.

This post is accompanied by release v.0d of the Bus Pirate firmware for hardware version 0. This includes the new 1-Wire protocol library, more configuration options, and other improvements.

Continue reading “Parts: 1-Wire temperature sensor (DS1822)”