A timer-off (often coded as timeroff in embedded logic or referred to as an off-delay relay in industrial controls) is a control function where a circuit maintains its energized output for a preset duration after the input trigger signal is removed or drops to zero. What this changes in a real installation is the transition from a hard-cut power interruption to a graceful, timed shutdown—preventing abrupt mechanical stops, keeping cooling fans running after a heater shuts down, or holding a contactor closed during brief voltage sags. Beginners commonly confuse it with an on-delay timer (which waits to turn on after a trigger is applied) or a one-shot interval timer (which pulses for a set time regardless of how long the trigger is held).
The Core Mechanics of a Timer-Off Circuit
The timeroff function can be implemented in three primary ways, depending on whether you are working with heavy industrial panels, DIY bench projects, or microcontroller code.
In electromechanical systems, an off-delay is often achieved by placing a large electrolytic capacitor in parallel with the relay coil. When the control switch is closed, the capacitor charges to the supply voltage. When the switch opens, the capacitor discharges its stored energy through the relay coil, keeping the magnetic field strong enough to hold the contacts closed until the voltage decays below the relay's specific drop-out threshold.
In solid-state and digital time-delay relays (like the Finder 80 series or Macromatic TR-6), an internal microcontroller monitors the trigger pin. When the trigger drops to 0V, the MCU starts an internal countdown before firing the gate of the output triac or MOSFET low. These offer precise, adjustable delays from 0.1 seconds to 100 hours without the bulk of massive capacitors.
In embedded software (Arduino/ESP32), a timeroff routine is typically written using non-blocking millis() or micros() tracking. When a sensor reads LOW, the code logs the timestamp and keeps the output pin HIGH until the current time minus the logged timestamp exceeds the target delay.
Timing Modes Compared: Where Timer-Off Fits
When specifying a time-delay relay or writing a control script, selecting the wrong mode is the most common cause of system failure. Use this reference table to verify your logic requirements.
| Timing Mode | Trigger Action | Output State Behavior | Typical Use Case | Example Part / Function |
|---|---|---|---|---|
| On-Delay (Timer-On) | Apply signal | Waits time T, then turns ON. Drops OFF immediately when trigger is removed. | Motor soft-start sequencing; preventing short-cycling on HVAC compressors. | Finder 80.01 / delay() |
| Off-Delay (Timer-Off) | Remove signal | Stays ON for time T after trigger drops to 0V, then turns OFF. | Blower fan cool-down; headlight "follow-me-home" delay. | Macromatic TR-60122 |
| Interval (One-Shot) | Apply signal | Turns ON immediately for time T, then turns OFF regardless of trigger state. | Garage door light timer; automated spray valve dosing. | NE555 Monostable |
| Flasher (Asymmetric) | Apply signal | Alternates ON/OFF at set intervals continuously while trigger is held. | Warning beacon strobes; irrigation pump pulsing. | Omron H3CR-F |
Worked Example: Sizing a Capacitor for a 12V Electromechanical Timer-Off
Let’s say you are building a DIY 12V DC cooling fan circuit for a 3D printer enclosure. You want the fan to keep running for exactly 5 seconds after the heater cartridge is turned off, utilizing a standard 12V electromechanical relay and a parallel capacitor to create a hardware timeroff delay. How large does the capacitor need to be?
To solve this, we use the standard RC discharge formula, referencing the principles of capacitor discharging circuits. The relay will drop out when the decaying voltage hits its minimum hold threshold.
• Nominal Supply Voltage ($V_0$): 12V DC
• Relay Coil Resistance ($R$): 400 Ω (typical for a 30mA 12V relay like the Omron G2R-1-E)
• Relay Drop-out Voltage ($V_d$): 10% of nominal = 1.2V
• Desired Delay Time ($t$): 5 seconds
The Formula:
$V_d = V_0 \times e^{-t / (R \times C)}$
Step-by-Step Calculation:
1. Substitute the knowns: $1.2 = 12 \times e^{-5 / (400 \times C)}$
2. Divide by 12: $0.1 = e^{-5 / 400C}$
3. Take the natural log ($\ln$) of both sides: $\ln(0.1) = -5 / 400C$
4. $\ln(0.1) \approx -2.3026$
5. $-2.3026 = -5 / 400C$
6. Solve for C: $C = 5 / (400 \times 2.3026)$
7. $C = 0.005428$ Farads, or 5428 µF.
The Practical Decision: Capacitors have wide tolerances (often ±20%) and Equivalent Series Resistance (ESR) that accelerates voltage drop. You would not buy a custom 5428 µF capacitor. Instead, select the next standard size up: a 6800 µF, 25V electrolytic capacitor. This guarantees your fan runs for at least 5 seconds, likely closer to 6.2 seconds, ensuring safe thermal cool-down.
Where You Meet Timer-Off Logic in Practice
The timeroff concept bridges the gap between high-voltage industrial infrastructure and low-voltage microcontroller code.
- HVAC Air Handlers: When your thermostat satisfies the cooling call, the outdoor compressor contactor opens immediately. However, the indoor blower motor relies on an off-delay relay (or the furnace control board's internal timeroff logic) to keep pushing air through the evaporator coil for 60 to 90 seconds. This extracts residual cooling energy from the coil and prevents localized freezing.
- Automotive Lighting: Modern vehicles use a Body Control Module (BCM) to manage a "follow-me-home" headlight delay. When you turn the ignition off and exit, the BCM maintains the headlight relay for 30 seconds, illuminating your path before entering sleep mode to prevent battery drain.
- ESP32 / Arduino Code: In embedded systems, blocking code like
delay(5000)is a cardinal sin. Instead, developers implement a software timeroff using the ESP-IDF esp_timer API or non-blockingmillis()tracking. When a limit switch opens, the code flags astopTimevariable and continues polling sensors, only setting the motor pin LOW whenmillis() - stopTime >= 5000.
FAQ: Troubleshooting Timer-Off Delays
Why does my hardware off-delay time shorten as the circuit ages?
Electrolytic capacitors dry out over time, especially in warm environments like HVAC panels or 3D printer enclosures. As the electrolyte degrades, the actual capacitance drops and the Equivalent Series Resistance (ESR) increases. This causes the voltage to decay faster than originally calculated. If a 5-second delay shrinks to 2 seconds, replace the capacitor with a fresh, high-temperature (105°C rated) unit.
Can I wire a standard on-delay relay backward to get a timer-off function?
No. An on-delay relay relies on continuous control power to run its internal timing circuit and hold the output contacts closed. If you remove the control power to simulate a "stop" command, the relay's internal logic loses power instantly, and the contacts will drop out immediately. You must use a dedicated off-delay relay that has internal energy storage (capacitors) or a separate, always-on power supply pin.
My ESP32 timeroff routine triggers early when WiFi connects. Why?
If you are using software timers based on millis() or micros(), be aware that WiFi initialization and heavy RF transmission can cause brief interrupt latency or watchdog resets in poorly optimized code. For mission-critical off-delays (like shutting off a high-amperage heater), always use the ESP32's dedicated hardware timer peripherals via timerStart() and timerStop(), which operate independently of the main CPU loop and WiFi stack.






