1. Panoramica tecnica e principio di funzionamento
Mechanical limit switches, reed switches, tipping-bucket rain gauges, and relay contacts suffer from two classic failure modes: 3–15 ms contact bounce (causing 5–20 false MCU interrupts per closure) and contact film oxidation when pulled up with weak microamp resistors. A proper wetting resistor R1 (≥ 5 mA) + RC debounce (R2/C1) + 74HC14 Schmitt trigger solves both permanently.
Minimum Wetting Current: Industrial silver-alloy contacts form thin insulating sulfide/oxide layers over months. Pushing ≥ 5–10 mA through R1 at 12–24 V physically punches through oxide films on every closure, keeping contact resistance low for years.
Why a Schmitt Trigger Is Mandatory: Feeding a slow RC ramp directly into a normal CMOS GPIO input causes multi-MHz shoot-through oscillation near Vcc/2! A 74HC14 Schmitt inverter has wide built-in hysteresis that turns slow RC curves into a single crisp nanosecond edge.

2. Step-by-step: Designing an industrial-grade dry-contact input stage
1Size wetting resistor R1 for 5–15 mA when contact closes
For 24 V DI, 2.2 kΩ (0.5 W) delivers 10.9 mA wetting current; never rely on 47 kΩ MCU internal pull-ups for field switches.
2Set RC debounce delay t_deb ≈ 1.1 × R2 × C1 > worst bounce
For 8 ms bounce, 22 kΩ × 0.47 µF yields ~11.4 ms clean debounce while still allowing up to 29 Hz pulses.
3Buffer with a 74HC14 / SN74LVC1G14 Schmitt trigger
Add a 3.3 V / 5 V clamp diode before the Schmitt input when wetting from a 24 V field supply.
4Verify maximum pulse rate stays below 1 / (3 × t_deb)
High-speed flowmeters (>200 Hz) use solid-state Hall/optical sensors with smaller C1 (1–10 nF) instead.
3. Ricerca guasti sul campo con multimetro
| Sintomo | Causa principale | Verifica multimetro | Soluzione |
|---|---|---|---|
| Limit switch works on the bench but randomly misses triggers after 6 months in the plant | Contact oxidation due to < 1 mA wetting current | Measure closed-contact voltage drop across switch terminals | Lower R1 to supply 5–10 mA wetting current or switch to gold-plated contacts |
4. Domande frequenti (FAQ)
Do gold-plated reed switches also need 10 mA wetting current?
No — gold does not oxidize, so gold-plated dry-circuit contacts work reliably down to 100 µA–1 mA (and high current would actually burn off the thin gold plating!).
5. Calcolatori correlati, guide e altri circuiti
- Calcolatore di uscita a impulsi
- Calcolatore di filtro RC anti-aliasing
- Uscita Sensore PNP 3 Fili (Sourcing) — Circuito e Simulatore
- Uscita Sensore NPN 3 Fili (Sinking / Open-Collector)
- Circuito NAMUR 2 Fili Sicurezza Intrinseca (IEC 60947-5-6)
- Uscita Push-Pull (HTL/TTL) e Open-Drain — Simulatore
- Isolamento Fotoaccoppiatore e Relè con Diodo di Ricircolo
- Protezione Ingresso 24 V Sensori (PMOS, TVS e Fusibile PTC)
- Loop di Corrente 4–20 mA 2 Fili e Ricevitore Protetto
- Trasmettitore Analogico Attivo 3 Fili vs 4 Fili (0–10 V)
- Trasmettitore Tensione a 4–20 mA (Op-Amp + Transistor)
- Partitore NTC + Buffer Op-Amp e Filtro RC