Digital inputs

The digital inputs (DI) are for reading logical states (true or false), which are represented by levels of DC voltage. The DIs are therefor suitable for reading two-state sensors such as switches (on/off), movement sensors (movement, no movement), water level sensors (water present, no water) etc. The software detects logical 1 (true) if the input voltage between given DIx.y and DIGND is between 5-35V. If the voltage is lower than 3.5V, the state is evaluated as 0 (false)

The DIs on the UniPi units are galvanically isolated, which means it is safer to use them in environment affected by electromagnetic interference.

The following picture depicts a connection of an external device to a UniPi 1.1 controller using an integrated 12V power source.

For preserving the galvanic isolation of both the connected device and UniPi's internal circuits we recommend using a 5-24V DC external power source connected according to a picture below.

Before connecting the power source, make sure JP2-JP5 jumpers are set correctly according to the UniPi 1.1 documentation. Bear in mind the negative pole must be connected to the corresponding P0x terminal on the power source.

Using DI13 and DI14 on the UniPi 1.1

As the default cable connecting the Raspberry Pi to the UniPi 1.1 board does not support digital inputs 13 and 14, it is necessary to create your own connection.

The picture below shows the P5 header on the UniPi board, designed for connection of the Raspberry Pi and matching the P5 header on the computer itself. Highlighted are the IN14 and IN15 pins.

It is possible to use any of the unused GPIOs and wire them to pins mentioned above. After the connection of those pins, edit the evok.conf file in order to enable them.

RPi connector pin RPi function UniPi P5 pin UniPi function
27 (GPIO28)ID_SD 5 I2C0 data
28 (GPIO29)ID_SC 6 I2C0 Clk
29 GPIO5 3 DI13
31 GPIO6 4 DI14
x x 7 3V3
x x 8 5V
x x 1.2 GND

GND connectors are not required. The 3V3 connector is required only if the second I2C bus connector is used