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 an environment affected by electromagnetic interference.

By default, all Unipi Neuron and Unipi Axon controllers, as well as Unipi Extension modules, feature digital inputs with counter functionality able to detect pulses of up to 10 kHz frequency and only tens or hundreds of microseconds long. When the maximum value of a counter (4 294 967 295) is exceeded, its value is reset.

Counter inputs on Neuron PLCs will reset if the device’s power is disconnected. On Axon controllers and newer Extension xS11 and xS51 modules, the counter values are stored in memory and loaded during the next device startup. This feature prevents any loss of data due to loss of power.

The following picture depicts a connection of an external device to an 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 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 the pins mentioned above. After the connection of those pins, edit the evok.conf  file 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