Introduction to 1-Wire

    image

    The first article of this cycle here
    The second part of this cycle here
    The third part of this cycle here

    Many of you, probably, are familiar with this device. But not everyone knows that this is a 1-wire chip. In such cases (and not only such), Maxim, previously Dallas Semiconductor, produces a number of devices: thermochrones, flash memory chips, ADCs, keys and much more.
    All these are chips 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 signal transmission, despite the name, two wires are used: one common \ ground, 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 some devices optionally have a third output for connecting external power.

    Ironically, the simplest devices ds1990a, which are used as keys to intercoms, doors, and sometimes alarms, are widely used in Russia. This is the simplest microcircuit tag that contains only a unique 64-bit address and can respond only to a couple of commands (actually respond to this address). In the same case, called iButton, there are more complex microcircuits, for example a thermochron - a microcircuit that can measure and remember the ambient temperature after a specified time interval, then this data can be read; there are flash memory chips that are often used to store keys; Anyone who is interested in can see all the diversity on the official website.

    How it works?


    As long as the tire is free, it is pulled to a positive power level and held in it. At this point, all devices on the bus charge the internal capacitor and receive energy. As soon as the master wants to turn to any device, he lowers the bus to zero for a specified period of time and returns it back, then waits for an answer - if at least one slave is present on the bus, he must respond by briefly lowering the bus to zero. Then, in approximately the same way, the host transmits the address to whom exactly he wants to contact, the team and receives any data.
    image

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

    Quite a lot has been written about 1-wire, but mainly about how to use and communicate with them at the microcontroller level, integrate into devices, or simply read data using a PC, usually one or two devices and at short distances. I don’t want to repeat myself, but plan to talk about how in modern reality we built a large network at the enterprise, which currently covers three buildings, has more than 300 1-wire devices, 3 servers for collecting and processing data and works 24 hours in 7 days a week, 1-wire sockets are installed in rooms along with telephone and ethernet in almost every room and corridors.

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

    Related Links



    Arduino and iButton official site
    General protocol overview
    Another very popular article

    continued here: tyts

    Also popular now: