AD8 8-Channel Analog to Digital Converter Quick Start Guide

AD8 Introduction

Many NCD controllers include AD8 features, AD8 is a standardized grouping of 8 analog inputs, used for reading sensors and switches.  NCD controllers with AD8 features include many ProXR controllers, all ProXR Lite controllers, and all Fusion series controllers.  All controllers with AD8 capabilities will allow you to use the same command set shown in this guide, allowing your controller to read any sensor with a 0-5VDC analog output.  AD8 controllers feature 8-Channels of analog to digital conversion at 8-bit or 10-bit resolution (software selectable).  AD8 controllers are also capable of reading contact closure inputs, making our controllers ideal for limit switches, button pushes, and much more.

Analog Inputs Controlling Relays

ProXR AD8 controllers allow you to map analog inputs for direct control of on-board relays.  Inputs can be configured to flash relays, turn relays on or off, toggle the relay state, send push notification data, and much more.  Fusion series offer advanced features for triggering complex relay activation functions, including timers, relay sequences, and more.  Fusion does not include the “Relay Activator” features shown in this guide, as Fusion controllers include the more robust “Reactor” features instead.  If you would like to learn more about the Relay Activator features of ProXR controllers, please see section 11.1 of the ProXR Quick Start Guide.

Analog to Digital Connections

AD8 Series controllers allow users to monitor sensors and switches.  A/D inputs should never be left “floating,” which simply means all inputs MUST connect to something (such as a voltage or ground).  To prevent inputs from floating, a 10K Resistor connects each input to +5 or Ground using the pull up/down jumper.  While this 10K resistor does slightly interfere with the signal, its benefits far outweigh the consequences of leaving inputs floating. 

WARNING

A/D Inputs can accept a voltage from 0 to 5VDC.  You should NEVER exceed this voltage range.  Negative voltages will damage the A/D inputs.  Power the controller BEFORE applying voltages to these inputs.  Applying voltages to these inputs while the controller is powered down may result in permanent damage to the CPU.

Reading Switches/Variable Resistance Signals

A/D inputs are ideal for reading the on/off status of switches.  Simply position the Up/Down jumper in the UP Position and connect a switch between input and ground.  Our software may then be used to monitor the contact closure status of your switch.  AD inputs can also be used for reading variable resistance signals.  Position of Up/Down jumper should also be in UP position for reading variable resistance signals.  Controller will return 0-255.

Some A/D Connectors are much smaller, depending on the size and space of the circuit board, we often use a spring-loaded connector on circuit boards that do not have a lot of available space.

Base Station Software for AD8

The AD8 Command Set is used to read analog voltages on controllers equipped with an 8-Channel 8/10-Bit Analog to Digital Converter.  The AD8 Command Set converts a Voltage from 0 to 5 Volts DC into numeric values. 

In order to communicate with the AD8 controller, run the NCD Base Station software.

  • Connect the device to your computer using your favorite interface technology.
  • Run the NCD Base Station software
  • Select the appropriate COM port or IP Address
  • Click OK. 

When the dialog box appears, choose ‘AD8 8-Channel Analog to Digital Conversion Command Set’ as shown in the screen shot below.

Refer to the screen shot below for the 8-Bit/10-Bit Analog to Digital Conversion:

  1. MORE or LESS. MORE option expands windows to include section I of diagram. LESS option shrinks window to exclude section I.
  2. Read Analog Input Channel 1
  3. Read Analog Input Channel 2
  4. Read Analog Input Channel 3
  5. Read Analog Input Channel 4
  6. Read Analog Input Channel 5
  7. Read Analog Input Channel 6
  8. Read Analog Input Channel 7
  9. Read Analog Input Channel 8
  10. Communication Details. This section is shown when the MORE option from section A of the diagram is selected.
  11. This button queries all A/D Inputs, each one individually (8 Individual Commands).
  12. This button queries all A/D Inputs using a single command, which is much faster.
  13. 8-Bit Resolution means each input will return a value from 0 to 255
    One Communication Byte is received from the device for each channel using 8-Bit Resolution
    10-Bit Resolution means each input will return a value from 0 to 1023.
    Two Communication Bytes are received from the device for each channel using 10-Bit Resolution.
  14. The Loop Option will query constantly until the Loop options are unchecked.

AD8 Command Set

The AD8 Command Set is used to read analog voltages on controllers equipped with an 8-Channel 8/10-Bit Analog to Digital Converter.  The AD8 Command Set converts a Voltage from 0 to 5 Volts DC into numeric value.  The AD8 Command Set supports 8-Bit Analog to Digital Conversion, which converts 0-5VDC to a numeric value from 0 to 255.  The AD8 Command Set also supports 10-Bit Analog to Digital Conversion, which converts 0-5VDC to a numeric value from 0 to 1023.

Since 10-Bit Values must be communicated using two bytes, the following formula must be used to reconstruct the 10-Bit Value:

10BitValue = (MSB*256)+LSB ‘Converts 2 Bytes into a Value from 0 to 1023

Reads the 8-Bit Analog Input of Channels

