📜 ⬆️ ⬇️

Introduction to 1-Wire

image
Many of you probably know this device. But not everyone knows that this is a microcircuit with a 1-wire interface. In such cases (and not only such), the company Maxim, previously Dallas Semiconductor, produces a number of devices: thermochrons, flash memory chips, ADC, keys, and more.
All this is a chip with a 1-wire interface.



Short


1-wire is an interface that allows you to build networks of devices with a common bus topology, one master — many slaves. Each device has its own unique 64-bit address. For two-way transmission of signals, despite the name, two wires are used: one common / earth, and the second for power and data transmission. This is the peculiarity of this network, that one conductor is used for power and data, although in some devices there is an optional third terminal for connecting external power.
')
Ironically, the simplest ds1990a devices, which are used as keys to doorphones, doors, and sometimes alarms, are very common in Russia. This is the simplest chip tag, which contains only a unique 64-bit address and can only respond to a couple of commands (actually respond to this address). In the same package with the name iButton there are more complex microcircuits, for example, a thermochron, which is a microcircuit that can measure and memorize the ambient temperature after a specified time interval, then this data can be read; There are flash memory chips, which are often used to store keys; with all the variety who are interested can be found on the official website.

How it works?


While the tire is free, it pulls up to a positive level of nutrition and is held in it. At this moment, all devices on the bus charge the internal capacitor and receive energy. As soon as the master wants to address any device, he lowers the bus to zero for a specified period of time and returns it back, then waits for a response — if at least one slave is present on the bus, he must respond by briefly lowering the bus to zero. Further, in approximately the same way, the host transmits the address to whom exactly he wants to contact, the command and receives any data.
image

More or less general information about 1-Wire can be found on Wikipedia , and if you are interested in the specifics and details of the protocols, you can read, for example, here .

About 1-wire is written quite a lot, but mainly about how to use and communicate with them at the level of microcontrollers, embedded in devices, or just read data using a PC, usually one or two devices and at short distances. I do not want to repeat myself, but I plan to talk about how we, in the modern realities of the enterprise, built a large network, which currently covers three buildings, has more than 300 1-wire devices, 3 servers for collecting and processing data and operates 24 hours in 24 hours a day, 1-wire sockets are installed in rooms along with telephone and ethernet in almost every room and corridor.

So, if this is interesting to you, we will continue.

Related Links


Official site
Arduino and iButton
General Protocol Overview
Another very popular little article

continued here: tyts

Source: https://habr.com/ru/post/101954/


All Articles