> 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/water-insight/tank-level-monitor/pump-control.md).

# Control a pump from the tank level

Start and stop a pump from the tank level, with a relay in the TLM or a relay output on the INC.

TLM with Pump Control measures the water level in a tank and then decides whether a pump should be turned on to refill the tank and operate a relay which can be used to turn the pump on. It decides when to turn the pump on when the water level falls below a threshold (the low setpoint) and turn the pump when it rises above another threshold (the high setpoint). TLM pump control is autonomous, not reliant on the communications link to decide when to turn on and off a pump based on the water level.

{% hint style="info" %}
**Applies to:** TLM firmware V1.02 (pump control introduced). Existing units can be firmware upgraded to V1.02, which will provide support for Pump and Setpoint Control. Field upgrades can be undertaken by QTech trained technicians and Integrators familiar with installing the product. From application note AN64 (Rev 01). V1.02 of the TLM pump control firmware does not support manual switch control at the TLM.
{% 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 %}

## Choose where the relay is

| Pump is                 | How it works                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Near the tank           | The TLM measures tanks levels and operates a pump autonomously according to the water level. When the pump is located near to the TLM, a dedicated relay in the TLM will operate the normally open (NO) contacts according to the high and low level setpoints that are programmed into the TLM.                                                                                                                           |
| Near the INC            | If the pump system is located near the INC then the TLM will report levels to IMS which will in turn use the setpoint levels in IMS to determine whether to turn the pump on. A message will be sent to the INC to actuate an associated relay output on the INC and close its contacts when the pump is to be turned on. The relay can be one of 6 that are provided by the INC and the association is configured in IMS. |
| In a separate pump shed | If the pump system is located neither near the Tank or the INC then a [WP2P](https://help.qtech.co.nz/qtech/wireless-remote-control.md) can be used to connect the relay output at the INC to a corresponding output from the WP2P located in the pump shed. Operation is the same as for a pump located at the INC.                                                                                                       |

## How it decides

* When the level falls below the Setpoint – Low Level the Relay contacts will close.
* When the level rises above the Setpoint – High Level the Relay contacts will open.
* If the level reaches the Top Water Level (Maximum Fill Line) the relay contacts will open, irrespective of their current state.
* If pump control is disabled then the TLM relay does not operate and the manual switch is ignored. The water level, setpoint levels and relay state are still reported to IMS.

Default factory setpoints of 20% (low) and 80% (high) can be adjusted. These setpoints can be modified via IMS.

Additional INC and IMS logic: If a level reading from the TLM falls outside an acceptable range the INC relay will deactivate. If a regular message (reporting the level) is not received by the gateway after 5 contiguous expected messages, then the INC relay will deactivate. For example, if the reporting interval is 20 mins from the TLM then the alarm event occurs after 100 minutes without reception.

## Fit the cable at the TLM

After upgrading the firmware in the TLM, the installation steps are:

1. Drill the hole for the pump cable gland.
2. Fit the gland.
3. Fit the cable and terminate the connection on the TLM board relay output connector.
4. Terminate the pump cable at the pump control system.
5. Check that the switch closure is detected at the pump control system, modify the pump control system to accept a new run/stop input.

## Turn it on in IMS

1. Three new icons are shown on the top left of the graphic: the top icon indicates if the relay state (pump run state) on the TLM (green means activated), the middle icon indicates the state of the manual switch (green means on), and the bottom icon indicates if automatic pump control is enabled (green means enabled). Clicking on the graphic will show the Tank Card for the TLM sensor.
2. Clicking on the **Pump Control** tab heading opens the dialogue for configuring the TLM for pump control.
3. Enabling automatic pump control allows the TLM to manage the relay and input switch on the TLM to measure the water level, compare it to the setpoints and activate the relay according to the pump run logic.
4. The setpoints are adjusted by dragging the endpoints to the desired levels. The offset at the bottom (2% in this example) represents the distance of the water level probe to the bottom of the tank.

A new feature includes communications quality which shows success rate of the last 100 messages being received based on the expected reporting interval.

## Link an INC relay to the TLM

1. To associate a relay to a TLM sensor click the pencil icon to the above right of the I/O dashboard card.
2. The output (relay) can be given a label name (e.g. Pump).
3. Clicking on the link icon button to the right of the relay will enable a switch to enable linking the relay to a sensor. The sensor name is selected from the drop-down combo box and a setting for the manual operating time limit can be entered.
4. Typically, this defaults to about 20 minutes but depends on the fill rate and should be adjusted by the installer determined by the time to fill between the upper set point and the maximum fill line.

A relay that is being controlled by IMS is indicated by a "link" icon. If a relay is controlled by IMS but is manually overridden to drive the relay on (or off) then an additional "hand" icon is show to indicate that the current automatic control of the relay is being manually overridden. The state of the relay outputs can be shown in a headline at the top of the IMS dashboard. Double clicking on the headline graphic will show buttons that can be used to select an output and manually turn it on or off.

## Alerts

Alert notifications are set using IMS context menu (three vertical dots icon in the top right corner of the IMS web page). Select the **Manage Alerts** menu option. The following alerts can be created:

* If internet connection is lost to the TLM sensor Gateway
* If the tank level changes (by how much)
* If the tank level is greater than 100% (the maximum fill line)
* If the TLM configuration (such as a setpoint level) is changed