This command will read the Analog Input of Channels 1-8 and return an 8-bit value for each.

Send Bytes: Byte 1, Byte 2

Function: Command, Parameter (Channel 1-8)

Decimal Values: 254 150-157

Hex Values: 0xFE 0x96 – 0x9D

Receive Byte:

Decimal: 0-255

Hex: 0x00-0xFF

COMM Operator Examples

254 150 Read the Analog Input Channel 1 and Return a 8-Bit Value

254 156 Read the Analog Input Channel 7 and Return a 8-Bit Value

Reads the 10-Bit Analog Input of Channels

This command will read the Analog Input of Channels 1-8 and return a 10-bit value for each.

Send Bytes: Byte 1, Byte 2

Function: Command, Parameter (Channel 1-8)

Decimal Values: 254, 158-165

Hex Values 0xFE, 0x9E-0xA5

Receive Bytes:

Decimal: 0-255 (MSB), 0-255 (LSB)

Hex: 0x00 – 0xFF, 0x00-0xFF

COMM Operator Examples

254 158 Reads Analog Input Channel 1 and returns a 10-Bit Value

254 163 Reads Analog Input Channel 6 and returns a 10-Bit Value

Multi Channel 8-Bit

Reads all 8 Analog Input Channels and replies with 8 bytes indicating the 8-bit value of each Analog Input.

Send Bytes: Byte 1, Byte 2

Function: Command Returns AD1 – AD8

Decimal Values: 254, 166

Hex Values 0xFE, 0xA6

Receive Byte:

Decimal: 0-255 (AD1-AD8)

Hex: 0x00-0xFF

Multi Channel 10-Bit

Reads all 8 Analog Input Channels and replies with 16 bytes indicating the 10-bit value of each Analog Input.

Send Bytes: Byte 1, Byte 2

Function: Command Returns MSB AD1 – AD8 and LSB AD1 – AD8

Decimal Values: 254 167

Hex Values: 0xFE 0xA7

Receive Bytes:

Decimal: 0-255 (MSB), 0-255 (LSB)

Hex: 0x00 – 0xFF, 0x00-0xFF

Accessing Port 2 with Fusion Controller

Reads the 8-Bit Analog Input of Channels (Fusion Port 2)

This command will read the Analog Input of Channels 1-8 and return an 8-bit value for each.  This command example accesses Port 2 on the Fusion Series controllers if available.

Send Bytes: Byte 1, Byte 2, Byte 3

Function: Command, Parameter (Channel 1-8), Port 2

Decimal Values: 254, 150-157, 2

Hex Values: 0xFE, 0x96 – 0x9D, 0x02

Receive Byte:

Decimal: 0-255

Hex: 0x00-0xFF

COMM Operator Examples

254 150 2 Read the Analog Input Channel 1 and Return a 8-Bit Value

254 156 2 Read the Analog Input Channel 7 and Return a 8-Bit Value

Reads the 10-Bit Analog Input of Channels (Fusion Port 2)

This command will read the Analog Input of Channels 1-8 and return a 10-bit value for each.  This command example accesses Port 2 on the Fusion Series controllers if available.

Send Bytes: Byte 1, Byte 2, Byte 3

Function: Command, Parameter (Channel 1-8), Port 2

Decimal Values: 254, 158-165, 2

Hex Values 0xFE, 0x9E-0xA5, 0x02

Receive Bytes:

Decimal: 0-255 (MSB), 0-255 (LSB)

Hex: 0x00 – 0xFF, 0x00-0xFF

COMM Operator Examples

254 158 2 Reads Analog Input Channel 1 and returns a 10-Bit Value

254 163 2 Reads Analog Input Channel 6 and returns a 10-Bit Value

Multi Channel 8-Bit (Fusion Port 2)

Reads all 8 Analog Input Channels and replies with 8 bytes indicating the 8-bit value of each Analog Input.  This command example accesses Port 2 on the Fusion Series controllers if available.

Send Bytes: Byte 1, Byte 2, Byte 3

Function: Command, Returns AD1 – AD8, Port 2

Decimal Values: 254, 166, 2

Hex Values 0xFE, 0xA6, 0x02

Receive Byte:

Decimal: 0-255 (AD1-AD8)

Hex: 0x00-0xFF

Multi Channel 10-Bit (Fusion Port 2)

Reads all 8 Analog Input Channels and replies with 16 bytes indicating the 10-bit value of each Analog Input.  This command example accesses Port 2 on the Fusion Series controllers if available.

Send Bytes: Byte 1, Byte 2, Byte 3

Function: Command, Returns MSB AD1 – AD8 and LSB AD1 – AD8, Port 2

Decimal Values: 254, 167, 2

Hex Values: 0xFE, 0xA7, 0x02

Receive Bytes: Decimal: 0-255 (MSB), 0-255 (LSB)

Hex: 0x00 – 0xFF, 0x00-0xFF

AD8 Command Summary

