Need 60 sec. delay after sensor activation, ignoring subsequent activation

Thread Starter

Media Man

Joined Feb 1, 2016
8
HI, this should be easy for the talented people here. I am using an PIR sensor that when activated by movement trips an MP3 player device that plays an audio file. The audio file plays approx. 45 seconds. Every time the sensor is activated by movement it starts playing the file from the beginning. If file is playing and sensor activates the file starts over. I need a simple way to have the sensor activate, start the audio file and let it play through completely, regardless of subsequent sensor trips during playback. Then once finished playing is reset and ready for next trip. Hope that makes sense.
 

crutschow

Joined Mar 14, 2008
34,280
What signal characteristics are needed by the MP3 player to start it's playing?
Can this signal stay in the active state for longer than 45 seconds without causing the MP3 player to restart playing?
 

Thread Starter

Media Man

Joined Feb 1, 2016
8
What signal characteristics are needed by the MP3 player to start it's playing?
Can this signal stay in the active state for longer than 45 seconds without causing the MP3 player to restart playing?
3.3V - 5V, active low inputs, w/ internal pull ups.
As for the signal staying active: No. If active for longer than 45 seconds it will start to play the over immediately.
 

crutschow

Joined Mar 14, 2008
34,280
3.3V - 5V, active low inputs, w/ internal pull ups.
As for the signal staying active: No. If active for longer than 45 seconds it will start to play the over immediately.
Just to be clear: a signal switching from 3.3v-5v to ground triggers the MP3 player on the falling edge (?).
 

Picbuster

Joined Dec 2, 2013
1,047
Use a pic12f675 to handle the on/off from the devices concerned use one input to trigger the state machine.
1:look at pir
2:start sound(mp3)
3: wait >45 sec
4: go back to 1
 

Dodgydave

Joined Jun 22, 2012
11,284
So your mp3 player needs a negative (low)pulse to start it, what is coming from the pir sensor a low pulse or high or open?

Here is a timer using a Cd4093 cmos chip, it has two different inputs, B pos trigger, or A neg trigger, and complimentary outputs positive or negative, time adjustable from 10 to 100 seconds.

DSC_0009.JPG
 
Last edited:
You said...

Every time the sensor is activated by movement it starts playing the file from the beginning. If file is playing and sensor activates the file starts over.
Does your PIR have any time control on it? If so, How long does it stay on when it senses motion?

If not, the PIR will sense movement and go low as long as there is a difference between the lenses of the "fly's eye" type lenses. until the motion across the PIR. In this case,
- a person walks into the room and the PIR goes low and starts playing mp3
- the person stops, the mp3 continues playing
- the person continues, the mp3 starts over

Hope that makes sense.
I hope you've described exactly how the PIR works and decided what you want the response to be.
 

Thread Starter

Media Man

Joined Feb 1, 2016
8
You said...



Does your PIR have any time control on it? ( No, it does not) If so, How long does it stay on when it senses motion?

If not, the PIR will sense movement and go low as long as there is a difference between the lenses of the "fly's eye" type lenses. until the motion across the PIR. In this case,
- a person walks into the room and the PIR goes low and starts playing mp3
- the person stops, the mp3 continues playing
- the person continues, the mp3 starts over
^ This is correrct^


I hope you've described exactly how the PIR works and decided what you want the response to be.
 

crutschow

Joined Mar 14, 2008
34,280
Use the negative going output from Dodgydave's circuit with a series capacitor and resistor to ground to give a short, negative going pulse to trigger the MP3 player.
 
Top