Configuring PLC Greenhouse Climate and Remote Control

David Krause7 min read
Application NoteOther ManufacturerProcess Control
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Use an autonomous PLC to control ventilation, humidification, lighting, and irrigation; use the operator panel or network workstation only for supervision, setpoint entry, mode selection, and manual commands. Because the same fan handles both temperature and humidity reduction, combine those demands in one arbitration block and inhibit humidification while ventilation is active. Select the controller, I/O modules, and operator interface only after documenting sensor signal types, actuator electrical loads, communication distance, and required behavior after power or network loss.

Symptom interpretation

The term here means a small propagation and cloning compartment measuring 2.0 × 0.9 × 1.2, with one temperature sensor, one humidity sensor, ventilation, humidification, lighting, and irrigation. Temperature control can request ventilation only. Humidity control can request the humidifier to raise humidity or ventilation to lower it because the surrounding greenhouse air is expected to be drier.

Observed symptom Likely mechanism Decisive check
Temperature remains high with the fan running Ventilation cannot cool below the temperature of the replacement air, apart from transient evaporative effects. Compare compartment and intake-air temperatures while recording fan status.
Humidity falls whenever temperature control operates The temperature loop and high-humidity loop share the same fan output. Trend temperature, relative humidity, and ventilation demand on one time axis.
Humidifier and fan cycle repeatedly Independent output logic is fighting over the same air volume, or the deadbands are too narrow. Display both internal demands, not just the physical output states.
Relative humidity changes after a temperature change Relative humidity depends on both water-vapor content and air temperature. Compare the humidity transition with the temperature transition before treating it as a sensor fault.
Lighting or irrigation occurs at the wrong time The controller clock, schedule, time zone, restart policy, or retained data is wrong. Read the controller clock and inspect the timer state before and after a restart.

Control mechanism

Ventilation is a shared actuator. A temperature-high condition and a humidity-high condition both request the fan, so the physical command is their logical OR. A humidity-low condition requests humidification, but simultaneous ventilation would immediately remove added moisture. Give ventilation priority unless the process specification defines another sequence.

VentRequest := TemperatureHigh OR HumidityHigh;
HumidifierRequest := HumidityLow AND NOT VentRequest;
FanOutput := AutoMode AND VentRequest;
HumidifierOutput := AutoMode AND HumidifierRequest;

Each analog loop needs separate ON and OFF thresholds, commonly called a deadband. Without deadband, measurement noise around a setpoint causes relay chatter and short actuator cycles. Configure the thresholds from process tolerance, sensor accuracy, actuator response, and observed compartment lag; no fixed value can be selected from compartment dimensions alone.

Lighting and irrigation are sequential controls rather than feedback loops. Lighting normally uses an ON schedule and an OFF schedule. Irrigation additionally needs an explicit run duration, permissible time window, manual-stop path, and power-recovery policy. The requested design supplies no flow or soil-moisture feedback, so an irrigation output proves only that a command was issued, not that water reached the plants.

Architecture selection

Architecture Required equipment classes Operational consequence
Local operator panel PLC, compatible sensor input channels, actuator outputs or interposing devices, operator panel, and a supported PLC-to-panel link Local viewing and setpoint changes remain available without the supervisory network.
Network-only supervision Ethernet-capable PLC or gateway, compatible I/O, supervisory software or a controller-hosted interface, network infrastructure, and a secured remote-access boundary A workstation, tablet, or browser replaces the panel, but loss of the network must not stop automatic control.
Hybrid arrangement Local PLC and panel plus network supervision Provides local operation and remote visibility at the cost of another interface to configure and maintain.

Controller selection depends on the actual sensor outputs and actuator count. Record whether each sensor is resistive, voltage, current, digital, or connected through a transmitter. Record each load voltage, current, switching frequency, and fail-safe state before choosing relay or transistor outputs. Use contactors, solid-state interfaces, or protective devices where the field load exceeds the PLC output rating shown in its datasheet.

Treat the camera as a separate IP endpoint. A supervisory client may present video beside process values, but camera transport must not share control authority. The PLC must continue climate and timer execution if the camera, workstation, Internet connection, or supervisory application fails.

