Voltage switch

hi,

i am going to make a low volt switch.

I want to know is it possible to program the following?

I want to activate a relay via mosfet etc.. but only when it hits the trigger voltage and remains at or under for set xx seconds..

protection, like when a large load runs for a small moment and falsely triggers the switch

thx..

I want to activate a relay via mosfet etc.. but only when it hits the trigger voltage for xx seconds..

Only when what "hits the trigger voltage"? Reading an analog input, and recording when the voltage goes above a threshold is easy. Clearing the time when the voltage is below the threshold is easy.

Comparing now (using millis()) versus then (when then is non-zero) is easy. If now minus then is greater than xx * 1000 milliseconds, turn the appropriate pin on.

ill have a play,

thanks for helping