Transmit 8-Bit A/D Command Description Receive
254 150 Reads Analog Input Channel 1 and Returns a 8-Bit Value 0-255
254 151 Reads Analog Input Channel 2 and Returns a 8-Bit Value 0-255
254 152 Reads Analog Input Channel 3 and Returns a 8-Bit Value 0-255
254 153 Reads Analog Input Channel 4 and Returns a 8-Bit Value 0-255
254 154 Reads Analog Input Channel 5 and Returns a 8-BIt Value 0-255
254 155 Reads Analog Input Channel 6 and Returns a 8-Bit Value 0-255
254 156 Reads Analog Input Channel 7 and Returns a 8-Bit Value 0-255
254 157 Reads Analog Input Channel 8 and Returns a 8-Bit Value 0-255
254 158 Reads Analog Input Channel 1 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 159 Reads Analog Input Channel 2 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 160 Reads Analog Input Channel 3 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 161 Reads Analog Input Channel 4 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 162 Reads Analog Input Channel 5 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSN)
254 163 Reads Analog Input Channel 6 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 164 Reads Analog Input Channel 7 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 165 Reads Analog Input Channel 8 and Returns a 10-Bit Value 0-255 (MSB)
0-255 (LSB)
254 166 Reads All 8 Analog Input Channels and Replies with 8 Bytes indicating the 8-Bit Value of each Analog Input 0-255 (AD1)
0-255 (AD2)
0-255 (AD3)
0-255 (AD4)
0-255 (AD5)
0-255 (AD6)
0-255 (AD7)
0-255 (AD8)
254 167 Reads All 8 Analog Input Channels and Replies with 16 Bytes indicating the 10-Bit Value of Each Analog Input 0-255 (MSB-AD1)
0-255 (LSM-AD1)
0-255 (MSB-AD2)
0-255 (LSB-AD2)
0-255 (MSB-AD3)
0-255 (LSB-AD3)
0-255 (MSB-AD4)
0-255 (LSB-AD4)
0-255 (MSB-AD5)
0-255 (LSB-AD5)
0-255 (MSB-AD6)
0-255 (LSB-AD6)
0-255 (MSB-AD7)
0-255 (LSB-AD7)
0-255 (MSB-AD8)
0-255 (LSB-AD8)
TX28-Bit A/D Command DescriptionMinMaxNotes
FE96Reads Analog Input Channel 1 (8-Bit)00FFReturns a 8-Bit Value
FE97Reads Analog Input Channel 2 (8-Bit)00FFReturns a 8-Bit Value
FE98Reads Analog Input Channel 3 (8-Bit)00FFReturns a 8-Bit Value
FE99Reads Analog Input Channel 4 (8-Bit)00FFReturns a 8-Bit Value
FE9AReads Analog Input Channel 5 (8-Bit)00FFReturns a 8-Bit Value
FE9BReads Analog Input Channel 6 (8-Bit)00FFReturns a 8-Bit Value
FE9CReads Analog Input Channel 7 (8-Bit)00FFReturns a 8-Bit Value
FE9DReads Analog Input Channel 8 (8-Bit)00FFReturns a 8-Bit Value
FE9EReads Analog Input Channel 1 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FE9FReads Analog Input Channel 2 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA0Reads Analog Input Channel 3 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA1Reads Analog Input Channel 4 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA2Reads Analog Input Channel 5 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA3Reads Analog Input Channel 6 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA4Reads Analog Input Channel 7 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA5Reads Analog Input Channel 8 (10-Bit)0003MSB Returns a 10-Bit Value
00FFLSB Returns a 10-Bit Value
FEA6Reads All 8 Analog Input Channels and Replies with 8 Bytes indicating the 8-Bit Value of each Analog Input00FFAD Channel 1
00FFAD Channel 2
00FFAD Channel 3
00FFAD Channel 4
00FFAD Channel 5
00FFAD Channel 6
00FFAD Channel 7
00FFAD Channel 8
FEA7Reads All 8 Analog Input Channels and Replies with 16 Bytes indicating the 10-Bit Value of Each Analog Input0003AD1 MSB 10-Bit Value
00FFAD1 LSB 10-Bit Value
AD Channel 20003AD2 MSB 10-Bit Value
00FFAD2 LSB 10-Bit Value
AD Channel 30003AD3 MSB 10-Bit Value
00FFAD3 LSB 10-Bit Value
AD Channel 40003AD4 MSB 10-Bit Value
00FFAD4 LSB 10-Bit Value
AD Channel 50003AD5 MSB 10-Bit Value
00FFAD5 LSB 10-Bit Value
AD Channel 60003AD6 MSB 10-Bit Value
00FFAD6 LSB 10-Bit Value
AD Channel 70003AD7 MSB 10-Bit Value
00FFAD7 LSB 10-Bit Value
AD Channel 80003AD8 MSB 10-Bit Value
00FFAD8 LSB 10-Bit Value

Troubleshooting

NCD Base Station Software

Use the ‘AD8 Quality Control and Diagnostics’ to help identify problems with the controller.

To “PASS” input Channels 1 through 8, make sure the Up/Down Jumper is in the UP Position, and connect each input individually to ground.  As the input goes low, the FAIL will turn to PASS.