PDA

View Full Version : Having a digital and periodic signal, how can you detect whether it is still there?



IAmTheAnswer
- 4th September 2010, 10:21
Having a signal which is digital and periodic, like a phone ringing, how can you easily detect whether it is still there? You can detect the first change ie 0 -> 1 but say you want to do some stuff and abort it as soon as the signal isn't there anymore how do you find out?

Detection of zero at a time t might give you the time when the signal is being switched off but also when there is just zero instead of the signal ending.

Acetronics2
- 4th September 2010, 20:33
Having a signal which is digital and periodic, like a phone ringing, how can you easily detect whether it is still there? You can detect the first change ie 0 -> 1 but say you want to do some stuff and abort it as soon as the signal isn't there anymore how do you find out?

Detection of zero at a time t might give you the time when the signal is being switched off but also when there is just zero instead of the signal ending.

Hi,

Detect the signal stop " as soon as " is impossible : you must wait a bit just to see if it is not only a 1 > 0 transition ...
Generally, one uses a resettable monostable multivibrator, triggered by a 0 > 1 transition.
Period must be > one full 0 > 0 cycle ( i.e 2.5 ms for 440 Hz ) ...

so, worst case is 2.5 ms late ... if no over period intended to avoid glitches or missing transitions ...

This implies you know your incoming signal timing ...

Same as if I tell you " stop " ... you must first hear it, understand it, then act according to ...


Alain

Ioannis
- 6th September 2010, 13:21
What Alain said is to use a timer in your micro.

Start the timer when the signal appeared,and have the timer timeout after the period of the signal. I supose is about 4-5 seconds where you live too.

Of course the timer itself in the controller counts too fast, so you will need a variable along with it and increment it.

Here DT-INTS is finding a good use I guess.

Ioannis