HOME > > DALLAS 1-WIRE / MICROLAN SECTION INDEX

Control by computer over minimalist network

For a few years now, I've been having a lot of fun with some superb products from Dallas Semiconductor.

Consumer products based on the chips I've been playing with are available. Don't go away disappointed if you can't program and / or do electronics. This might be a time to learn, apart from anything else! If you are already able to program and make simple electronic devices, you, too, might really enjoy the 1-Wire family.

Just before I tell you more, I should explain that I have no connection with Dallas, beyond being a happy user of their products for many years.


This document talks about the product line in general terms.

I've also prepared a document going into technical detail, and an even more advanced "How to write a program to use a MicroLan" essay.
The product line I want to help you enjoy involves the iButton range, the 1-Wire network (aka MicroLan), and the supporting TMEX API and SDK. (Most of those names are Dallas Semiconductor trademarks, but the way... including "1-Wire") This page is not going to tell you everything you need... Dallas's excellent site has superb material to answer your detailed questions. I hope what's here will help you see if this project is 'for you'. Attached pages, when I can get to them, may help you avoid some of the mistakes I made while getting started.

It is simple and inexpensive. It is accessible to hobbyists and educators.

Each setup will consist of a computer of some sort (see later!) communicating over a network with some sensors and some actuators. Such things are not unusual, but they normally entail complex and expensive interconnections. Not so with 1-Wire! There are a few 'ifs' and 'buts', but a single simple twisted pair is all you need in many instances. Furthermore, the equivalent of the network interface card is built into the sensors and actuators.

An example: A burglar alarm...........
Sensors: Switches on doors, PIRs, keypads.
Actuators: Lights, bells, etc.

Another example: A computer controlled greenhouse............
Sensors: Light, heat, humidity, soil moisture content.
Actuators: Ventilators, heaters, watering pumps.

Actuators are simple, and there's nothing remarkable about 1-Wire's answers. You send a message from the computer to the network node of your choice saying 'on' or 'off'. You need to understand interfacing between 1-Wire's low voltage, low power circuits and 'the real world'. An opto-isolator will do. The usual answers to achieving D to A will work with 1-Wire, too.

Sensors: Dallas offers a splendid choice of integrated devices, and there's a general purpose single bit digital network input device to cover your special needs, and an A-to-D converter for non-digital things.

