1-WIRE - THE TECHNOLOGY FOR SENSOR NETWORKS

In this epoch, automation in different area of human life is obvious. Home automation or intelligent building is part of this phenomenon. Sensor networks are important parts of intelligent buildings or other rooms. Between more solutions of sensor network, 1 Wire® technology can be a good choice for home automation because of small requirements for wires, power supply, components dimensions and simple controlling. In this review article, the basic specifications and specialities of 1-Wire technology as well as some our experience with this type of sensor network are described.


INTRODUCTION
Home and building automation, and centralized local or remote control of many parts of these systems are not novelty.Nowadays they are even almost obviously part of new design and projects of buildings and premises.Also advanced intelligent automobiles are equipped with dense sensor networks, controlled by on-board computers.In the market, several different professional solutions of sensor networks can be found.They are almost permanently developing.In our workplace, we are testing 1-Wire® technology because of its relative simplicity and low cost.In next parts of paper, meaningful theoretical principles, components and results of some our practical experience are presented in the area of 1-Wire sensor networks.

1-WIRE TECHNOLOGY
The term 1-Wire means that besides ground wire only one shared wire is necessary for both, positive power voltage and data transport and communication (Fig. 1).The master and more slave devices can be parallel connected to this wire pair.Personal computer or another control device can play the role of the master.In basic scheme, each slave device can "rob" power from the bus when the voltage on the bus is greater than the voltage on its internal energy storage capacitor [2].Naturally, there are also possible more complex realizations, with more wires and with external supply as well.The Maxim 1-Wire technology includes 1-Wire components, eventually adapted components of another origin, and 1-Wire protocol.1-Wire components family is created by 1-Wire temperature sensors, memories, 1-Wire interface products, timekeeping and real-time clocks, battery protectors, selectors and monitors and several types of i-Button® products [1].1-Wire original software apparatus includes 1-Wire drivers, OneWireViewer programme for managing 1-Wire network, and a few software development kits.
For longer cable bus (several tens of meters or more), and for undisturbed transmission, UTP cables (twisted pair cables) are recommended for interconnecting.
The resume of the main specifications of 1-Wire technology is placed in Table 1.

SPECIALITIES OF 1-WIRE TECHNOLOGY i-Button®
i-Button is 1-Wire component, now coming as over 20 different products [4] with following varieties of functionality: as Address Only, Memory, Real-Time Clock, Secure and Data Loggers.Its chip is hidden in contact metallic case, which has the size and look of knob battery (Fig. 3).There must be an adapter for reading data from i-Button.1-Wire adapters Maxim-Dallas Semiconductor Corp. offers several types of adapters to interface between PC (USB port or RS-232 port) and i-Button or 1-Wire network.These adapters have different functionality and capability regarding the dimension of network (length of cables and number of slaves).They are good described in literature available on the Internet.The complete actual list of them can be found in [4].Selected devices of this list are in Table 2.

1-Wire powering
As mentioned in second part of article, there are several less or more complex solutions of 1-Wire sensor networks.Parasitic powering is used by simplest, small extent networks, which are powered from control device (from master) by date wire.This wire can be connected to external power voltage +5 V over the pull-up resistor (see model of network in Fig. 4), when the current delivered by the master may not be sufficient to maintain operating voltage in the slaves [2].Pull-up resistor has from 1000 to 5000 ohm value.Each sensor has an internal capacitor (C in ), which is loaded from data line in quiet state, and which can serve as power source for sensor in the short time of the sensor activity.More complex solutions use pull-up circuit for sufficient pull-up current and for quick transient from low to "high" voltage level.A pull-down transistor switch is used to short the data line to the return line in order to pull the data line down [3].wire serves also as supply wire [3] External powering (+5V, +12V or another) is used for complex sensor network, or for more demanding requirements of network components.In such case, the network needs more than one pair of wires.

Radius and weight of 1-Wire network
In the terminology describing the 1-Wire network solution, the term radius (in meters) is used for the length of longest line from master to slave, and the term weight is used for the sum of lengths of all cables in the network.It is clear, that weight corresponds to electrical capacitance of lines.But, sensors also have their capacitances.Hence, each of sensors (in dependence of their capacitance) can be numerically transformed in equivalent length of cable in meters and contributes to total weight of the network.The original 1-Wire literature, (for example [2]) introduces the maximal length of 1-Wire bus 750m, but this length must be decreased by equivalent weight of all components, connected to it.Efficiency of 1-Wire adapter is important and often limited from this point of view.

