XN01 - Digital Inputs

X-NODE digital inputs is a SoM (System on module) with a built-in surface mount 8 position DIP switch, 8 inputs and GND pin. The DIP switch has a lifespan of 2000 cycles, an insulation resistance of 100 MΩ and operation temperature range from -10 °C to 80 °C. This general-purpose X-NODE can be used to process digital signals.

TABLE OF CONTENTS

I. How does it work?

The X-NODE Digital Inputs is a SoM (System on Module) that possess all the necessary hardware components to read digital signals built-in, therefore technical knowledge of hardware is not needed in order to use it, it communicates with MCU’s using a 2 Wire I2C serial interface or through ASCII commands using a UART serial interface, the latter allows this X-NODE to be compatible with virtually any system that uses a microcontroller, microprocessor, or even industrial equipment.

The X-NODE Digital Inputs is compatible with the mikroBUS™ standard, that enables its use with Mikroe® development ecosystem with 1000+ click boards and development boards including X-NODE devices. It also comes with two 4-pin JST connectors compatible with the Sparkfun’s Qwiic connection system to expand its compatibility even further in a fast and easy way.

II. Layout

  1. External digital input port.

  2. DIP 8 position switch.

  3. 4-pin JST Qwiic connect connector.

  4. Hardware controller unit.

  5. UART<>I2C serial ports.

  6. X-NODE model.

  7. X-NODE type.

  8. mikroBUS™ connector.

  9. Hardware revision.

  10. Core component name of the X-NODE device

III. Specification

Type

Digital Input

Applications

IoT projects and general-purpose signal and state capture, i.e., to read user setups in a circuit.

Key features

Surface mount 8 position DIP switch, with a lifespan of up to 2000 cycles, an insulation resistance of 100 MΩ and operation temperature range from -10 °C to 80 °C. External signal port with 8+GND male pins and 8+GND through-holes.

Compatibility

Interfaces

UART, I2C

Dimensions

65 x 26 x 21 mm

Voltage

3.3 V

IV. Pinout

This table shows how the pinout on X-NODE Digital Inputs corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).

V. Device operation

The X-NODE device can operate using ASCII commands through the UART serial port or through I2C protocol for advanced users.

UART Protocol

To communicate to the device the X-NODE’s ID must be known, this ID is composed of the device model, which is written on the device itself (see Layout section), and a user defined index made up of a single uppercase letter of the alphabet , i.e., this X-NODE id starts with “XN01” and ends with a character, by default this character is the letter “A”, there can be up to 10 devices of the same type connected simultaneously, remember to set up their INDEX before connecting them in the same circuit.

UART settings

Configure the serial port/MCU UART generator to the following settings.

  • Baud rate: 115200 bps.

  • Parity: No parity.

  • Data bits: 8.

  • Stop bits: 1.

List of commands

Once the device is connected send any of the following commands, every command must finish with <CR+LF>, which means followed by , is the carriage return character, is the line feed character, which corresponds to character 13 and character 10 respectively on the ACII table. Configure your serial port/MCU to send these characters at the end of every command.

XN01A?<CR+LF>

Test if serial communication is successful.

Response: OK<CR+LF>

XN01A+V<CR+LF>

Gets the firmware version of the X-NODE

Response: XN01A=Version<CR+LF> i.e.: XN01A=0.1<CR+LF>

XN01A+ID=(A-Z)<CR+LF>

Changes the device Index, only A-Z uppercase values are allowed, after receiving an “OK” response all subsequent commands should use the new device ID, even after powering off the device.

Response: OK<CR+LF> i.e.: XN01C+ID=H<CR+LF>

XN01A+TW=(1-126)<CR+LF>

Changes the device I2C address, the new address must be in decimal and must be a value from 1 to 126.

Response: OK<CR+LF> i.e.: XN01A+TW=28<CR+LF>

XN01A+GS<CR+LF>

Gets the current state of the 8 inputs, either on the DIP switch or the external inputs. Returns 1(HIGH) or 0(LOW), depending on the state of the switch, read from left to right, where the first value on the left is Input 1.

Response: XN01A=(int1)(int2)(int3)(int4)(int5)(int6)(int7)(int8)<CR+LF> i.e.: XN01A=11011011<CR+LF>

I2C protocol.

To communicate with the X-NODE the I2C address must be known, by default this address are the digits on the X-NODE model which can be found on the device itself (see Layout section).

I2C settings:

  • Max communication speed: 100 kHz

  • Address: 7 bits

Note: make sure there isn’t other device with the same address connected, if needed, change the X-NODE I2C address using ASCII commands (see UART protocol section).

Reading:

VI. Downloads

Last updated