> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-telemetry/expansion-modules/q23/install-and-set-up.md).

# Install and set up

Set the Q23's address, wire its power, inputs and outputs, connect it to the RTU, and add it in Workbench.

To install a Q23, set its address on the DIP switches inside the case, mount it on the DIN rail, wire the power and I/O, then connect its RS485 port to the RTU and add the module to the RTU's configuration.

{% hint style="info" %}
**Applies to:** Q23 Analogue and Digital Expansion Module (PD7201), up to Rev A boards. From the Q23 Owners Manual v1.02 and Quick Start Guide v2.0.
{% endhint %}

{% hint style="danger" %}
**Warning:** Do not directly connect to 220V AC voltage. The New Zealand and Australian wiring regulations require that any wiring in excess of 32 volts must be carried out or be certified by a registered electrician. Consult your local electrical installer for further guidance.
{% endhint %}

## Before you start

* The power should be removed from the module by removing the power connector before setting up and making any adjustments to the module.
* The Q23 Module incorporates static discharge sensitive devices. Normal Anti Static Discharge precautions should be employed when setting up and making any adjustments to the module. An anti-static wristband should be worn and the earth connection of this wristband should be connected to the terminal marked ‘EARTH’ on the Q23 Module before any adjustments are made.

![Q23 board layout, viewed with the front panel to the right](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FXj7zN3bQCyJs1WumbXFL%2Fq23-board-layout.png?alt=media)

## Factory settings

| Setting           | Factory setting                                     |
| ----------------- | --------------------------------------------------- |
| Module address    | 3 (as configured by the internal dipswitch setting) |
| RS485 baud rate   | 9600                                                |
| Analogue channels | All 4–20 mA inputs                                  |

## 1. Set the module address

Each module in a network must have a unique module address. This address can be any number in the range 1…239. If multiple expansion modules are to be used on the same RS485 bus then their addresses must be configured.

* The module addresses 0 and 240 to 255 are reserved addresses and should not be used.
* Module address 255 is used to re-load the factory default configuration settings.

An 8 position DIP switch is located on the middle left hand side of the Q23 Module as viewed with the front panel to the right. The code for address is a binary code with switch 1 being the least significant bit. This means that each switch has a numeric value associated with it, and the resultant address is calculated when you add all the switch values that are in the “ON” state.

| Switch | 1 | 2 | 3 | 4 | 5  | 6  | 7  | 8   |
| ------ | - | - | - | - | -- | -- | -- | --- |
| Value  | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |

For example, if a module needs an address of 22, the correct setting would be to have switches 2, 3 and 5 on and the rest off. (2+4+16 = 22).

Use a ball pen or small screw driver blade to set the DIP switches. Ensure that the DIP switch is positioned at the end of its travel when setting the switches.

## 2. Connect the power

![Q23 bottom panel: RS485 OUT and IN, AUX OUT (digital outputs 5–8), and the PWR connector G, + and C](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2F5b4iba3MWXrNDB89i10L%2Fexpansion-module-bottom-panel.jpg?alt=media)

The power connector is located on the bottom panel of the Q23 Module and is labelled ‘PWR’.

| Terminal | Connect to                                                        |
| -------- | ----------------------------------------------------------------- |
| G        | Ground, the negative lead of the power supply                     |
| +        | The positive lead of the power supply, nominally 12 or 24 volt DC |
| C        | Option for remote power control from a master RTU                 |

{% hint style="warning" %}
The “C” terminal is a control INPUT. Do not connect it to the supply.
{% endhint %}

* The DC power supply to the Q23 Module must be adequately smoothed and be free from noise and voltage transients. Where the DC supply is derived from the AC mains, or batteries with an associated AC mains battery charger these devices must comply with the relevant electrical regulations.
* The Q23 Module draws approximately 80mA at 12 volts and 60mA at 24 volts power supply input voltages.
* The Q23 Module has a 2 amp fuse to protect the unit under fault conditions or when reversed polarity or over-voltage power supplies are connected to the module. The fuse is a plug-in 2 amp TE5 fuse located at the lower right side of the Q23 Module as viewed with the front display panel to the right.

### Remote power control

With power applied to the module, applying a voltage in excess of 10 volts to the remote power control line will power up the Q23 Module. QTech Q23 and Q26 expansion modules use the “C” input connected to the O/P output on the RTU to detect and power down if the signal is deactivated (low). In the event of the main power supply failing and the battery becoming discharged the Q23 Module can be configured to turn OFF in harmony with the master device. This facility protects the Q23 Module against unpredictable operation as the supply voltage sags.