Cost: For $49 (about 9/02) you can buy a great introductory kit (part DS9091K) with....
Excellent documentary and software support
The hardware to interface a 1-Wire network to a Windows PC. (The most expensive element, by far)
A temperature sensor (-55 to +125 degrees Celsius, 12 bit resolution)
Two simple "connected/ not connected" devices.
Three chips which can each read one bit or output one bit.
Two iButtons. (Pretty cool, but I can't tell you all about everything here!)
Lots of useful cables, connectors.

The kit I bought came with an interface to a 25-way D COM port. I believe Dallas also sell adapters for a 9-way D, or for a parallel port, but maybe they can't be bought as part of the introductory kit. The serial port is a good way to go, and a 25-to-9 way adapter is easy to get... but be sure to buy one ahead of needing it! You'll also need a source of 3-6v to drive the LEDs in some of the demos.

If you're on a tight budget, get just the interface (DS 9097E for serial port. Port may need to be capable of 115kbps, by the way), two DS2405s and a DS1820. Besides Dallas themselves, in the UK RS Components can help. (Indeed, when I went to buy the kit, neither Dallas UK nor the US parent could supply from stock. I paid for the service, but with a 2pm order Friday, I had what I wanted at 9:50am Saturday!) You can also buy from Embedded Data Systems. No doubt you can turn up other sources over the net.... even within the pages at my site! Oh yes- I forgot to mention: I looked around to see if anyone was using the stuff. There were enough hits to satisfy me, but of course in today's world no technology remains available forever. Someone still (6/01) saying on the net that they supply the great, cheap (for what it is) ($50) 1-wire based weather sensors (temp, wind speed and direction) failed to get back to me when I tried to place an order. Pity! (Update: At 10/04, I still think 1-Wire is alive and well!)


I mentioned "computer to control....". This can be a Windows box. Or an old machine running Windows 3.x. Or an older one running DOS. An even more exciting possibility, and indeed the way I came to hear of 1-Wire, is a powerful (and I use that word with great care!) computer made by Dallas called Tini.... costing $50 and built on a card that goes into a SIMM socket! Tini is programmed with Java. It can be a web server. Imagine it: Your main PC networked (ordinary ethernet type net) to Tini, Tini monitoring and driving a 1-Wire system. With the internet browser of your choice, you can interrogate or instruct Tini. IT IS JUST TOO COOL! If you don't think so, apologies for my failure to explain!


What's this about non-Windows computers controlling the 1-Wire net? Sure! No problem. Dallas have provided the drivers for just about any silicon intelligence you choose to put in charge.... and full tech specs if you want to go your own thing. You'll need to be able to program the beast somehow, but Dallas provide an SDK with all that is needed to support all sorts of platforms. So far, I have been using Windows 95 and Delphi 2. All I had to do was....

First set up the RTE (Run Time Environment. Like a Java engine, I think.... just a simple business of letting the system copy two floppies into itself. Nice simple little batch file, copying not-zipped files to directories I wasn't worried about. Some .DLLs, I think, and some documentation, maybe. Nothing complex, nothing that makes me fear for my Windows system's integrity. (Could it crash MORE often? And yes,... there's a version for you NT people who have fewer crashes, I'm told.) You need the RTE installed on any machine that will run programs written for driving things over a 1-Wire net.

Second: (Only on machines where you want to write software for running 1-Wire nets)... Install the SDK (Software Development Kit). That was a simple matter from the CD, and I imagine the files available over the net would have been just as good. They don't take forever to download. (I fetched them before I received the CD in DS9091K). Excellent material in .pdf and .hlp files. Etc.

The kit comes with good really simple exercises which are just for seeing it working. There's also an excellent little program called the iButtonViewer which is marvelous for checking that hardware you have connected is up and running. You can use strip board or a fancy matrix board.. the circuits are not complex. Alternatively, I can supply you (send your snailmail address... I'm not sending it by other media.) with the artwork for a little pcb that will mount the devices of DS9091K. You have to be able to create your own pcb from the artwork. Anyone willing to produce boards? Let me know and I'll post your details here. (No, I don't want to buy a stock... this is just a chance for you to be a nice guy/ gal as people with needs come along. Of course you can charge for your time and materials.. that will be between you and the customer. I'm just giving you the artwork and notes.)


Programming: I use Delphi. Dallas provide some good sample programs in Delphi, (and in several other languages). You don't need to add components to your Delphi IDE, or anything tedious like that.

Dallas's programs are 'professional'... flexible, user friendly, fault tolerant. Good, I suppose, but the "frills" tend to obscure the essential bits, I think. I've written stripped down demos to illustrate the core of working with 1-Wire. There's an index of that material on a corner of my Delphi tutorials site. In most cases, you can download the source code.

To write the 1-Wire programs I did, all I had to do was to add a single unit to the 'uses' clause, and make that unit available to the compiler. I took the cheap and cheerful route, and simply put a copy of the unit's .pas file in the same folder as my source code. I haven't checked in detail yet, but the support unit looked like nothing more than a lot of declarations of constants and links to the resources in the RTE. The unit's .pas file was open to inspection.


This document talks about the 1-Wire / Microlan product line in general terms.

I've also prepared a document going into technical detail, and an even more advanced "How to write a program to use a MicroLan" essay.

Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? At least (please) send an 'I liked the parallel port use page, and I'm from (country/ state)' email? (No... I don't do spam) Links on your page to this page would also be appreciated!

Click here to visit editor's freeware, shareware page.


Here is how you can contact this page's editor.
Click here to go to general 'electronic projects' page by editor of this page.

Why is there a script and hidden graphic on this page? I have my web-traffic monitored for me by eXTReMe tracker. They offer a free tracker. If you want to try one, check out their site. Neither my webpages nor my programs incorporate spyware. If the page has Google ads, they also involve scripts.