Motion Trigger with MP3 Player?

My son is working on a science project in which an entire MP3 file is played upon a pet setting off the Motion Trigger.

However, the way the Motion Trigger works, it keeps stopping and starting the mp3. (He’s experimented with the 4 different modes of playback and it doesn’t appear any of them do what he needs.)

Here is his current setup:

9volt > Power> Motion Trigger > MP3 Player > Synth Speaker

If he put the TimeOut bit after the Motion Trigger and set it for a long period, would that allow the entire file to play uninterrupted even if the Motion Trigger keeps sending additional triggers?

For purposes of the project, the MP3 file doesn’t have to be too long - 30-60 seconds is fine.

I don’t have an MP3 player bit, so I can’t experiment, but if I did, the timeout and the latch are the first things I’d try. Ultimately, an arduino bit would surely be able to do this, but again, some experimentation would be in order.

The multiple triggers is an interesting issue. On one shot mode the MP3 player will continually restart the track every time it gets a signal, so essentially you need something to interrupt additional signals from getting to the MP3 player. I unfortunately do not have a timeout bit, but depending on how it passes the signal it should work. I did see in the tips and tricks a motion controlled night light using the timeout which is somewhat similar.

I don’t think the latch bit will work as it will still have the issue with multiple inputs flipping it on and off.

You may also be able to add some logic bits like the double and which would require two types of input to trigger the signal. For example, motion and sound, or motion and light or the lack thereof.

I would start with the timeout to see if it works and go from there ;D

Chris,

I used the Arduino bit in a similar project to trigger the MP3, the downside of this is that you get noise from the Arduino, so the speaker has an almost constant hiss. Power > Arduino > MP3 > synth.

Kind regards,

Alan

Hi @dolf,

according to my understanding the Timeout bit implements a non-retriggerable Monoflop, which is good
for your case. The first trigger ( positive edge ) from the Motion trigger will start the Timeout. Any further triggers from the Motion bit will be ignored. On the output of the timeout you will see a constant “one” signal for the set time. If this is what the MP3 player bit requires, than your done already. Couldn’t test it, as I do not own a MP3 player bit.

2 Likes

Thank you for the info SeventhDwarf. I was wondering how that initial signal was passed and whether multiple signals would restart the timeout. The MP3 bit basically wants an initial pulse that starts the playback and will not re-trigger if the signal stays high. It has to go low again for it to recognize another high signal so it should work!

Hi @Progenitor @SeventhDwarf @dolf @chris101 @BillBudd ,
I checked this idea also today and it works indeed as discussed here.
When you switch the MP3 player to “once” it plays the stored song whenever it receives a high rising pulse on the SIG input. This input can stay high as long as the song plays, no problem. The song only starts again when the player receives another high rising input. When the signal changes to zero and rises again during the song, the song starts all over again…
So the timeout bit can be triggered by the motion sensor.
The motion sensor should normally send only one trigger, but mine sends sometimes 2 or 3 triggers. ( sensing moving air ? haha) As long as the timeout setting is long enough, this will be no problem. The motion sensor signal has a duration of appr. 3 seconds, so the setting of the timeout should be minimum 3x3 seconds to be on the safe side… :smile_cat:

Thanks everyone for all of the helpful information. The TimeOut is ordered and on the way. I’ll let you guys know what happens.

On a side note… that’s too bad about the Arduino hiss. I have that bit and was thinking it might also be a solution to this problem. But it looks like the TimeOut will most likely do the trick. Keep it as simple as possible but not one bit simpler. :wink:

Hey @dolf, I believe the hiss has been tracked to noise on the power line. There is a post around here somewhere (from @alexpikkert) that presents a possible solution, using a proto bit and a capacitor.

1 Like

Hi @dolf,
This is the link for a hiss filter: (originally for a servo, but I think it will also work for noise from the arduino)…


1 Like

Thanks for the info! That’s good to know. I’m hoping the TimeOut bit will solve his problem but this is good to know once he starts working with the Arduino bit. He’s musically inclined so he’ll most likely want to use that speaker! :wink:

1 Like