COMMUNICATION IN 1-WIRE NETWORK
Each device in the 1-Wire network has its own unique 64 bit address, given by producer, and master can communicate with it and manages the network by 1-Wire protocol.Slaves can't communicate one with another; they only response to master invitation.The least significant byte of the 64 bit serial number is an 8-bit number of type of the device.The most significant byte is a standard (for the 1-wire bus) 8-bit CRC for weak protection of transferred data against errors [11].
The basic communication sequence contains a reset pulse followed by an 8-bit command, and then data are sent or received in groups of 8-bits.Master finds out the set of devices in the network, selects the relevant slave and requests it to send data or sets the alarm conditions.This communication is of half-duplex type (bidirectional, but only one-way at a time).The shape and duration of relevant type of impulses are strictly specified (Fig. 2).Deformations in time series of impulses can either harm or completely kill the communication in the network.Maximal bit rate in the 1-Wire network is 16 kbit/sec.RC-time constant of the network (the parallel parasitic or powering capacitances, and serial parasitic, protective or matching resistances) causes impulse deformations mentioned above.That is, why the length of network cabling and amount of devices in 1-Wire network are limited, and why design of network must be wellconsidered.
Slew rate can be positively influenced by sophisticated adapter, with active pull-up and pull-down mechanism, eventually with slew rate control mechanism.

INTERCONNECTION CABLING
In Maxim's documentation or in [3], there is twisted pair cabling recommended for realization of 1-Wire interconnecting lines.Twisted construction of wire pairs and pair groups ensures the 1-Wire communication against interfering from outer sources, as well as against radiation from lines to surrounding area.Twisted pair cable of cat-5 or cat-5e can be used for these purposes (UTP cables).
Flat or ribbon telecommunication cables and other non-twisted cables are not recommended, certainly not for lines longer than a few meters.As we have tested in our experiments, non-twisted cable exhibited relative good service (without failing and without errors in communication) up to length about 15 m only.
For network branching and prolonging, the UTP splitters and combiners (RJ-45 type components) can be used, as recommended for example in [9].

SOFTWARE SOLUTIONS FOR MANAGING 1-WIRE NETWORK
Professional products OneWireViewer [7] or LogTemp [8] programmes, installed in personal computer (PC) can be used for communication in 1-Wire network, i.e. for managing and data gathering in the sense of 1-Wire protocol.
The first of them -OneWireViewer -is designed by Maxim.Its installation bundled with 1-Wire drivers is easy and is supported by web pages of Maxim.The software after launching displays the list of devices connected in the 1-Wire network, description and measured data or diagram of selected device, etc.
LogTemp software (by MR Soft Tmi) serves to the similar purpose as OneWireViewer.As we had mostly the temperature sensors and needed displaying their measured values simultaneously, this software seemed us more advantageous.Beyond graphical form (daily, weekly and monthly time series) also table form of measurement results can be obtained, alarm setting, message sending and some other useful functionality are allowed by LogTemp.

OUR EXPERIMENTS AND EXPERIENCE
Our goals were design and testing of behaviour and reliability of as cheap realization 1-Wire technology as possible.We realized 1-wire network in laboratory conditions, but we tried realize such network weight and such amount of sensors, which approximate to real home automation network.
As mentioned earlier, our attempt with non-twisted cable ended at about 15 m, because of its big capacity (units of nF) and unreliable behaviour of network.Reliability and stability of 1-Wire network were gained only with twisted pair cables; we had to our disposition CAT5e cables of Kerpen, Elite and Solarix marks.Only short branches with sensors were realized from ribbon telephone cable.
As master, 1-Wire adapter DS9490R [5] was used.We tested more different combinations of basic architectures, and both firm and demountable connections for extending and branching of the network.Maximal length of the main linear line was about 360 m, and maximal 15 pieces of 1-Wire sensors were connected along this bus.The branches in combined topology had 10 cm, 2 m and 5 m lengths.The 100 Ohm matching resistors were used in short branches at the end near the master.After testing another types of connectors, the RJ-45 connection components in demountable nodes made us best service at the numerous experiments.But there is presumption, that for fixed network in the automation building, the solder connections instead of demountable ones are better solution.Our numerous variations of network schemes were implemented with temperature sensors of DS18S20 type (9-bit resolution, or the ± 0.5°C precision of temperature values from -55°C to +125°C, [13]).
In the Fig. 5, there is illustrated one of last successful realizations of 1-Wire topology, where the 360 m main linear bus was combined from all 3 mentioned types of cables, connected by means of RJ-45 combiners.
Setting, data watching and gathering were realized by LogTemp software.All steps of network managing were allowed at a distance, as well, using TeamViewer programme [10].The actual temperature values and their time evolution could be observed also at web-page.
The network described above worked without problems for a long time (several weeks), even if we connected or disconnected some components.Minutely, presence data and temperature data were sent to master without errors.We found our network weight mentioned above was extreme for used type of 1-Wire adapter.More sophisticated type of adapter would be a better solution for such or more large networks.

CONCLUSIONS
In this article, main properties of 1-Wire technology, as interesting candidate for home automation sensor network, are described.Also our laboratory experience is mentioned.The results of testing a few hundred meters 1-Wire network confirmed positive rating of this sensor network type, regarding the small complexity, simple realisation and little cost.Many trials showed that success, correct operating and reliability of design realization are conditioned to rigorous keeping the 1-Wire standards, respect to impedance matching in the networks, and other routine principle for practical building the electronic equipment.

Fig. 5
Fig. 5 Illustration of experimental laboratory 1-Wire network with combined linear and star topology

Table 1 The
bus; stubbed bus (more then 3-m branches); star (switched star is preferable), and their combinations

Table 2
[14]f view of several iButton readers and adapters[14]