SPLat Logo

SL100: External analog input

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

SL100: External analog input

SL99 Analog connector

The picture above shows the connector used for analog inputs and outputs, and the associated configuration jumpers.

There is one analog input channel on the SL100 board. It can be configured to operate on 0-5V, 0-10V, 0-20mA or as a temperature measuring input (using an external thermistor sensor). In all cases the input uses one input pin and one common pin. The common pins on the analog connector are tied to the board's 0V terminal. Please see the article on common terminology for an explanation of the 0V terminal.

The analog input is designated as analog A in AnIn instructions or 0 in fAnIn instructions. It has a 4-pin configuration jumper field. A single jumper (shunt) on a pair of jumper pins selects the operating mode (V=voltage, I=current or T=temperature).

Using voltage mode

To use an analog input in voltage mode you can either

and apply the input voltage between the input (positive) and the common (most negative). When the AnInA instruction is executed you will get a number between 0 and 255 in the X-register. 0 represents 0 input and 255 represents full scale.

From dialect 18 you can also use the fAnIn instruction. This will return a normalized floating point number in W which ranges from 0 at 0V in to 1.000 at full scale in. The range 0 to 1.0 is divided into 1023 steps of 0.00097752. fAnIn selects the required channel with a numeric argument, 0, for input A. The channel number is jndexed.

In voltage mode the input resistance is 200KOhm. The accuracy is about 1.5% of full scale and resolution is 10-bit (0.1% of full scale). There is an input noise filter comprising a single RC time constant of 5mS.

If you leave the jumper out, you will get a 0-5V range instead of 0-10V.

Using current mode

To use the analog input in current mode you set its jumper to bridge the two pins either side of the letter I. You then feed the current to be measured into the input pin, with the return out of the common pin. The current source (e.g. 4-20mA transmitter) must be of the type that sources a positive current from its output pin and sinks (returns) the current into its ground (or minus out) pin. Most 4-20mA transmitters are "line powered" and have a simple 2-wire connection. Connect the positive pin of the transmitter to the positive supply voltage and the negative pin to the SPLat input pin.

Some 4-20mA devices are non-loop powered. These have 3 connection wires: Positive supply, ground/negative supply and output. To connect such a device to the SPLat provide it power to its positive and ground pins, connect its ground pin to the SPLat 0V and its output to the SPLat analog input.

When the AnInA instruction is executed, you will get a number between 0 and 255 in the X-register. 0 represents 0mA and 255 represents 20mA. At 4mA you will get a reading of 51 (plus or minus any conversion error). You can also use fAnIN, which will return 0 for 0mA, 1.0 for 20mA and 0.2 for 4mA (plus or minus any conversion error).

In current mode the input resistance is 250Ohms. The accuracy is about 1.5% of full scale and resolution is 10-bit (0.1% of full scale). There is an input noise filter comprising a single RC time constant of 10mS.

Using thermistor mode

To use the analog input in temperature mode you set its jumper to bridge the two pins either side of the letter T and connect a suitable thermistor between the analog input pin and common. There are two basic types of thermistor: Positive Temperature Coefficient (PTC) and Negative Temperature Coefficient (NTC). The latter, NTC, is the type used for temperature measurement with SPLat. Typically, an NTC thermistor is specified as having a certain resistance at 25 degrees C.

The adjacent diagram shows the thermistor measuring circuit.

MMii99 thermistor circuit

The thermistor is the bottom resistor in a voltage divider. The top resistor is a fixed onboard 10.25KOhm resistor. The voltage divider is driven by a programmable voltage that appears as analog output 6. This is an "onboard output" that is used for thermistor drive and is also available on the SPice connector, but does not "use up" the externally available analog output. The thermistor drive voltage can be set to anything between 0V and 20V. Note that the board supply voltage must be at least 2V greater than the intended drive voltage. The drive voltage is programmed using an fAnOut 6 instruction. With W=0 this will result in 0V out, with W=1 it will result in 20V out.

In this thermistor mode the full scale analog input voltage is 5V.

A thermistor is an electronic component that changes resistance with temperature. Don't confuse this with an RTD sensor, which also changes resistance with temperature but is much less sensitive! The warmer an NTC thermistor gets, the lower its resistance. Hence, a reading of the input voltage can be used to calculate the thermistor temperature.

Accuracy and resolution depend on the thermistor you use and how you program it. The best achievable figures are about 0.05°C for both, if the system includes provision for software calibration. The SPLat Knowledge Base contains a tutorial on thermistor temperature measurement using SPLat boards. As a first approximation, when shopping for a thermistor for your application, shoot for one with a resistance of 10KOhm in the middle of the temperature range you need to cover.

How to blow up the analog input

Here are some ways of blowing up the analog inputs:

  1. In any mode, connect the input to a voltage greater than the positive supply or negative with respect to the 0V terminal.

In current mode, apply more than 7.5V to the input. This will overheat the current shunt resistor and lead to loss of accuracy or, in the extreme, damage the board.