SPLat Logo

HD8: Bidirectional points used as inputs

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

HD8: Bidirectional points used as inputs

HD8_DIs.jpg

The above picture shows the two of the four bidirectional digital I/O pins used with a couple of typical input devices. An input is deemed to be on when the I/O pin is connected to 0V through a contact or an NPN sensor.

The digital I/O connector contains the connections for 4 inputs, plus pins that connect onboard to the power supply positive and common/0V terminals. The common pin on each input connector is provided as a convenience to you when wiring inputs to the board.

To program the point as an input simply never turn on the corresponding output (it defaults to off at power up). If your program does turn on the output, then as an input it will read ON.

In the picture A is a simple switch connected to I/O point 0. B is the output of an NPN style sensor connected to input 3. The sensor would also require a positive supply voltage to power it. See the manufacturer's data for connection details of the sensor you are using. The terminal labeled with a minus sign above will be the manufacturer's designated negative or common terminal, and the "O" terminal will be the designated output terminal of the sensor.

As an input the bidirectional pins are ON when the pin is connected to 0V (Gnd). Under that condition a (positive) current flows out of the input pin, through the external circuit, to 0V. The magnitude of that current depends on the supply voltage. Assuming a dead short between the input pin and 0V, the current is given by the equation

I(in) = - V(supply) / 10000

The leading minus sign simply means the current is flowing out of the pin. The 10000 represents the 10K input pullup resistance.

This equation translates to 1.2mA with a 12V supply and 2.4mA with a 24V supply. This is low enough to be compatible with all off-the-shelf NPN style sensors. The inputs are not compatible with PNP style sensors.

Take care when driving the inputs from switch or relay contacts. The problem is "contact wetting" (or a lack of it) and due not to too much current but to too little current. You should select contacts that are designed for low level switching. There is an article about this here.

You should also be aware that the board will only recognise the input as ON when the voltage on the input pin is typically less than 4.6V (3V worst case). That means the input needs to be a "fairly solid" connection to 0V.

A word of caution: In practice the threshold voltage of the input is approximately 4.6V or a little less. However, due to tolerances (variations) between batches of components an input is guaranteed to be treated as low (in our case ON) only if the voltage is below 3V. An input is guaranteed to be treated as high (OFF) only if the voltage is above 7V. The range between 3V and 7V is a "no man's land" where behaviour is not guaranteed. That means that you may determine experimentally that something works OK on a prototype, but that gives you no right to assume it will therefore work on all future units.

Note that the above threshold voltages vary from product to product. Please check the specific documentation on the board(s) you are using.

How to blow up the bidirectional I/O points when used as inputs.

  1. Apply a voltage more negative than the 0V (common) terminal.
  2. Apply a voltage over +32V