local help_page = [[Local OSPIT Manual Page

Status page

Local OSPIT Manual Page

The Open Solar Powered Irrigation Tool (OSPIT) is an open-source, community-focused irrigation solution documented for small-to-medium scale agriculture using solar energy.

System components: OSPIT is powered by a small photovoltaic solar panel and a 12 V DC battery, such as lead AGM or LiFePO4. It can control water pumps or valves for drip irrigation.

Irrigation mechanism: The system can work with water tanks at bed level, but may also be adapted for gravity-fed irrigation if the tank is elevated.

Documentation access:

OSPIT Power Output Ports

The OSPIT provides 4 general-purpose 12 Volt DC 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 4 separate plant sections using up to 4 water pumps or solenoid valves and up to 4 soil moisture sensors.

Using Solenoid Valves

When using 4 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 Valve 1, Valve 2, and Valve 3 can then be used to control 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:

Each sensor needs 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 IDControlled Output
ID #1Valve 1
ID #2Valve 2
ID #3Valve 3
ID #4Pump / Valve 4

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 will not be irrigated.

Sensor Configuration

New sensors are shipped with Modbus node ID #1.

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:

The utility can be accessed through the OSPIT command console.

Step 1 - Connect to the OSPIT using a Telnet client.

Step 2 - Configuration

Enter the following command to change a new 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 while changing node IDs.

]] return function(conn) send_response(help_page) end