0
\$\begingroup\$

System Voltage: 24V Max Current: 1.25A

Problem: I am trying to activate a relay once (output) after a set time delay (t1) from a falling edge event (trigger) for a second, different time interval (t2).

EDIT: Something like the function graph below: enter image description here

Essentially a hybrid of the following function graphs from here: enter image description here

enter image description here

Perhaps Falling Edge Triggered Delayed Interval is an appropriate name.

Prior Work: I have acquired and tested a relay with an equivalent schematic to the single shot falling edge, but in the application, (attached to a motor) the immediate activation of the output is undesirable, as the motor takes time to spin down. It would be better if the relay delayed for a period so that the output occurs after the system is stopped, hence my dilemma/curiosity.

Question: I have searched but been unable to find a component/module with a comparable function profile, is anyone aware of one or what nomenclature is used? Or a different architecture/morphology?

Additional Inputs/Constraints - Ideal case, I am looking for a single unit/discrete component that could be ruggedized (IP-rated something 4+), with a compact footprint(basically as small as possible).

Anyone familiar or do something similar?

\$\endgroup\$
6
  • 1
    \$\begingroup\$ It's unclear to me what you actually want; a hybrid of (a) and (b) means very little in terms of a definition so, draw a timing diagram. \$\endgroup\$
    – Andy aka
    Commented Feb 24, 2022 at 15:32
  • \$\begingroup\$ I think they want a delay-on-trigger (t1) then a specified on-time (t2.) So a delay relay. \$\endgroup\$
    – rdtsc
    Commented Feb 24, 2022 at 15:54
  • \$\begingroup\$ I have edited to add a timing diagram. Yes, I am looking for a delay relay that triggers on falling edge, or perhaps better put is agnostic as to how long the trigger signal has been held high. \$\endgroup\$ Commented Feb 24, 2022 at 16:04
  • 1
    \$\begingroup\$ @IndustrialBolting You haven't specified what happens when the situation is less clear -- such as what happens when the falling edge of the trigger occurs within a t2 period from a prior trigger event, for example. A more complete spec would be helpful. I also see you are familiar with one-shots. (74121 and 74123 immediately come to mind here.) What has led you to exclude such devices or similar designs? What precision and accuracy do you require? \$\endgroup\$
    – jonk
    Commented Feb 24, 2022 at 20:33
  • \$\begingroup\$ If you are up for building a small circuit, this can be done very easily with one CD4093 quad NAND gate and a couple of R's and C's. Also, there are programmable timer modules on ebay for cheap. \$\endgroup\$
    – AnalogKid
    Commented Feb 24, 2022 at 21:04

2 Answers 2

0
\$\begingroup\$

An off-the-shelf rugged option probably doesn't exist unless you're willing to pay a few hundred times the cost of what it really takes.

This functionality can be achieved with an IP-rated project box (maybe a PLC type with terminal blocks built in), an Arduino Nano, an N-channel MOSFET, a couple of resistors, a diode or two, and a cheap 24V-to-5V 1A buck converter module to power the Arduino.

If your input trigger signal is 24V, you'll need to clamp it down to under 5V so that it can be safely applied to a GPIO pin of an Arduino. You can do this with a resistor and a zener diode.

Here's what you'd end up with, effectively:

schematic

simulate this circuit – Schematic created using CircuitLab

The input trigger signal is read by the Arduino, which does the falling edge detection and timing. It uses a GPIO pin to drive a MOSFET, which switches the relay on and off.

R1 acts as a pulldown so that the MOSFET doesn't switch on if the Arduino is unpowered.

D1 is a flyback diode, designed to protect the MOSFET against inductive flyback currents when the relay is switched off - you can use pretty much anything for this, e.g. anything in the 1N400x range (1N4001, 1N4002, etc.)

R2 and D2 form a 4.7V voltage clamp for the trigger input. Below 4.7V, the zener diode does nothing and the input voltage is fed directly to the Arduino's GPIO pin. Above 4.7V, the zener diode begins to conduct and clamps the voltage down, meaning you can put 24V or more on the trigger input and it'll apply a maximum of 4.7V to the GPIO pin. The resistor just limits the clamping current. Something like a BZX55C4V7 or 1N5337B would work fine for the zener diode here.

You've got a near-endless choice for which N-channel MOSFET to use - look for anything labelled "logic level", 60V rated or higher, at least a couple of amps for headroom. Something like a Fairchild FQP30N06L would work perfectly.

All of this could be trivially placed into a small IP4x rated project box that would fit in the palm of your hand.

The code would be something along the lines of this:

// GPIO pin numbers for the pins we're using as trigger and output
const int TriggerPin = 10;
const int OutputPin = 11;

// delay time between falling edge and output, in milliseconds
const int DelayTime = 1000;
// time period for which the relay is switched on, in milliseconds
const int SwitchOnTime = 750;

int trig_prev = LOW;

void setup()
{
    // configure the pins and set a default low output state
    pinMode(TriggerPin, INPUT);
    pinMode(OutputPin, OUTPUT);
    digitalWrite(OutputPin, LOW);
}

void loop()
{
    // read the current state of the trigger pin
    int trig_state = digitalRead(TriggerPin);
    
    // if the trigger was previously high, but now low, that's a falling edge
    if (trig_prev == HIGH && trig_state == LOW)
    {
        // wait for the specified delay time
        delay(DelayTime);
        // turn the relay on
        digitalWrite(OutputPin, HIGH);
        // wait for the specified switch-on time
        delay(SwitchOnTime);
        // turn the relay off
        digitalWrite(OutputPin, LOW);
    }
    else
    {
        // if we didn't see a falling edge, wait 1ms before checking again.
        delay(1);
    }

    // keep track of the previous trigger pin state
    trig_prev = trig;
}

Note: this code is untested, I just mocked it together.

\$\endgroup\$
0
\$\begingroup\$

Here is a circuit that will do what you describe. It will drive a conventional DC relay. Select Q1 to handle the coil current.

You didn't give any min-max limits on the two time periods. In this schematic, both the initial delay and the relay activation times are adjustable from approx. 1 s to 6 s.

Because of the value of the input stage zener diode clipper, the circuit runs on 12 Vdc. With adjustments, this can be anything from 5 V to 18 V.

This circuit is two pulse-formers, not two true monostables. As such, if the input returns high before the first timer (the delay stage) has timed out, it will trigger the relay pulse immediately. An alternate version using a CD4093 makes the circuit independent of the input signal; once it is started, it completes the full delay-and output cycle, ignoring any activity at the input.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.