OSPIT Power Output Port Documentation

The OSPIT provides four manually or software-controlled general-purpose power output ports.

These outputs can be used to control irrigation valves, water pumps, or other DC-powered equipment such as USB power sockets, if compatible with 11–14.7 V DC input, or general 12 V devices.

Although the outputs are versatile, the OSPIT was primarily designed as an automated plant irrigation controller. In its intended configuration, the system can independently irrigate up to four separate plant sections using:

Using Solenoid Valves

When using four solenoid water valves, the system requires a water source with sufficient pressure.

The water should also be reasonably clean. Contaminants such as sand, algae, or plant debris may clog the valves or prevent them from sealing properly, which can cause leakage even when the valves are closed.

If a single central water pump is used to provide pressure for the entire irrigation system, it should be connected to the output labelled:

Pump+ / Pump-

The remaining outputs labelled:

can then be used to control the water flow through individual solenoid valves.

Soil Moisture Sensor System

The irrigation software monitors soil conditions using humidity sensors connected via a Modbus-RTU bus.

The Modbus-RTU interface uses four wires:

Up to 35 sensors can be connected to the same bus, and the total cable length may be up to 1200 meters under suitable conditions.

Each sensor requires a unique Modbus node ID. Duplicate IDs on the same bus will cause communication conflicts.

The OSPIT sequentially scans the Modbus-RTU bus for sensor node IDs 1 through 4. Each sensor ID is mapped directly to an irrigation output port:

Sensor Node ID Controlled Output
ID #1 Valve 1
ID #2 Valve 2
ID #3 Valve 3
ID #4 Pump / Valve 4

For example, if the OSPIT detects a sensor with node ID #1, it controls the output labelled Valve 1 and irrigates plant section 1 during the configured irrigation hour, i_hr.

The output remains active until at least one of the following conditions is met:

The same logic applies to sensor IDs #2, #3, and #4.

Irrigation is performed sequentially from section 1 to section 4.

Sections without matching sensor data are ignored and will not be irrigated.

Sensor Configuration

New DFRobot soil moisture sensors are typically shipped with Modbus node ID #1 from the factory.

The OSPIT Modbus-RTU interface operates at:

9600 baud

The sensors must be configured to use the same baud rate.

The OSPIT has been tested with Modbus soil moisture sensors from DFRobot.

Changing Sensor Node IDs

A command-line utility is included with the OSPIT firmware for changing the node IDs of compatible DFRobot sensors:

modb-set-nodeid.lua
Advanced users only: This procedure requires access to the OSPIT command console using the Telnet protocol over WiFi. Incorrect Modbus configuration can easily cause communication problems, so proceed carefully.

Step 1 — Connect to the OSPIT WiFi

By default, the OSPIT creates a local WiFi access point:

Step 2 — Connect via Telnet

Connect to the OSPIT using a Telnet client.

Login credentials:

Step 3 — Start the Configuration Tool

Enter the following command:

dofile("modb-set-nodeid.lua")

When started without parameters, the program displays usage instructions:

> dofile("modb-set-nodeid.lua")

MB_OLD_ID missing!
MB_NEW_ID missing!

USAGE:
Set old and new global node-id variables for the RTU-Modbus
before running this script.

Example:

MB_OLD_ID=1
MB_NEW_ID=2
dofile("modb-set-nodeid.lua")

MAKE SURE ONLY ONE MODBUS SENSOR IS CONNECTED
TO THE BUS WHILE DOING THIS,
OR BE PREPARED FOR TROUBLESHOOTING!

For example, to change a sensor from node ID #1 to node ID #2:

MB_OLD_ID=1
MB_NEW_ID=2
dofile("modb-set-nodeid.lua")
Only one unconfigured sensor should be connected to the Modbus bus while changing node IDs. Otherwise, multiple sensors may respond simultaneously and create communication conflicts.