Wbincludes:1-Wire Network/en

Материал из Wiren Board
Версия от 17:17, 2 мая 2022; A.Degtyarev (обсуждение | вклад) (содержимое: «{{Wbincludes:1-Wire Warning}} <h3> Three wire connection</h3> The sensor has three outputs. Their colors may vary from model to model, it is advisable to find the documentation for your model. {| class="wikitable noclear" !Signal||Terminal||Color: Model 1||Color: Model 2||Color: Model 3 |- |Vdd (VCC, Powe...», единственным автором которого был A.Degtyarev (обсуждение))

The controller already has a 3 kΩ pull-up resistor between the data bus and VCC - no external resistor is needed.

Подключение по трём проводам

Датчик имеет три вывода. Их цвета могут меняться от модели к модели, желательно найти документацию на свою модель.

Сигнал Клеммник Цвет: модель 1 Цвет: модель 2 Цвет: модель 3
Vdd (VCC, питание) +5V Out Красный Красный Красный
GND (земля) GND Чёрный Чёрный Желтый
DQ (DATA, данные) 1W Синий Жёлтый Зелёный

Two-wire connection

Connect the power and ground pins of the sensor and connect them to the ground of the controller. With this connection, the sensor will take power from the data channel.

This method is not recommended, especially for connecting several sensors: the current from the data line may not be enough for all sensors, besides, polling slows down - time is spent on charging the internal capacitances of the sensors with voltage from the data line.

1-Wire busbar

The number of possible sensors and the reliability of their operation depends on the length of the bus, its topology and cable. Typically, up to 20 sensors of 5 meters of cable connected in a star work reliably at home.

The main document when designing a bus is instructions from the 1-Wire developer. Main points:

  • Bus length when connecting one sensor is up to 200 meters.
  • When connecting several sensors, connect them to a 5 V supply (do not use a two-wire circuit).
  • Laying a line with one bus is better than star laying.
  • For laying a long bus or in conditions of increased interference (for example, in a shield) - use a twisted pair cable, for example, Cat 5, better shielded.

A twisted-pair connection is a signal on one core of the pair, ground on the second, and similarly power supply: plus power on one core of the pair, minus on the second. Connect the power negative to signal ground. Connect the screen on one side to the minus power supply.