Quick Start - ArrowElectronics/Industrial-Control-Monitoring-01 GitHub Wiki

Demo Configurations

The kit offers two demo configurations: a Default Configuration and a User Defined Configuration. For either configuration you must provide the appropriate power to J5 and set the jumper as shown on the main page to set J5 as the power source.

Default Configuration

The Default Configuration offers a specific type of measurement and requires no further user configuration. The measurement requires a K-type thermocouple connected across channels 1 and 2 (by connecting to the appropriate pins on J2). The Default Configuration also enables cold-junction compensation using an on-board RTD which is by default connected to channels 17, 18, 19, and 20. The temperature is measured periodically every 2 seconds.

User Defined Configuration

The User Defined Configuration allows the user to configure the sensor IC as desired using the channels for virtually any functionality supported by the sensor IC. See Channel 17-20 Connectivity below for more details on making these channels generically available in the User Defined Configuration. In the User Defined Configuration you must first configure the board by sending a series of frames via the serial connection. The steps are as follows:

  1. Set the system to Configuration mode using the DIP switches as shown on the main page.
  2. Send the necessary configuration frames over the RS485 channel (see frame definitions)
  3. Set the system to Run mode using the DIP switches as shown on the main page.

Once returning to Run mode, the system will carry out the required measurement and transmit results over RS485.

Modes of Operation

The operation mode is set by DIP switches as shown in the image on the main page. There are three modes: Configuration Mode, Auto Mode, and Run Mode.

Configuration Mode

Configuration Mode is only used in the User Defined Configuration. In this mode, the user sends frames to the board via a serial connection. During this mode the user may configure board parameters such as channel configuration, sample rate, and measurement method. These configuration parameters persist either until the board loses power, until the parameters are rewritten by sending further serial frames, or until the Auto Mode is entered.

Auto Mode

Auto Mode is only used in the Default Configuration. The user merely toggles into the Auto Mode and then immediately the board becomes automatically configured for the Default Configuration. At this point the user can toggle to Run Mode and start measurement.

Run Mode

In Run Mode, the board takes one or more measurements and sends the results across the serial connection. The operation in Run Mode depends on how the board was previously configured either in Configuration Mode or Auto Mode. Note that in Run Mode the board outputs measurement data over the serial connection. The user should not send any frames to the board as any incoming serial frames will be ignored in Run Mode.

RS485 protocol specification

Physical layer

  • Baud rate = 9600 bit/s
  • 1 Start bit
  • 8 data bits
  • 1 Stop bit
  • No parity
  • MSB first

Frame definitions

The configuration data, and measurement results are transmitted bytewise in raw binary format. The definitions of the frames of communication are the following.

Every frame begins with the operation code byte, which identifies the frame. Depending on the frame, a variable number of data bytes may follow. See the opcode bytes in the Table below.

Opcode Name Type
0xF0 RAW_CH_CONFIG Configuration Frame from User PC
0xF1 ENABLE_PERIODIC_CH Configuration Frame from User PC
0xF2 PERIODIC_SAMPLE_RATE Configuration Frame from User PC
0xF3 START_SINGLE_MEAS Configuration Frame from User PC
0xF4 START_PERIODIC_MEAS Configuration Frame from User PC
0xF5 STOP_PERIODIC_MEAS Configuration Frame from User PC
0xF6 MEAS_RESULTS Result Frame from ICM-01
0xF7 MEAS_ERROR Result Frame from ICM-01

Table: Opcode Names

A detailed description of the possible communication frames is the following.

Configuration frames

Configuration frames are received by the ICM-01 board while it is in Configuration Mode. In case of sending incorrect configuration data, the frames may be retransmitted to correct. Auto mode may be used as an operational starting point and in that case it is unnecessary to send any configuration frames.

RAW_CH_CONFIG
Configure a channel of the LTC2983 temperature measurement system.

CH identifies the channel to be configured and is sent as a binary coded unsigned integer number in the range of 1 to 20.

B4-B1 contain the 32 bits of configuration flags used to configure the given channel. The bytes follow big-endian order, the first bit of B4 is bit 31, the last bit of B1 is bit 0. See the datasheet for the meaning and function of individual configuration bits. Look for Table 4, Channel Assignment Data.

ENABLE_PERIODIC_CH
Enable a set of channels for measurement.