Configuration procedure

  1. Create an I/O schedule containing the temperature sensor, humidity sensor, fan, humidifier, light, and irrigation valve or pump. Add signal type, range, engineering units, electrical rating, normal state, failed state, and terminal assignment for every point.
  2. Write the operating sequence before selecting hardware. Define automatic, manual, and off modes; temperature-high and humidity-high fan requests; humidity-low humidifier requests; timer behavior; alarm conditions; and authority for local versus remote commands.
  3. Scale each analog input into engineering units. Add separate detection for an open circuit, short circuit, out-of-range value, or stale network value when the selected input hardware exposes those diagnostics. A failed sensor must not silently become a believable process value.
  4. Implement deadbands and minimum practical cycling behavior from actuator documentation and commissioning trends. Keep setpoint entry limits in the controller so an HMI or network client cannot write an invalid operating value.
  5. Arbitrate the shared fan demand in one program block. Inhibit the humidifier during ventilation unless testing demonstrates that simultaneous operation is required by the approved process sequence.
  6. Configure lighting and irrigation from the PLC clock. Define what happens after a clock correction or power interruption: resume the active interval, skip it, or execute a controlled recovery. Prevent a restart from creating an unintended duplicate watering cycle.
  7. Build the interface around process decisions: live values, setpoints, output commands, actual feedback where installed, automatic/manual state, active demand, alarms, clock, communication health, and schedule status. Log user changes separately from automatic commands.
  8. For remote access, place authentication and encrypted access at the network boundary. Do not expose raw PLC programming or control services directly to the Internet. Assign write permission only to authorized operating functions.

Verification checks

  1. Check 1: analog input comparison. Expect each displayed temperature and humidity value to agree with a traceable reference within the installed sensor-and-input accuracy. Test the low, middle, and high portions of each configured range.
  2. Check 2: output mapping. Command each output individually under controlled conditions. Expect only the documented fan, humidifier, light, or irrigation device to change state, and confirm that the displayed command matches the physical result.
  3. Check 3: threshold response. Move each simulated or controlled input across both sides of its deadband. Expect one transition at the ON threshold and the reverse transition at the OFF threshold, with no chatter between them.
  4. Check 4: shared-demand arbitration. Apply simultaneous temperature-high and humidity-low conditions. Expect ventilation to run and humidification to remain inhibited under the proposed priority rule.
  5. Check 5: communication loss. Disconnect the panel or supervisory network. Expect automatic climate control and PLC-based schedules to continue, while the interface reports loss of data rather than displaying stale values as current.
  6. Check 6: clock and restart behavior. Restart the controller before, during, and after scheduled events. Expect lighting and irrigation to follow the documented recovery policy without an extra irrigation command.

Recurring implementation pitfalls

Do not purchase a PLC from output count alone. An apparently sufficient controller can still be unusable when its analog inputs do not accept the sensor signals, its outputs cannot switch the loads, or its communication interface is incompatible with the panel or supervisory client.

Do not use a headline cable distance as a network design rule. Claims involving 150 m or 300 m for Ethernet do not replace the limits of the selected Ethernet physical layer, cable category, connectors, environment, and intervening switches. Likewise, treat the cited 1200 m RS-485 distance as a conditional upper bound: baud rate, cable impedance, termination, biasing, topology, grounding, node count, and electrical noise decide whether a particular link works.

Manual mode must not bypass all protection. Retain output electrical protection, command conflict handling, and clearly defined access authority. Display whether an output is being requested by temperature, humidity, a timer, or an operator; otherwise a valid automatic command can look like an unexplained fault.

A webcam does not verify control performance. Use trended sensor values, demand states, output feedback, alarms, and clock records for diagnosis. Video can confirm visible events, but it cannot establish temperature, humidity, water flow, or electrical output state.

FAQ

What happens if the fan and humidifier run together?

Ventilation removes the moisture being added, causing wasted energy and repeated cycling. Combine the temperature-high and humidity-high requests into one fan demand, then inhibit humidification while that demand is active unless the approved process sequence requires otherwise.

What happens if the greenhouse network connection fails?

Automatic climate, lighting, and irrigation logic should continue in the PLC. The panel or supervisory client should indicate communication loss and block writes until live data returns.

What happens if humidity changes when temperature changes?

Relative humidity can change because air temperature changed even when the absolute moisture content did not. Trend temperature and relative humidity together, then check the sensor against a reference before adjusting the humidity loop.

What happens if power returns during a watering schedule?

The result depends on the configured recovery policy: resume, skip, or perform a controlled restart. As the final verification step, cycle controller power during an active schedule and expect the documented policy to execute without a duplicate irrigation command.

Back to blog