XN03 - Analog Inputs-Outputs

X-NODE Analog Inputs-Outputs is a SoM (System on module) with a potentiometer, a RGB LED, 3 PWM outputs, 8 PIN port with 3 analog outputs, 3 analog inputs, 3.3V and GND. The resistance of the potentiometer is 5kΩ, with a tolerance of ± 20% and rated power of 5mW. The RGB LED can display up to 16 million different colors by adjusting the primary color values (Red, Green, and Blue), with a current draw of 20mA and operating temperature range from 0 °C to 80 °C.

This X-NODE is ideal for reading/generating analog signals, commonly used by power stage controllers in motors and actuators, the potentiometer is useful for proportional control of movement and system calibration, the RBG LED is useful to display status of processes, visual warnings, light dimming of devices or prototypes.

TABLE OF CONTENTS

I. How does it work?

The X-NODE Analog Inputs-Outputs is a SoM (System on Module) that possess all the necessary hardware components to read and generate analog signals, and generating PWM 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 Analog Inputs-Outputs 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 Sparkfun’s Qwiic connection system to expand its compatibility even further in a fast and easy way.

II. Layout

  1. External analog input/output port.

  2. Potentiometer.

  3. 4-pin JST Qwiic connect connector.

  4. RGB LED.

  5. PWM output signal.

  6. UART<>I2C serial ports.

  7. X-NODE model.

  8. X-NODE type.

  9. mikroBUS™ connector.

  10. Hardware revision.

  11. Core component name of the X-NODE device

III. Specification

Type

Analog outputs & inputs

Applications

IoT projects and general-purpose generation/reading of analog signals, commonly used by power stage controllers in motors and actuators, the potentiometer is useful for proportional control of movement and system calibration, the RBG LED is useful to display status of processes, visual warnings, light dimming of devices or prototypes.

Key features

Single turn adjustable potentiometer, with a resistance 5kΩ, a tolerance of ± 20% and rated power of 5mW. The RGB LED can display up to 16 million different colors by adjusting the primary color values (Red, Green, and Blue), with a current draw of 20mA and operating temperature range from 0 °C to 80 °C. 8 male PIN port and through holes for 3 outputs, 3 inputs 3.3V and GND, through hole access to PWM signals.

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 Analog Inputs - Outputs 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 “XN03” 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 & character 10 respectively on the ACII table. Configure your serial port/MCU to send these characters at the end of every command.

XN03A?<CR+LF>

Test if serial communication is successful.

Response: OK<CR+LF>

XN03A+V<CR+LF>

Gets the firmware version of the X-NODE

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

XN03A+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., command: XN03C+ID=H<CR+LF>

XN03A+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., command: XN03A+TW=28<CR+LF>

XN03A+GP<CR+LF>

Gets a relative value depending on the current position of the potentiometer from 0 to 100.

Response: XN03A=VAL<CR+LF>

i.e., response: XN03A=67<CR+LF>

XN03A+G(1-3)<CR+LF>

Gets the current value of any of the 3 analog signals. Returns a relative value from 0 to 100.

Response: XN03A=VAL<CR+LF>

i.e., command: XN03A+G2<CR+LF>

i.e., response: XN03A=29<CR+LF>

XN03A+S=(Out1/PWM1/Red),(Out2/PWM2/Green),(Out3/PWM3/Blue)

Changes the current state of the 3 outputs, this values are written to the analog outputs, the PWM signals and the LED RGB values. It allows values from 0 to 255.

Response: OK<CR+LF>

i.e., command: XN03A+S=0,255,100<CR+LF>

I2C protocol.

To communicate with the X-NODE Analog Inputs - Outputs 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 device I2C address with ASCII commands (see UART protocol section)

Analog inputs

Writing:

Analog outputs & PWM

Reading:

VI. Downloads

Last updated