EN4-EN1 bytes identify channels to be enabled or disabled. The bytes follow big-endian order, the first bit of EN4 is bit 31, the last bit of EN1 is bit 0. Bits 31-20 are unused. Writing ‘1’ in bit n enables channel (n+1) of the measurement system. Writing ‘0’ in bit n disables channel (n+1) of the measurement system.

For example, the frame for enabling channels 1, 2, 7, 8, and 16 is: 0xF1 0x00 0x00 0x80 0xC3

PERIODIC_SAMPLE_RATE
Configures the frequency of periodic measurement.

SR identifies the time period between consecutive measurements. For example, if four channels are enabled with a sample rate of two seconds, then it will take eight seconds to sample all for channels before starting over again with the first enabled channel. The valid SR values and the corresponding time periods are listed in the Table below.

SR value Time period
0x01 One second
0x02 Two seconds
0x03 Five seconds
0x04 Ten seconds
0x05 Thirty seconds
0x06 Sixty seconds

Table: Sample rates

START_SINGLE_MEAS
Initiate single measurement of a single channel.

CH identifies the channel to be configured and is sent as a binary coded unsigned integer number in the range of 1 to 20. The measurement will take place as soon as the DIP switches are toggled back to Run Mode.

START_PERIODIC_MEAS
Start periodic measurement on previously configured and enabled channels, with previously configured time period. The measurements start taking place on a periodic basis as soon as the DIP switches are toggled back to Run Mode.

Single byte transaction.

STOP_PERIODIC_MEAS
Stop periodic measurement.

Single byte transaction.

Result frames

Result frames are transmitted by the evaluation system while it is in Run mode.

MEAS_RESULTS
Temperature results. The system transmits the measured temperature in degrees C, in case the measurement took place correctly, and did not yield any faults.

When in the the User Defined Configuration, CH identifies the channel corresponding to the measurement result. When in the Default Configuration, CH always equals 2.

T4-T1 hold the measured temperature value. The bytes follow big-endian order, the first bit of T4 is bit 31, the last bit of T1 is bit 0. The value is in Q22.10, two’s complement format, where the upper 22 bits are the integer part, and the lower 10 bits are the fractional part.

MEAS_ERROR
Error flags. In case a measurement yielded faults, the system transmits the error flags returned by the LTC2983 device.

CH identifies the channel corresponding to the measurement result.

ERR holds the value of error flags. See the datasheet for the description of the individual bits.

Example: evaluation of the protocol

Using a USB to RS485 serial converter allows direct configuration of the measurement system from a PC environment. The configuration and measurement functionalities may be validated using a terminal software capable of transmitting and receiving raw binary data. HTerm is a free terminal emulator that allows transmitting in binary or hexadecimal format, as well as flexible formatting and printing of received data. Examples of received and transmitted frames using HTerm are shown in the below Figure.

Figure: Received and transmitted frames in terminal emulator

Here is a summary of the steps to execute a single measurement:

  1. Set the system to Configuration mode using DIP switches.
  2. Send RAW_CH_CONFIG to configure the desired channel.
  3. Send START_SINGLE_MEAS frame to start measurement over the RS485 channel.
  4. Set the system to Run mode using DIP switches.

After returning to Run mode, the system will carry out the required measurement and transmit the result over the serial connection.

Here is a summary of the steps to execute periodic measurements:

  1. Set the system to Configuration mode using DIP switches.
  2. Send RAW_CH_CONFIG to configure the desired channels.
  3. Send ENABLE_PERIODIC_CH frame to enable the required set of channels.
  4. Send PERIODIC_SAMPLE_RATE frame to set the periodic rate.
  5. Send START_PERIODIC_MEAS frame to start periodic measurement.
  6. Set the system to Run mode using DIP switches.

After returning to run mode, the system will carry out the required measurements consecutively on the enabled channels. The time delay between each measurement is the periodic rate set.

Channel 17-20 Connectivity

All channels 1-20 are brought out to the header on the board. However Channels 17-20 are also connected to the on-board RTD. This is because the Default Configuration uses an RTD for cold junction compensation. This RTD connection is enabled by default, disallowing connections to channels 17-20 from the header. To connect external signals to these channels via the header you must remove R8, R81, R82, and RT1 as shown in the image below.