Ben Ryves Gets a Cambridge Computers Z88 Micro Talking 1-Wire to Make Use of Temperature Sensors

With some discarded 1-Wire temperature sensors and a classic of 1980s portable computing, this data logging project takes flight.

Gareth Halfacree
5 months ago β€’ Sensors / Retro Tech

Maker Ben Ryves has found an unusual device for reading 1-Wire temperature sensors: a Cambridge Computers Z88 laptop, released back in 1987 following Sir Clive Sinclair's ouster from the computer firm which bore his name.

"I'd had some limited experience working with the 1-Wire bus as part of my version of the Superprobe [logic analyzer]," Ryves explains by way of background to the unusual project, brought to our attention by Adafruit, "but now that I had a collection of temperature sensors I thought it might be worth revisiting, this time on the Cambridge Z88."

Those temperature sensors, purchased as LM35DZ analog sensors but turning out to be mislabeled DS18B20 digital sensors, were surplus from an earlier project. The Z88, meanwhile, is a piece of computing history: released in late 1987 by Cambridge Computers, the machine was the culmination of Sir Clive Sinclair's Pandora project β€” completed at a new firm following the commercial failure of the Sinclair QL and the sale of Sinclair Research to Amstrad.

With a Zilog Z80-compatible CPU, a 640Γ—64 single-color LCD panel, and just 32kB of RAM as standard, the device β€” and its custom operating system, OZ β€” isn't the obvious choice for interfacing with sensors, but it has its advantages. Among these are a built-in serial port, albeit one which uses a custom pin-out, and the ability to run for a full day from a set of four AA batteries.

"To connect 1-Wire devices to the Z88 some sort of adapter is required and one that plugged into the computer's serial port seemed like a sensible enough option," Ryves explains. "The Z88's serial port hardware normally handles all the communications for you however it is possible to directly control the logic levels of the serial port's output pins and read back the status of the input pins via some hardware registers."

With a simple adapter, featuring a couple of pull-up resistors and a BC547 transistor, Ryves was able to write a BASIC program which implemented the 1-Wire protocol β€” a slower alternative to I2C in which devices are connected on a "microLAN," and popularized by contact-based tag devices known as iButtons or Dallas keys.

Combined with some machine-code CRC calculation code for checking the device ID and enumerating multiple devices on the bus, Ryves was able to put together a program which can read multiple connected sensors and record to a comma separated values (CSV) file on the Z88 itself.

"What was originally intended to be a quick project to make use a couple of electronic components I had been sent in error," Ryves notes, "soon turned into what I thought was an interesting demonstration of what can be done with the Cambridge Z88 using its stock software and some very basic additional hardware, further cementing my appreciation for the well-designed device."

The full project write-up is available on Ryves' website, along with source code for the software.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles