On a LOGO! controller, a flood (leak) detector under an external aquarium filter is a digital input. It presents a volt-free NO/NC contact that changes state when water bridges its probe; it does not produce a variable signal. The shutoff solenoid valve on the filter intake hose and the audible alarm are digital outputs. A level sensor is analog only when it delivers a continuous voltage, current or resistance. Float switches, capacitive through-glass sensors and conductive probes are all digital.
The hardware set here is a LOGO! TD starter kit (12/24 V), LOGO! Power 24 V 1.3 A (100-240 V input), a DM16 24R digital expansion, an analog expansion for a PT100, and a LOGO! memory/battery card. Everything below maps field devices onto that hardware.
Signal Classification for Leak, Level, Temperature and Alarm Devices
Classify each device by what its output terminal physically delivers, not by what it measures. A discrete (digital) signal has two states: 0 V or 24 V, open or closed. An analog signal varies continuously across a range. Water level can be measured either way. The choice of sensor sets the input type, not the process variable.
| Device | Output delivered | LOGO! I/O type | Function blocks |
|---|---|---|---|
| Flood/leak detector (civil or building-automation type) | NO/NC relay contact; some units have two independent contacts | Digital input | NOT, RS latch |
| Float switch | Dry contact | Digital input | On-delay, RS latch |
| Capacitive proximity sensor through the glass | Transistor output, 24 V when water is present | Digital input | On-delay, RS latch |
| Conductive three-rod probe with level relay | Relay contact from the level relay | Digital input | RS latch (fill and stop rods) |
| Ultrasonic distance sensor, analog version | Continuous voltage or current | Analog input | Analog threshold trigger |
| Ultrasonic distance sensor, serial version | Serial data | Not readable by a LOGO! analog or digital input | Order the analog variant instead |
| Fuel-tank float sender (float on a rod) | Stepped resistance | Analog input after resistance-to-voltage conversion | Analog threshold trigger |
| DIY potentiometer, float and counterweight | Potentiometer wiper voltage | Analog input | Analog threshold trigger |
| PT100 immersion probe | Resistance (RTD) | RTD analog expansion channel | Analog threshold trigger |
| Pulse water meter | One contact closure per unit volume | Digital input (counter) | Up/down counter |
| Solenoid valve | Load (coil) | Digital output | Q coil |
| Buzzer | Load | Digital output (transistor or relay) | Q coil, fed by AND with a pulse generator |
In the LOGO!Soft simulation, model a leak detector or float switch as a switch on the digital input. Model an analog level sensor as an analog value you drag across its range. Do not simulate a flood detector as an analog input; no commercial flood detector outputs a proportional signal. A device that did so would simply be a level transmitter, and adjustable models vary only the trip sensitivity.
Leak Detector Contact Behaviour and Fail-Safe Wiring
Flood detectors sold for kitchens and bathrooms come in wired and radio-frequency versions. Both end in a changeover or NO/NC contact meant to drive a shutoff valve directly. Wire that contact to a LOGO! digital input fed from the same 24 V DC supply as the controller.
Use the NC contact, wired so the input reads 1 when the floor is dry. This is fail-safe (de-energise-to-trip) wiring: a broken wire, a loose terminal or a dead sensor drops the input to 0, which the program treats the same as water. With NO wiring, a cut cable looks identical to a dry floor, and the leak protection stays silently disabled until the next flood.
Building-automation flood sensors with two independent contacts allow a split architecture:
- Contact 1 goes to the LOGO! input for alarming, logging and SMS.
- Contact 2 trips the local shutoff valve directly, with no PLC in the path.
The hardwired path still closes the valve if the controller is powered down, in STOP, or mid-download with a program error. For a device whose job is preventing a flooded room, keep that independent path. The PLC adds annunciation, not the only layer of protection.
Place the probe at the lowest point of the tray or floor directly under the filter canister and hose connections. The previous failure mode on this installation was a cracked filter body, so water appears first under the canister, not along the hoses.
Shutoff Valve Selection for the Filter Intake Line
The valve goes on the filter's suction hose. When the canister or its connections fail, closing the intake stops the siphon from draining the tank through the break. Three valve families apply:
| Valve type | Behaviour on loss of control power | Output drive | Fit for this duty |
|---|---|---|---|
| Motorised ball valve | Stays in last position (unless spring-return) | Two outputs (open/close) or one output plus spring | Good flow, no pressure drop; slower stroke |
| Current-pulse (trip) valve with manual reset | Stays in last position; trips on a coil pulse and stays closed until reset by hand | One output, pulsed | Best match: a leak event forces a human inspection before flow resumes |
| Normally-closed solenoid valve | Closes | One output held energised to stay open | Continuous coil heat and power; the pressure-drop rating of a servo-assisted type rarely suits a gravity/siphon line |
A trip valve with manual reset is the right choice here. The coil needs only a short pulse, so drive it from a pulse-output timer (wiping relay) block rather than a held output. A held output on a trip coil rated for pulse duty overheats the coil. Read the minimum pulse width and coil voltage from the valve datasheet, and match the coil to 24 V DC if it is driven from a transistor output.
Watch the operating-pressure specification on any solenoid valve considered for this line. Many general-purpose solenoid valves are pilot-operated and need a minimum differential pressure to seal. A filter intake runs at near-zero differential, so pick a direct-acting or zero-differential design, or a motorised/trip ball valve.
Level Measurement Options for Top-Up and Partial Water Change
Automatic top-up of evaporated water and a partial water change use the same variable but need different information. Top-up needs one trip point. A water change needs a lower drain-to point and an upper refill-to point. That difference drives the sensor count:
- One analog sensor covers both functions. Two or more analog threshold triggers on the same analog input give any number of set points, adjustable in software.
- Point (digital) sensors need one sensor per trip point. A partial water change needs two sensors at different heights. Top-up can share the upper one.
Ultrasonic distance sensors measure from above the surface with mm-to-cm resolution, depending on model. They also expose leaks as a falling level trend. They work well as float replacements in treatment basins. In an inhabited tank, the emitted ultrasound is a legitimate concern for fish. Choose a non-acoustic method unless the emitter frequency and coupling into the water are shown to be harmless.
Conductive three-rod probes use a common rod, a low rod and a high rod, driven by a conductive level relay. The relay latches fill on at the low rod and off at the high rod, giving built-in hysteresis. Conductive level relays use AC excitation because DC across immersed electrodes causes electrolysis and electrode corrosion. In a fish tank, that also means metal ions released into the water. Never wire bare rods straight to a 24 V DC PLC input.
Capacitive proximity sensors mounted on the outside of the glass detect water through the pane with no wetted parts. The transistor output goes to 24 V when water is present, so the signal is digital. Mount one at each trip height. Check that the datasheet sensing distance exceeds the glass thickness, then set the sensitivity potentiometer to switch on water but not on dry glass. Low-cost level switches are an alternative.
Fuel-tank float senders (a float sliding on a rod) are cheap and easy to source used. Their output is a stepped resistance. A LOGO! analog input reads voltage or current, not resistance, so build a divider from a stable reference voltage:
V_in = V_ref * R_sender / (R_sender + R_fixed)
The result is non-linear and stepped. That suits threshold use (low / normal / high), not precise volume measurement. Pick R_fixed and V_ref so the full sender range stays inside the analog input range.
DIY potentiometer sender: a float on a line over a pulley that turns a potentiometer, balanced by a counterweight. The float's weight must be slightly greater than the counterweight so the float tracks the surface downward and the counterweight takes up slack as the level rises. Feed the potentiometer ends from a regulated voltage matching the input range and wire the wiper to the analog input.
Integrated aquarium top-up controllers include their own evaluation electronics. They switch the pump themselves and bypass the LOGO! logic. Buy the bare sensor when the LOGO! is meant to regulate.
Water Volume Metering by Pulse Count or Flow Rate
A level sensor gives height, not litres. Two methods quantify the water exchanged:
- Pulse water meter. The meter closes a contact once per fixed volume, for example 1 pulse = 1 L. Wire it to a digital input and count with an up/down counter. Set the counter's on-threshold to the target litres and let its output end the fill. The resolution is one pulse. At 1 L per pulse, that suits large tanks only; a small tank's partial change may be a handful of pulses. Check the maximum counting frequency of the chosen input in the LOGO! manual against the meter's pulse rate at full flow.
-
Flow measurement. Volumetric flow is the product of mean velocity and pipe cross-section, and volume is flow integrated over time:
With a constant-rate pump and a known Q, run time alone sets the volume: t = V / Q. Measure Q once by timing the fill of a known container, then implement the change as a timed output. A flow switch only confirms flow is present; use it as a dry-run interlock, not a meter.A = pi * d^2 / 4 [m^2, d = internal pipe diameter in m] Q = v * A [m^3/s, v = mean velocity in m/s] V = Q * t [m^3; x 1000 for litres]
Level-based dosing also works without any meter. Volume equals tank internal length times width times level change, so a drain-to and refill-to level pair defines the exchanged volume geometrically.
PT100 Temperature Input on the LOGO! Analog Expansion
A PT100 is a platinum resistance thermometer (RTD) with 100 Ω at 0 °C. A standard voltage/current analog module cannot read it. It needs the RTD variant of the analog expansion, which excites the element and linearises the reading. This installation uses a module dedicated to the PT100.
Probe selection for tank use:
- Choose a sheathed immersion probe long enough to reach mid-tank height. A 0.5 m stainless probe works when the connector head stays above the waterline.
- Check the connector or cable-gland position before buying. Many industrial RTDs have a terminal head that is not submersible; only the sheath may be wetted.
- Order the matching extension cable from the probe manufacturer's accessory list rather than using generic wire.
- Use 3-wire connection where the module supports it; it cancels lead resistance. On a 2-wire connection, every ohm of lead resistance reads as about 2.6 °C of error on a PT100.
- For long-term immersion in fish water, stainless sheaths are standard. Avoid brass or plated fittings in the water.
Use the temperature value through analog threshold triggers for heater control and for over/under-temperature alarms, with a hysteresis band between on and off values to prevent heater chatter.
Audible Alarm Hardware and Output Wiring
The alarm device must match the supply. A 24 V AC buzzer does not run from the 24 V DC LOGO! Power supply. This installation bought a 24 V AC unit by mistake and had to replace it. Buy a 24 V DC buzzer (piezo sounder) and verify "DC" on the device label before ordering.
Output wiring depends on the output type:
| Output type | Wiring | Constraint |
|---|---|---|
| Transistor (solid-state) output | Output drives the buzzer positive directly; buzzer negative to 0 V (M) | DC loads only; stay within the output current rating |
| Relay output (e.g. DM16 24R) | Relay contact switches +24 V into the buzzer positive; buzzer negative wired directly to 0 V | Contact is volt-free: it can switch AC from a separate source, but a pulsing alarm wears the contact |
DIN-rail sounders built for panels are harder to find than they should be. Two practical routes:
- Use a civil-series buzzer module built for a standard flush wall box. These come mechanical or electronic, single-, two- or three-tone, AC or DC, at 12, 24 or 230 V. Add a DIN-rail adapter for the module.
- Use an empty modular DIN enclosure and fit an intercom supplementary ringer inside. These are commonly 12 V buzzers, so add a regulator or dropping resistor sized from the buzzer current when feeding from 24 V.
Distributor catalogues also list 24 V DC buzzers under "sounder" or "cicalino" that mount on a panel cutout and wire straight to a transistor output.
LOGO! Function Block Logic for Leak Shutoff, Top-Up and Intermittent Alarm
An intermittent alarm comes from ANDing the alarm state with an asynchronous pulse generator. The generator free-runs with independent pulse and pause times; the AND passes its pulses to the buzzer output only while the alarm latch is set.
Design points in that logic:
- The reset requires I1 back at 1. Pressing acknowledge while the floor is still wet does nothing.
- Mark the leak latch retentive so a power cycle does not clear an unacknowledged flood alarm. The memory/battery card keeps the program and retentive data across outages.
- The on-delay on the low-level signal implements "below the level for a certain time" and rejects surface ripples at the sensor height.
- The top-up fill is blocked while the leak latch is set. Topping up a tank that is draining onto the floor feeds the leak.
- The fill watchdog (maximum fill time) catches a failed or misadjusted level sensor before the top-up floods the room. Set the time from measured fill rate times the largest expected top-up, plus margin.
- For the analog sensor, set gain and offset in the analog input or threshold block so the displayed value reads in engineering units (mm of level or %). Set on/off thresholds with a hysteresis gap.
Build and debug this in LOGO!Soft simulation first, toggling I1 and I3 as switches and moving the analog input slider through each set point.
Remote SMS Alarming from the LOGO!
SMS notification and SMS commands for this generation of LOGO! (0BA6) come from an external GSM modem or tele-alarm unit, not from the base module. Industrial GSM modems such as the Insys range do more than send alarms. They offer event-driven messages from their own inputs and command-driven switching of their own outputs, at a higher price than a simple dialler.
The simplest integration uses no protocol at all:
- Wire a spare LOGO! output (the alarm latch or a summary fault bit) to a modem input configured to send an SMS on change of state.
- Wire a modem output, set by SMS command, to a spare LOGO! input. Gate that input in the program so a remote command can only do safe actions, such as silencing the buzzer or stopping top-up. Never let it reset a leak latch, which needs a local inspection.
Keep the modem on the same 24 V DC supply only if the LOGO! Power budget covers it. Add the modem's transmit peak current to the loads already on the 1.3 A supply: valve coil, sensors and buzzer.
Recurring Mistakes on Small-PLC Tank Controls
| Mistake | Consequence | Correct practice |
|---|---|---|
| Leak sensor on the NO contact | Cut cable reads as "dry"; protection silently lost | NC contact, input = 1 when healthy |
| PLC is the only path to the shutoff valve | No protection with the PLC in STOP or unpowered | Second sensor contact trips the valve directly |
| AC buzzer on the DC supply or transistor output | No sound, or output damage | 24 V DC sounder, or relay output switching a separate AC source |
| Serial-output ultrasonic sensor ordered | No usable signal at LOGO! inputs | Analog (voltage/current) variant |
| Bare conductive rods on a DC input | Electrolysis, electrode corrosion, metal ions in the water | AC-excited conductive level relay, or capacitive through-glass sensing |
| Resistive sender wired straight to an analog input | Reading stuck at zero or full scale | Divider from a stable reference, or a resistance-to-signal converter |
| Held output on a trip-type valve coil | Coil overheating | Pulse-output timer block |
| Pilot-operated solenoid valve on a siphon line | Valve fails to seal at near-zero differential | Direct-acting, zero-differential or motorised/trip valve |
| Top-up with no maximum fill time | Stuck sensor floods the room | Fill watchdog latch with manual reset |
| Non-retentive leak latch | Power blip clears an active flood alarm | Retentive latch, memory/battery card fitted |
| RTD terminal head below the waterline | Water ingress, drifting or open-circuit reading | Probe length puts the head above the water |
Commissioning Checks with Expected Readings
- Buzzer cadence during the alarm. Expected: Q2 toggles on and off at the pulse generator's configured on and off times; the 24 V DC sounder follows every pulse.
- Wire break. Dry the probe, then disconnect one detector wire at the LOGO! terminal. Expected: I1 = 0 and a full alarm, identical to a real leak.
- Hardwired trip path (if the second contact is installed). Put the LOGO! in STOP or remove its supply, reset the valve by hand, then wet the probe. Expected: the valve trips with no PLC involvement.
- Capacitive level sensor. Expected: with water at the sensor height, the sensor output measures 24 V at the LOGO! input terminal and I3 = 1. Lower the water below the sensor: I3 = 0, and Q3 energises only after the on-delay has elapsed.
- Top-up termination. Expected: Q3 drops out as soon as the level returns to the sensor and I3 = 1.
- Analog level scaling (if used). Expected: the displayed level matches a tape measurement at the empty, mid and full points within the sensor's stated resolution. Each threshold switches at its set point, and the hysteresis gap prevents chatter.
- PT100 reading. Place a calibrated reference thermometer beside the probe at mid-tank height. Expected: after stabilisation, the LOGO! value matches the reference within the module and probe accuracy. A reading stuck at an extreme value points to an open circuit or a wiring-mode mismatch at the RTD channel.
FAQ
Can I connect a flood sensor directly to a Siemens LOGO! digital input?
Yes. Flood detectors provide a volt-free NO/NC contact. Wire the NC contact from the 24 V DC supply into the LOGO! input so the input reads 1 when dry, and a broken wire then trips the alarm the same way water does.
Does a water level sensor need an analog input on LOGO!?
Only if the sensor outputs a continuous voltage, current or resistance, such as an analog ultrasonic sensor, a float-and-potentiometer sender or a resistive tank sender. Float switches, capacitive through-glass sensors and conductive level relays are digital and go on digital inputs.
Can one level sensor handle both automatic top-up and partial water change?
An analog level sensor can, using separate analog threshold triggers for the top-up point, drain-to level and refill-to level. Point sensors such as capacitive or float switches need one sensor per trip height, so a partial water change needs at least two.
Can I drive a 24 V AC buzzer from the LOGO! 24 V DC power supply?
No. An AC buzzer does not work on DC, and a transistor output switches DC only. Use a 24 V DC sounder on a transistor output, or switch a separate AC source through a relay output contact.
Does the LOGO! need to stay running for the leak shutoff valve to close?
Not if the flood detector has a second independent contact wired directly to the valve trip coil. That path closes the valve even with the controller in STOP or unpowered, while the first contact feeds the LOGO! for alarming.