This comprehensive guide covers the implementation of water tank level control systems for the water & wastewater industry. Water tank level control systems maintain liquid levels within specified ranges (typically 20-80% tank capacity) for municipal water storage, industrial process tanks, and irrigation reservoirs managing volumes from 1,000-1,000,000 gallons. The PLC coordinates fill pumps, discharge demands, and alarm conditions using level sensors providing accuracy +/- 1-2% of full scale. Control objectives include preventing overflow, maintaining minimum levels for pump suction (NPSH requirements), and optimizing pump cycling to extend equipment life. Systems handle variable demand patterns while managing peak filling rates from 10-5000 GPM and implementing water conservation strategies through leak detection and usage monitoring.
Estimated read time: 8 minutes.
Problem Statement
Water & Wastewater operations require reliable water tank level control systems to maintain efficiency, safety, and product quality. Water and wastewater utilities face aging infrastructure requiring modernization with limited budgets, highly variable influent loads from wet weather events straining treatment capacity, increasingly stringent discharge limits for nutrients and emerging contaminants, skilled operator shortage with many approaching retirement, cybersecurity threats against critical infrastructure, energy costs representing 30-40% of operational budget, and public expectation of uninterrupted service 24/7/365. Climate change is increasing frequency and severity of extreme weather events. Asset management requires balancing limited capital budgets across hundreds of distributed assets like pump stations, meters, and treatment facilities.
Automated PLC-based control provides:
• Consistent, repeatable operation
• Real-time monitoring and diagnostics
• Reduced operator workload
• Improved safety and compliance
• Data collection for optimization
This guide addresses the technical challenges of implementing robust water tank level control automation in production environments.
Automated PLC-based control provides:
• Consistent, repeatable operation
• Real-time monitoring and diagnostics
• Reduced operator workload
• Improved safety and compliance
• Data collection for optimization
This guide addresses the technical challenges of implementing robust water tank level control automation in production environments.
System Overview
A typical water tank level control system in water & wastewater includes:
• Input Sensors: level sensors, float switches
• Output Actuators: fill pumps, solenoid valves
• Complexity Level: Beginner
• Control Logic: State-based sequencing with feedback control
• Safety Features: Emergency stops, interlocks, and monitoring
• Communication: Data logging and diagnostics
The system must handle normal operation, fault conditions, and maintenance scenarios while maintaining safety and efficiency.
**Industry Environmental Considerations:** Water and wastewater facilities operate in harsh outdoor environments with temperature extremes from -40°F to 120°F, high humidity causing condensation and corrosion, corrosive gases like hydrogen sulfide and chlorine attacking electronics, lightning exposure in elevated structures like clarifiers and aerators, and flooding risks during storm events. Instrumentation requires specialized materials (Hastelloy, titanium) for chemical resistance. Enclosures must be NEMA 4X rated with heaters and thermostats for temperature control. Explosive atmosphere considerations exist in digesters, wet wells, and other confined spaces.
• Input Sensors: level sensors, float switches
• Output Actuators: fill pumps, solenoid valves
• Complexity Level: Beginner
• Control Logic: State-based sequencing with feedback control
• Safety Features: Emergency stops, interlocks, and monitoring
• Communication: Data logging and diagnostics
The system must handle normal operation, fault conditions, and maintenance scenarios while maintaining safety and efficiency.
**Industry Environmental Considerations:** Water and wastewater facilities operate in harsh outdoor environments with temperature extremes from -40°F to 120°F, high humidity causing condensation and corrosion, corrosive gases like hydrogen sulfide and chlorine attacking electronics, lightning exposure in elevated structures like clarifiers and aerators, and flooding risks during storm events. Instrumentation requires specialized materials (Hastelloy, titanium) for chemical resistance. Enclosures must be NEMA 4X rated with heaters and thermostats for temperature control. Explosive atmosphere considerations exist in digesters, wet wells, and other confined spaces.
Controller Configuration
For water tank level control systems in water & wastewater, controller selection depends on:
• Discrete Input Count: Sensors for position, status, and alarms
• Discrete Output Count: Actuator control and signaling
• Analog I/O: Pressure, temperature, or flow measurements
• Processing Speed: Typical cycle time of 50-100ms
• Communication: Network requirements for monitoring
**Control Strategy:**
Implement hysteresis control with upper and lower setpoints separated by 10-20% of tank capacity preventing excessive pump cycling. Deploy timed fill algorithms limiting pump starts to <6 per hour protecting motor life. Use predictive fill control analyzing demand patterns and pre-filling tanks during off-peak utility hours reducing energy costs 15-30%. Implement dual-setpoint control for normal and emergency modes adjusting fill priorities. Deploy alarm hierarchies with pre-alarms at 10% and 90% levels warning before critical conditions. Use flow-based leak detection comparing fill rates to expected values detecting leaks >5% of normal flow within 15-30 minutes. Implement pump alternation logic equalizing runtime across multiple pumps preventing uneven wear.
Recommended controller features:
• Fast enough for real-time control
• Sufficient I/O for all sensors and actuators
• Built-in safety functions for critical applications
• Ethernet connectivity for diagnostics
**Regulatory Requirements:** Water and wastewater systems must comply with Clean Water Act discharge permits (NPDES) with strict effluent limits, Safe Drinking Water Act monitoring requirements for public water systems, EPA regulations for biosolids management (40 CFR Part 503), OSHA confined space entry regulations (29 CFR 1910.146), state-specific discharge standards often more stringent than federal requirements, and cross-connection control to prevent contamination of potable water. Cybersecurity requirements under America's Water Infrastructure Act (AWIA) mandate risk assessments and security measures. Discharge monitoring reports (DMRs) require certified data with auditable quality assurance.
• Discrete Input Count: Sensors for position, status, and alarms
• Discrete Output Count: Actuator control and signaling
• Analog I/O: Pressure, temperature, or flow measurements
• Processing Speed: Typical cycle time of 50-100ms
• Communication: Network requirements for monitoring
**Control Strategy:**
Implement hysteresis control with upper and lower setpoints separated by 10-20% of tank capacity preventing excessive pump cycling. Deploy timed fill algorithms limiting pump starts to <6 per hour protecting motor life. Use predictive fill control analyzing demand patterns and pre-filling tanks during off-peak utility hours reducing energy costs 15-30%. Implement dual-setpoint control for normal and emergency modes adjusting fill priorities. Deploy alarm hierarchies with pre-alarms at 10% and 90% levels warning before critical conditions. Use flow-based leak detection comparing fill rates to expected values detecting leaks >5% of normal flow within 15-30 minutes. Implement pump alternation logic equalizing runtime across multiple pumps preventing uneven wear.
Recommended controller features:
• Fast enough for real-time control
• Sufficient I/O for all sensors and actuators
• Built-in safety functions for critical applications
• Ethernet connectivity for diagnostics
**Regulatory Requirements:** Water and wastewater systems must comply with Clean Water Act discharge permits (NPDES) with strict effluent limits, Safe Drinking Water Act monitoring requirements for public water systems, EPA regulations for biosolids management (40 CFR Part 503), OSHA confined space entry regulations (29 CFR 1910.146), state-specific discharge standards often more stringent than federal requirements, and cross-connection control to prevent contamination of potable water. Cybersecurity requirements under America's Water Infrastructure Act (AWIA) mandate risk assessments and security measures. Discharge monitoring reports (DMRs) require certified data with auditable quality assurance.
Sensor Integration
Effective sensor integration requires:
• Sensor Types: level sensors, float switches
• Sampling Rate: 10-100ms depending on process dynamics
• Signal Conditioning: Filtering and scaling for stability
• Fault Detection: Monitoring for sensor failures
• Calibration: Regular verification and adjustment
**Application-Specific Sensor Details:**
• **level sensors**: [object Object]
• **float switches**: [object Object]
Key considerations:
• Environmental factors (temperature, humidity, dust)
• Sensor accuracy and repeatability
• Installation location for optimal readings
• Cable routing to minimize noise
• Proper grounding and shielding
• Sensor Types: level sensors, float switches
• Sampling Rate: 10-100ms depending on process dynamics
• Signal Conditioning: Filtering and scaling for stability
• Fault Detection: Monitoring for sensor failures
• Calibration: Regular verification and adjustment
**Application-Specific Sensor Details:**
• **level sensors**: [object Object]
• **float switches**: [object Object]
Key considerations:
• Environmental factors (temperature, humidity, dust)
• Sensor accuracy and repeatability
• Installation location for optimal readings
• Cable routing to minimize noise
• Proper grounding and shielding
PLC Control Logic Example - Water & Wastewater
Basic structured text (ST) example for water level control: Industry-specific enhancements for Water & Wastewater applications.
PROGRAM PLC_CONTROL_LOGIC_EXAMPLE
VAR
// Inputs
start_button : BOOL;
stop_button : BOOL;
system_ready : BOOL;
error_detected : BOOL;
// Outputs
motor_run : BOOL;
alarm_signal : BOOL;
// Internal State
system_state : INT := 0; // 0=Idle, 1=Running, 2=Error
runtime_counter : INT := 0;
// Flow Measurement & Totalization
Instantaneous_Flow : REAL; // m³/h or GPM
Flow_Total_Daily : REAL; // Accumulated flow
Flow_Total_Monthly : REAL;
Flow_Totalizer : CTU;
// EPA Compliance Monitoring
Effluent_pH : REAL;
Effluent_BOD : REAL; // Biological Oxygen Demand (mg/L)
Effluent_TSS : REAL; // Total Suspended Solids (mg/L)
Effluent_Chlorine : REAL; // Residual chlorine (mg/L)
EPA_Limit_Violation : BOOL;
// Chemical Dosing Control
Chlorine_Dosing_Rate : REAL; // mg/L or ppm
Polymer_Dosing_Rate : REAL;
Chemical_Tank_Level : REAL;
Low_Chemical_Alarm : BOOL;
// Level & Pressure Control
Tank_Level_Percent : REAL;
System_Pressure_PSI : REAL;
High_Level_Alarm : BOOL;
Low_Level_Alarm : BOOL;
// SCADA Integration
Remote_Start_Command : BOOL;
Remote_Stop_Command : BOOL;
SCADA_Communication_OK : BOOL;
Telemetry_Update_Timer : TON;
// Regulatory Reporting
Sample_Collection_Due : BOOL;
DMR_Report_Due : BOOL; // Discharge Monitoring Report
Last_Sample_Time : DATE_AND_TIME;
Compliance_Status : STRING[20];
END_VAR
// ==========================================
// BASE APPLICATION LOGIC
// ==========================================
CASE system_state OF
0: // Idle state
motor_run := FALSE;
alarm_signal := FALSE;
IF start_button AND system_ready AND NOT error_detected THEN
system_state := 1;
END_IF;
1: // Running state
motor_run := TRUE;
alarm_signal := FALSE;
runtime_counter := runtime_counter + 1;
IF stop_button OR error_detected THEN
system_state := 2;
END_IF;
2: // Error state
motor_run := FALSE;
alarm_signal := TRUE;
IF stop_button AND NOT error_detected THEN
system_state := 0;
runtime_counter := 0;
END_IF;
END_CASE;
// ==========================================
// WATER & WASTEWATER SPECIFIC LOGIC
// ==========================================
// Flow Totalization for Billing & Reporting
// Convert instantaneous flow to volumetric pulses
IF Instantaneous_Flow > Min_Flow_Threshold THEN
Flow_Pulse := TRUE; // Generate pulse per unit volume
Flow_Totalizer(CU := Flow_Pulse);
Flow_Total_Daily := DINT_TO_REAL(Flow_Totalizer.CV) * Flow_K_Factor;
END_IF;
// Reset daily totalizer at midnight
IF Current_Time = TIME#00:00:00 THEN
Flow_Totalizer(R := TRUE);
Flow_Total_Monthly := Flow_Total_Monthly + Flow_Total_Daily;
Flow_Total_Daily := 0.0;
END_IF;
// EPA Discharge Limits Monitoring
// Typical secondary treatment limits
EPA_Limit_Violation := (Effluent_BOD > 30.0) // > 30 mg/L
OR (Effluent_TSS > 30.0) // > 30 mg/L
OR (Effluent_pH < 6.0) // pH below range
OR (Effluent_pH > 9.0); // pH above range
IF EPA_Limit_Violation THEN
Compliance_Status := 'VIOLATION';
// Trigger alarm and regulatory notification
// Log excursion for DMR reporting
ELSE
Compliance_Status := 'COMPLIANT';
END_IF;
// Proportional Chemical Dosing
// Dose chlorine based on flow rate for consistent residual
Chlorine_Dosing_Rate := Instantaneous_Flow * Target_Chlorine_Residual / 1000.0;
// Polymer dosing for flocculation based on turbidity
IF Influent_Turbidity > 100.0 THEN
Polymer_Dosing_Rate := High_Dose_Rate;
ELSIF Influent_Turbidity > 50.0 THEN
Polymer_Dosing_Rate := Medium_Dose_Rate;
ELSE
Polymer_Dosing_Rate := Low_Dose_Rate;
END_IF;
// Chemical Tank Monitoring
IF Chemical_Tank_Level < 20.0 THEN // Below 20%
Low_Chemical_Alarm := TRUE;
// Alert operator to refill
END_IF;
// SCADA Telemetry Updates
Telemetry_Update_Timer(IN := TRUE, PT := T#10s);
IF Telemetry_Update_Timer.Q THEN
// Send data to SCADA master station
Send_To_SCADA(Flow_Total_Daily,
System_Pressure_PSI,
Tank_Level_Percent,
EPA_Limit_Violation);
Telemetry_Update_Timer(IN := FALSE);
END_IF;
// Remote SCADA Control Integration
IF SCADA_Communication_OK THEN
IF Remote_Start_Command THEN
System_Enable := TRUE;
END_IF;
IF Remote_Stop_Command THEN
System_Enable := FALSE;
END_IF;
ELSE
// Revert to local control if SCADA comm lost
System_Enable := Local_Start_Button AND NOT Local_Stop_Button;
END_IF;
// Regulatory Sampling Schedule
IF (CURRENT_DATETIME() - Last_Sample_Time) > Sample_Interval THEN
Sample_Collection_Due := TRUE;
// Alert lab technician
END_IF;
// ==========================================
// WATER & WASTEWATER SAFETY INTERLOCKS
// ==========================================
// Operational Interlocks
Production_Allowed := NOT High_Level_Alarm
AND NOT Low_Level_Alarm
AND NOT Low_Chemical_Alarm
AND (System_Pressure_PSI > Min_Pressure)
AND (System_Pressure_PSI < Max_Pressure);
// EPA Compliance Interlock
IF EPA_Limit_Violation THEN
// Continue operation but alert operator
// Log violation for regulatory reporting
Alarm_Active := TRUE;
END_IF;
// Emergency Shutdown on Critical Parameters
IF (Effluent_Chlorine > Max_Safe_Chlorine) OR
(System_Pressure_PSI > Burst_Pressure) THEN
Emergency_Shutdown := TRUE;
All_Pumps_Stop := TRUE;
END_IF;Code Explanation:
- 1.State machine ensures only valid transitions occur
- 2.Sensor inputs determine allowed state changes
- 3.Motor runs only in safe conditions
- 4.Error state requires explicit acknowledgment
- 5.Counter tracks runtime for predictive maintenance
- 6.Boolean outputs drive actuators safely
- 7.
- 8.--- Water & Wastewater Specific Features ---
- 9.Flow totalization for billing, reporting, and water accountability
- 10.EPA NPDES permit compliance monitoring for discharge limits
- 11.Proportional chemical dosing based on flow and water quality
- 12.SCADA integration for remote monitoring and control
- 13.Regulatory reporting support (DMR - Discharge Monitoring Report)
- 14.Tank level control prevents overflow and dry-run conditions
- 15.Automatic sampling schedule tracking for compliance
- 16.Emergency shutdown on critical parameter violations
Implementation Steps
- 1Conduct hydraulic modeling to determine retention times and flow rates for treatment stages
- 2Design SCADA system with geographic information system (GIS) integration for distributed assets
- 3Implement multi-parameter monitoring including pH, dissolved oxygen, turbidity, and chlorine residual
- 4Configure aeration basin control with DO optimization to minimize energy consumption
- 5Design pump control with alternating duty cycles to equalize wear and prevent deadheading
- 6Implement flow equalization to handle wet-weather surge capacity and prevent overflow
- 7Configure automated chemical dosing for coagulation, flocculation, and disinfection
- 8Design automated backwash sequences for filtration systems with optimization algorithms
- 9Implement alarming and notification for regulatory exceedances and equipment failures
- 10Configure energy optimization scheduling pumps during off-peak electricity rates
- 11Design integration with regulatory reporting systems for discharge monitoring reports
- 12Establish predictive maintenance based on run hours, cycle counts, and performance trending
Best Practices
- ✓Use submersible sensors with automatic cleaning systems to prevent bio-fouling
- ✓Implement cascade PID control for dissolved oxygen with feedforward from influent load
- ✓Design redundant critical sensors with automatic switchover on failure or out-of-range readings
- ✓Use variable frequency drives on aeration blowers with DO trim optimization
- ✓Implement alternating pump operation with hour meters for balanced equipment wear
- ✓Log complete operational data for regulatory compliance and optimization studies
- ✓Use intrinsically safe or submersible-rated instrumentation in hazardous wet-well areas
- ✓Implement automated composite sampling for lab analysis and compliance monitoring
- ✓Design energy management with demand limiting to avoid peak electricity charges
- ✓Use cellular or licensed radio for remote lift stations without wired communication
- ✓Implement weather data integration for predictive control during storm events
- ✓Maintain comprehensive asset management database linked to SCADA system
Common Pitfalls to Avoid
- ⚠Inadequate sensor maintenance causing drift and unreliable readings leading to process upsets
- ⚠Failing to implement proper grounding in wet environments causing ground loop interference
- ⚠Poor sensor placement in non-representative locations yielding misleading data
- ⚠Not implementing backup control strategies when sensors fail or go into maintenance
- ⚠Inadequate surge protection on communication lines exposed to lightning strikes
- ⚠Overlooking hydrogen sulfide corrosion requiring special materials in sewer applications
- ⚠Failing to size chemical storage and feed systems for maximum day demands
- ⚠Inadequate backup power sizing based on average load rather than peak demand
- ⚠Not implementing flow verification via multiple methods to detect sensor failures
- ⚠Overlooking freeze protection for outdoor instrumentation in cold climates
- ⚠Inadequate cybersecurity on SCADA systems creating vulnerability to ransomware attacks
- ⚠Failing to calibrate flow meters annually leading to billing and compliance errors
- ⚠Rapid pump cycling on/off every 2-5 minutes - Insufficient tank volume or setpoint differential too narrow | Solution: Increase deadband between on/off setpoints to 15-20% of tank capacity, verify tank size adequate for demand variability, install accumulator tank if needed, implement timed delays (minimum 10 minute off time)
- ⚠Tank overflowing despite level control - Level sensor failure or control valve stuck open | Solution: Test level sensors against measured depth, verify sensor calibration and zero offset, check fill valve closing completely, test high-level alarms and emergency shutdowns, install redundant overflow protection
- ⚠Low level alarms during normal operation - Demand exceeds fill capacity or pump failure | Solution: Calculate peak demand vs. fill rate (should have 20-30% margin), verify all pumps operational, check for system leaks or unexpected demand, stage additional pump or reduce consumption
- ⚠Level readings erratic or unstable - Sensor placement in turbulent zone or electrical interference | Solution: Relocate sensor away from fill inlet or outlet draws, install stilling well for float or pressure sensors, verify wiring shielding and grounding, filter sensor signal (5-60 second time constant)
- ⚠Pump running dry or cavitating - Low-level cutout failure or sensor malfunction | Solution: Test low-level switches and verify cutout function, install redundant level protection with 2oo3 voting, verify NPSH available exceeds required by 1.5× minimum, add low-pressure cutout on pump discharge
Safety Considerations
- 🛡Implement continuous hydrogen sulfide and methane monitoring in confined spaces like wet wells
- 🛡Install forced ventilation with gas detection interlocks before entry into pump stations
- 🛡Use intrinsically safe instruments in classified hazardous areas per NEC Article 500
- 🛡Implement automated chlorine leak detection with ventilation and neutralization systems
- 🛡Install fall protection and retrieval systems for confined space entry operations
- 🛡Use explosion-proof equipment in areas where methane concentrations may exceed 5% LEL
- 🛡Implement remote pump station monitoring to reduce operator exposure during inspections
- 🛡Install emergency showers and eyewash stations near chemical feed areas
- 🛡Use lockout/tagout procedures with confined space permits for all maintenance activities
- 🛡Implement automated overflow alarming and diversion to prevent environmental releases
- 🛡Train operators on chlorine emergency response and respiratory protection requirements
- 🛡Maintain up-to-date safety data sheets for all treatment chemicals including ozone and UV systems
Successful water tank level control automation in water & wastewater requires careful attention to control logic, sensor integration, and safety practices. By following these industry-specific guidelines and standards, facilities can achieve reliable, efficient operations with minimal downtime.
Remember that every water tank level control system is unique—adapt these principles to your specific requirements while maintaining strong fundamentals of state-based control and comprehensive error handling. Pay special attention to water & wastewater-specific requirements including regulatory compliance and environmental challenges unique to this industry.