Jumper J23 is used to override the Q23 Module’s power control function. When J23 is installed power is permanently applied to the Q23 Module. See [Jumper settings](https://help.qtech.co.nz/datran/datran-telemetry/expansion-modules/q23/jumper-settings.md).

The ‘+’ switched positive output is also present on the ‘+’ connectors of the ‘ANALOG I/O’, ‘DIGITAL OUT’ and ‘AUX OUT’ connectors. This ensures that attached peripheral devices also power down during remote power control shut down and therefore do not ‘back feed’ power to the Q23 Module.

## 3. Wire the inputs and outputs

For wiring diagrams, see [Install and wire](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/install-and-wire.md) on the XL4 Plus pages.

### Digital inputs

* The Q23 Module has 8 digital input channels. These are available at a 9 way connector labelled ‘DIGITAL IN’ on the front panel of the Q23 Module. The digital input channels are numbered 1 to 8. The terminal labelled ‘G’ is a system ground connection.
* A digital input channel is in the ON state when the corresponding input terminal on the digital inputs connector is grounded, i.e. connected to the ‘G’ terminal on the digital inputs connector. The digital input channel’s associated green status LED will be ON.
* A digital input channel is in the OFF state when the corresponding input terminal on the digital inputs connector is open circuit or at the supply voltage potential. The digital input channel’s associated green status LED will be OFF.
* The input voltage to any digital input should not be allowed to go above the module's power supply voltage.
* The digital input channels are sampled every 100mS by the processor therefore a given channel’s input state must be maintained for at least 100mS for the state to be recognized.
* Digital input channel No’s. 1, 2 & 3 can be configured for use as high speed pulse counting and accumulation channels. Please contact QTech Data Systems Limited for application specific details.
* A minimum of 1mA must flow through the opto isolator’s LED to ensure reliable switching. This represents a maximum external switching device resistance of 5K with a module supply voltage of 12 volts and 10k with a module supply voltage of 24 volts.

### Digital outputs

* Digital output channels 1 to 4 are available at a 6 way connector labelled ‘DIGITAL OUT’ on the front panel of the Q23 Module and have associated yellow LEDs that turn on when that channel is in the ON state. Digital output channels 5 to 8 are available at a 6 way connector labelled ‘AUX OUT’ on the bottom panel of the Q23 Module and do not have status LED indicators.
* In the ON state a digital output channel is switched to ground. In the OFF state a digital output channel is open circuited.
* The digital output channels are capable of switching 1 amp at up to 26.5 volts. The total digital switching current is limited to approximately 1.5 amps by the Q23 Module internal 2 amp fuse.
* The output voltage is clamped at 65 volts during inductive switching eliminating the need for reversed biased diodes across inductive loads.
* The ‘+’ switched positive output connector on the ‘DIGITAL OUT’ connector should be used as the positive supply line to relays and similar devices connected to the digital outputs. This ensures that these devices also shut down during low battery shut down and therefore do not ‘back feed’ power to the Q23 Module. Relays and other control devices should be wired with consideration that their attached loads will be OFF or in a safe state when the relay or controlling device is de-energised. This is the failsafe condition.

### Analogue inputs and outputs

* The Q23 Module has 6 Analog channels, available at a 9 way connector labelled ‘ANALOG I/O’ on the front panel of the Q23 Module. Each Analog channel has an associated yellow status LED to show the state of the Analog channel. Analog channels 5 & 6 can be configured individually as either input or output channels.
* Set each channel's range with jumpers: see [Jumper settings](https://help.qtech.co.nz/datran/datran-telemetry/expansion-modules/q23/jumper-settings.md). When an Analog channel is to be configured for 4 to 20mA input, configure the channel’s jumpers for 0 to 20mA input, then use the Online Diagnostics & Configuration program to configure the channels as 4 to 20mA.
* In any Analog input configuration the input voltage to any Analog input channel should not be allowed to go above 15 volts positive, or below 0 volts, i.e. negative.
* It is important to make sure that any device is rated to operate at the voltage that will be available to it taking into account that the Analog Input will drop 5 V across it at 20 mA loop current. For example: If the system is being powered from 13.7 VDC, the analog transducer will only have a maximum of 8.7 volts available to it for its power supply.
* As with any Analog measurement system, care must be taken in earthing of equipment to prevent earth loops. Use the ‘G’ connector on the ‘ANALOG I/O’ connector for all Analog ground signal return paths.

## 4. Connect the RS485 port

The RS485 serial port connector is a 4 way RJ10 connector. In a standard application of the Q23 Module the RS485 serial port operates at 9600/19200 baud, for 2-wire RS485.

| RJ10 pin | Function      |
| -------- | ------------- |
| 1        | Not connected |
| 2        | 485+          |
| 3        | 485–          |
| 4        | Not connected |

* The XL4 and XL4 Plus RS485 port is an RJ12 connector, identified by having 6 contacts. Ensure that the 6 contact RJ12 is plugged into the XL4 RTU. Do not attempt to insert the 4 contact RJ10 into the RTU, this must be inserted in the expansion module (Q23/Q26 etc).
* Standard 4 way RJ10 crimp plugs are used in making up RS485 serial port interconnection cables. These plugs are designed for use with stranded (24/26 AWG) 2/4 core twisted pair data cable. The cable used should have a characteristic impedance of approximately 120 ohms. An RJ10 crimping tool must be used to crimp the RJ10 plugs onto the data cable to ensure proper and reliable crimping.
* The RS485 serial port can be extended up to a maximum distance of approximately 1000 meters with appropriate cable and installation. It can operate in a multi-drop configuration allowing a maximum of 32 devices to be connected to the RS485 line.
* In RS485 applications, especially over long lines, the RS485 transceivers at either end of the line should be terminated with a 120-ohm load. In multi-drop RS485 applications only the far end RS485 transceivers should be terminated. Jumper J24 provides the 120 ohm termination: see [Jumper settings](https://help.qtech.co.nz/datran/datran-telemetry/expansion-modules/q23/jumper-settings.md).

## 5. Add it to the RTU

* **XL4 Plus:** using Workbench, add the Q23 expansion module. Expansion modules can be added by right clicking the Expansion Modules category. Check the enabled checkbox on the expansion modules form to enable IPB communications and choose rs485 as the communication port. See [Communications: Expansion modules](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/communications.md#expansion-modules).
* **XL4:** Expansion modules are added to the XL4 configuration by simply clicking the “Add Module” button at the bottom of the screen under the Input/Output branch of Workbench.
* **eXcel:** use the Q90 software.

For a site consisting of an XL4 RTU with a Q23 expansion module, the RTU native digital inputs #1 to #8 are RDI 1 to RDI 8 and the Q23 expansion module digital inputs #1 to #8 are RDI 9 to RDI 16.

## RS232 port

The RS232 serial port is used for on-line configuration, diagnostics and data exchange. The RS232 serial port connector is an 8 way RJ45 connector located on the upper left edge of the Q23 Module as viewed with the front panel display to the right. The upper panel cover of the Q23 Module case must be removed to access the RS232 connector. The default configuration for the RS232 serial port is half duplex, 19,200 baud, 8 bits, no parity, 1 stop bit. The RS232 serial port can be extended up to a maximum of 15 metres. Beyond this distance communications can be unreliable.

| RJ45 pin | Function       |
| -------- | -------------- |
| 1        | Not connected  |
| 2        | RTS            |
| 3        | CTS            |
| 4        | Ground         |
| 5        | RXD (data in)  |
| 6        | TXD (data out) |
| 7        | Not connected  |
| 8        | Ground         |

The RS232 Clear to Send (CTS) and Request to Send (RTS) signal lines must be bridged at the Data Terminal Equipment for the RS232 port to be enabled.

### Expansion over radio

The Q23 module can be connected to a remote master module using a data radio rather than I.P.B. RS485 direct connected wires. The Tait ORCA ELAN is a suitable data radio. The ORCA ELAN communicates at 1200 baud in a checksum validated packet protocol and is connected to the Q23 module’s RS232 RJ45 connector. When using Radio I.P.B. Communications the module address must be set to a number in the range 240…249. Q23 and Q26 Expansion modules can also be linked back to back separated by (QTech Data Radio, QDR) radio links: see [QDR 900MHz Digital Radio](https://help.qtech.co.nz/datran/datran-telemetry/radios/qdr-900mhz-digital-radio.md).

## Reset switch

The Q23 Module has a reset switch located internally on the Printed Circuit Board. This reset button can be used to globally reset the Q23 Module. A global reset will reset many of the hardware peripherals in the module and also re-initialise the application software thus putting the Q23 Module into a known state. Under normal operating conditions the global reset is not used.
