1-Wire

1-Wire is a name for a communication bus designed by Dallas Semiconductor company, that is designed for the low-speed transmission of digital signals. As the name suggests 1-Wire sensors can theoretically use only a single conductor for both power voltage and data. The negative pole can be grounded. In practice, however, at least two conductors (DATA, GND) are used. 1-Wire sensors from the Unipi product range use four conductors (Vcc, DATA_0, DATA_1, GND) for better reliability and enhanced serialisation options.

A distinct advantage of the 1-Wire bus is the low component price; thermometers available at Unipi e-shop are offered from €10 apiece. A single bus can be up to 200 m long with up to 15 sensors connected at once. Each sensor is also provided with its own HW address for its addressing on the bus.

The DS18B20 is widely used 1-Wire temperature sensor placed within TO-92 casing.

  • power voltage range: 3.0V - 5.5V
  • measurement range: -55°C/+125°C
  • accuracy ±0,5°C in the range of -10°C/+85°C
  • conversion of 12-bit temperature value to a digital signal (750 ms max. latency)
  • can be powered by the DATA wire (parasite mode)

Mind the EM interference The 1-Wire bus is prone to electromagnetic interference, it is thus recommended to use a shielded cable (ie. FTP). The cable must be routed through places with the least interference possible and must be well clear of any cables supplying induction loads. The most frequent sources of interference are frequency converters, inverters etc.

Follow the correct topology It is also important to follow the bus topology and to avoid creating any branches. To meet this condition we recommend using Unipi 1-Wire thermometers featuring a pair of data conductors - one leading back to the PLC or the previous sensor on the bus, one leading to the following sensor in the line. On the end of the bus, a sensor must be placed to avoid any signal bounces.

Mind the limitations Communication speed is pre-defined, eg. cannot be decreased to mitigate the interference as with the RS485 interface. Any issues with the bus should be fixed only by adjusting the wiring, decreasing the number of sensors or dividing the network between multiple controllers. To prevent such issues, we also developed the Unipi Extension xG18 - a Modbus RTU extension module with eight 1-Wire ports.

Use the 1-Wire only in suitable installations Given the sensitivity towards EM interference, it is not recommended to use the 1-Wire in industrial automation. Its low cost, simplicity and wide range of compatible products makes the bus an ideal solution for smart home applications, especially when combined with the versatility and broad connectivity of Unipi controllers.

The RJ45 connector is useful especially in the following cases:

  1. you need to connect a pair of sensors to a Unipi Neuron or Unipi Axon controller using the 2-port splitter
  2. you need to connect multiple sensors using the 8-port

A total of 4 wires is used. However, the connector description above has 6 wires connected, as the Vcc and GND voltage conductors can be doubled (depicted by white streaks in the picture). As some devices were not designed for a dual power supply we need to connect the pins 5 and 8 (basic colours) first.

Pin (contact) number Meaning
1, 2 unused
3 GND
4 VCC
5 VCC
6 DATA_0
7 DATA_1
8 GND

The picture below shows a (basic) wiring used for the Unipi temperature sensor:

Note: DATA_1 is the main data wire. That said, if you connect a cable sensor with only a single data wire to the RJ45 connector, always connect it to pin 7 (eg. DATA_1 pin). The DATA_0 contact is a supplemental contact of Unipi sensors designed for a maximum possible bus serialization and serves for connecting the next sensor on the bus. The Unipi 1-Wire hub can serve as an example of the double-data wire principle. If you use a non-Unipi cable sensor with only a single data wire, the above-mentioned serialization with Unipi 1-Wire hub is not possible. You can, however, connect the sensor to the end of the bus (eg. as the last sensor in the hub).

The Unipi Unipi Extension xG18 module allows an easy connection of multiple temperature sensors using a single data wire, with each sensor having its own channel (connector). Connecting multiple sensors to a single channel is not possible.

