(Обновление для соответствия новой версии исходной страницы.)
(не показано 8 промежуточных версий 2 участников)
Строка 1:
Строка 1:
{{DISPLAYTITLE: 1-Wire in Wiren Board controllers }}
<languages/>{{DISPLAYTITLE: 1-Wire in Wiren Board controllers }}
'''[https://wirenboard.com/en/product/1wire-DS18B20/ Buy DS18B20 1-Wire temperature sensor]'''
'''[https://wirenboard.com/product/1wire-DS18B20/ Buy DS18B20 1-Wire Temperature Sensor]'''
[[Image: ds18b20.jpg |300px|thumb|right| The most popular 1-Wire temperature sensor is the DS18B20, installed in a sealed housing. '''[https://wirenboard.com/en/product/1wire-DS18B20/ Buy]''' ]]
[[Image: ds18b20.jpg |300px|thumb|right| The most popular 1-Wire temperature sensor is the DS18B20, installed in a sealed housing. '''[https://wirenboard.com/product/1wire-DS18B20/ Buy]''' ]]
== Connection ==
== Connect ==
[[Image: WirenBoard+1-Wire.png | 200px|thumb|right| Connecting a 1-Wire Sensor to a Wiren Board Controller ]]
[[Image: WirenBoard+1-Wire.png |200px| thumb|right| Connecting a 1-Wire Sensor to a Wiren Board Controller ]]
{{Wbincludes:1-Wire Network}}
{{Wbincludes:1-Wire Network}}
<div lang="ru" dir="ltr" class="mw-content-ltr">
== Software support ==
== Поддержка в ПО ==
Sensor values are broadcast to the [[MQTT|MQTT]] message queue by the driver [https://github.com/wirenboard/wb-homa-w1 wb-mqtt-w1].
Значения датчика транслируются в очередь сообщений [[MQTT|MQTT]] драйвером [https://github.com/wirenboard/wb-homa-w1 wb-mqtt-w1].
Image: 1wire_mqtt.png | MQTT-топик и идентификатор датчика в разделе ''Settings'' веб-интерфейса
Image: 1wire_mqtt.png | MQTT topic and sensor ID in the ''Settings'' section of the web interface
Image: Web-devices-1-wire.png | Показания датчика и его уникальный идентификатор на странице ''Devices'' веб-интерфейса
Image: Web-devices-1-wire.png | Sensor readings and its unique identifier on the ''Devices'' page of the web interface
</gallery>
</gallery>
</div>
<div lang="ru" dir="ltr" class="mw-content-ltr">
After connecting the sensors to the controller, the values from the sensors will immediately appear in the [[Special:MyLanguage/Wiren Board Web Interface | Web Interface]]. If multiple sensors are connected to the controller, they will be distinguished by their identifiers. Identifiers are assigned to sensors at the factory, and contain device type, number and checksum.
После подключения датчиков к контроллеру значения с датчиков сразу появятся в [[Веб-интерфейс Wiren Board|веб-интерфейсе]]. Если к контроллеру подключены несколько датчиков, они будут различаться своими идентификаторами. Идентификаторы присваиваются датчикам на заводе, и содержат тип устройства, номер и контрольную сумму.
Connecting a 1-Wire Sensor to a Wiren Board Controller
The controller already has a 3 kΩ pull-up resistor between the data bus and VCC - no external resistor is needed.
Three wire connection
The sensor has three outputs. Their colors may vary from model to model, it is advisable to find the documentation for your model.
Signal
Terminal
Color: Model 1
Color: Model 2
Color: Model 3
Vdd (VCC, Power)
+ 5V Out
Red
Red
Red
GND (ground)
GND
Black
Black
Yellow
DQ (DATA, data )
1W
Blue
Yellow
Green
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.
Длина шины при подключении одного датчика до 200 метров.
При подключении нескольких датчиков, подключайте их к питанию 5 В (не используйте двухпроводную схему).
Прокладка линии одной шиной лучше, чем прокладка звездой.
Для прокладывания длинной шины или в условиях повышенных помех (например, в щитке) — используйте витую пару, например, Cat 5, лучше экранированную.
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.
Software support
Sensor values are broadcast to the MQTT message queue by the driver wb-mqtt-w1.
MQTT topic and sensor ID in the Settings section of the web interface
Sensor readings and its unique identifier on the Devices page of the web interface
After connecting the sensors to the controller, the values from the sensors will immediately appear in the Web Interface. If multiple sensors are connected to the controller, they will be distinguished by their identifiers. Identifiers are assigned to sensors at the factory, and contain device type, number and checksum.
Useful links
Поддерживаемые контроллером Wiren Board системы верхнего уровня, приложения, способы программирования, протоколы и устройства
Протоколы
Опрос датчиков и работа с устройствами (в базовой комплектации)