timer with delay

Hello friends, I'm a novice in this ... I want to do a project with Arduino and I need your help to choose the hardware, the project is as follows:

I want to put an inductive sensor (if) I want it to take a signal when a metal piece approaches, from that moment I want to count a certain time (t1) and after that time finished another time (t2) that follows (t1) ) and that time (t2) send a signal to a relay that lasts that time (t2) and then disconnect.
I would like to see the processes that occur in a display, and be able to change both t1 and t2 with a keyboard,
and if it is possible to have some memories to store predetermined times.
I hope your help to start, thanks! Juan Pablo

What units are t1 and t2 measured in? Minutes? Seconds? Milliseconds? Microseconds? Nanoseconds?

What range of values do you expect for t1 and t2?

Have you chosen your inductive sensor? Does it produce the desired 5V output signal?

Hi John. T1 and t2 format and range are 00.00 to 99.99 seg
I dont have any sensor. I will buy the correct. I need your opinion. Tnks !!

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.

Can you please tell us your electronics, programming, Arduino, hardware experience?

What is the application that needs a timing sequence?

Thanks.. Tom.. :slight_smile:

For input, you want a keyboard connected to the Arduino or through a computer and USB connection?

Any idea on display so you can see what you have entered and the general state of the system?

Overall the programming is quite straightforward on this one, a couple hundred lines of code at most. The main thing is that you get your requirements straight. You also have to decide on what exactly you want the input to be (just the numbers or also the decimal point; finished by an enter or other special key; how to select whether they input T1 or T2).

So for the time: what would be the unit? Is 00.00-99.99 in microseconds, days, or something in between?

What to do in case of a power reset during countdown?

What should be the initial state?

How to start the countdown? Any interruption possible?

The above requirements are probably not complete. While programming you're bound to find more edge cases that have to be defined, but it's a start. It's the edge cases that matter, the rest follows.

I do not have all the hardware, I do not know if I buy a one or a mega.
I do not have experience programming arduino
and it's to make a spray dispenser
I want to see t1 and t2 and general state.
00.0-99.9 seconds, with tenths of seconds
in case of restart of energy during the countdown, I turn on the device and follow t1 and t2 in the last values set but the countdown that starts again from 0
the countdown is immediate to the account of t1, Any interruption possible? no.


One input (the inductive sensor), one output (the spray pump or so). No need for a Mega, just get an Uno. Or if it's intended to go on a protoboard, get a Nano (or a Pro Mini, if you know how to handle it - nice and small but no USB interface built in).