By default, Unipi 1.1 board, all Neuron PLCs and most of Unipi Axon controllers feature a single 1-Wire bus port. In the Unipi product range, you can also find a range of 1-Wire sensors for measuring various quantities. Alternatively, you can use 1-Wire sensors outside the Unipi product range.

Older variants of Unipi Neuron controllers feature an RJ45 1-Wire port (made in black to distinguish it from the ETH connector). the older RJ45 1-Wire connector

Unipi 1.1/1.1 Lite are also provided with RJ45-type 1-Wire connector, allowing you to easily connect 1-Wire sensors with RJ45 connector.

Unipi Axon and newer Unipi Neuron version feature a three-wire terminal replacing the RJ45 connector for improved reliability- nový konektor 1-Wire

If you wish to connect a sensor to a controller with the 3-pin terminal, you can do so by three methods:

  1. cut off the RJ45 connector from the sensor, fasten ferrules onto the wires and screw them into the three-wire 1-Wire terminal on the controllers
  2. use a cable reduction in combination with the Unipi 1-Wire hub
  3. use the 1-Wire splitter (3-pin terminal variant).

All described methods are depicted in the schematics below.

The sensor features a 4-wire connection to improve the reliability of branched networks. However, it is possible to modify it for 3-wire connection by joining DATA wires if needed.

You can also short-circuit Vcc and GND wires to run the sensor in parasite mode with communication through two wires.

Connecting a single 1-Wire sensor to the Unipi controller

The 1-Wire thermometer can be connected to a 3-pin screw terminal after a simple modification of its connector

  1. cut off the RJ45 connector
  2. fasten ferrules onto the conductors
  3. screw the conductors into the plug-in screw terminal according to the picture below (the plug-in terminal is included in the controller's package)

Connecting a pair of 1-Wire sensors to the Unipi controller via RJ45 splitter

No modification of the thermometer itself is needed to connect two thermometers to a single controller. All you need to do is to purchase a corresponding variant of the 2-port 1-Wire splitter featuring a pair of RJ45 ports; the splitter is available in both connector variants (RJ45 / 3-pin screw terminal)

Connecting multiple 1-Wire sensors through a 1-Wire hub

A compact 8-port 1-Wire hub features eight RJ45 ports and allows you to connect multiple 1-Wire thermometers or other sensors with the RJ45 connector. To connect the hub to a controller you can either use a suitable patch cord (on controllers with the RJ45 port) or the cable reduction (on controllers with the newer 3-pin screw terminal).

It is necessary to follow the correct port order when connecting devices to the hub! Port 1 must be always used as an input port, the remaining ports must not be skipped; otherwise, any devices connected after the skipped port would be cut off from the 1-Wire bus.

Creating a multi-hub extensive network of 1-Wire sensors

It is possible to create a chain of multiple hubs if an extensive network of 1-Wire sensors or devices is needed. When interconnecting two hubs the topology stays the same - Port 1 serves as an input while the output is located on the last port in order.

Any other 1-Wire device connected after the output port will be cut off from the bus!

The basic 1-Wire temperature sensor is described above in the RJ45 connection chapter.

1W-T/H-IB & 1W-T/H-IB2

Unipi product range also contains 1W-T/H-IB and 1W-T/H-IB2 compact on-wall sensors designed for measuring temperature (1W-T-IB2 model), or temperature and relative air humidity (1W-TH-IB2 model) in building interiors. Sensors are equipped with 4-wire screw or spring terminals and can be modified for RJ45 connector or for the 3-wire terminal.

Three-wire terminal connection
This option is suitable for cases when you need to connect single sensor to Unipi controller equipped with the 3-pin terminal, or you plan to add more sensors behind the first one.

RJ45 connection
Connection to RJ45-connector network cable is useful for star-shaped network topologies created from 1-Wire hubs. You can also use it to connect the sensor to Unipi 1.1 extension board, or to the older variants of Unipi Neuron controllers. 1W-T-IB and 1W-T-IB2 sensors can be also connected to the Unipi Extension xG18 module. Coloured connection scheme on the picture corresponds to the T568B connection.