0

Brightsign with motion sensor trigger (need to stop when no motion detected)

Hi,

For a museum project, I need to start playback of an audio file when someone enters the detection beam of a motion sensor.

That's easy to do, and I got it working.

But what I also need, is for playback to stop when no more motion is detected (visitor as left the area).

Is this feasable, and if yes, what are the propoer steps?

Thanks.

Eric Fauque

17 comments

  • 0
    Avatar
    Eric Fauque

    Precision; I am using an HD224 with the latest firmware and version of BrightAuthor.

  • 0
    Avatar
    Monica Knutson

    Hi Eric,

    I hope you are well.  Is it safe to assume you're using a standard PIR type of motion sensor with a dry contact closure?  If so, those trigger and release often as they see movement.  Here is what we would suggest:

    1. Set up a variable called "Trigger" or something similar, set it default to 0

    2. Upon any PIR trigger, (GPIO down or up depending on your setup), set the Trigger variable to 1

    3. Add media end event (or timeout?) on your audio loop to check for the Trigger variable to be equal to zero (use the Conditional section of the Advanced tab).  If the Trigger = 1 then remain on state / loop audio.  If Trigger = 0 jump to your "blank" audio state.

    4. Add a listener zone where you can check the Trigger status.  Use a GPIO input and every time it sets off (assuming release resets on the PIR) set the Trigger variable to 1 [go to same state upon trigger to reset the timer].  Use a timeout for xx seconds on the same listener state that will reset the Trigger variable to 0.  If the GPIO input triggers, then it will recycle back to the state and restart the timer.  If the timer goes off, then you can send it to maybe another handler state and do clean-up, etc.

    Hope that helps guide you in a direction that would be beneficial.

    Here are some additional resources:

    https://docs.brightsign.biz/display/DOC/Interactive+Events 

    https://docs.brightsign.biz/display/DOC/Event+Handler 

    https://docs.brightsign.biz/display/DOC/Conditional+Targets 

    https://docs.brightsign.biz/display/DOC/Dynamic+User+Variables 

    Have a great rest of your day!

    Cheers,
    Monica

  • 0
    Avatar
    Eric Fauque

    Hi Monica,

    Thanks for the quick reply.

    This seems to be much more complex than what I was expecting.

    I am using a simple "beam brake" sensor, normaly used for garage doors or external gates, with a reflector in front of it.

    It is connected to the Brighsign as button #1, and it starts the audio file as soon as I put my hand between the sensor and the reflector. So, once someone as interupted the beam, the audio will start, play until the end of the file and then wait for someone else to interupt the beam to playback again. Now, I am asked to see if playback can be stopped when the beam is no longer interupted by someone even if the audio file is not finished.

    I think I understand steps 1 to 3, but I am not sure about step 4.

    I have never used listener zones. I have added one, but I dont understand how to set it up with the rest of my presentation.What do I do in it?

    Thanks for your help.

  • 0
    Avatar
    Monica Knutson

    Hi Eric,

    Is your beam break sensor across a threshold like a doorway, or is it small and similar to an "insert your hand here to trigger the audio" kind of implementation?  

    Depending on how your sensor releases the trigger, it may hold the contact closed while the beam is broken, or it may just send a close and release.  If it holds the contact closed (or open on a normally-closed setup) while the beam is broken then you may be able to add a GPIO "up" event on the audio file state.  That is assuming you used the GPIO "down" on the "wait" state.

    Does that make sense?  :o)

    The listener zone may not be needed if the GPIO "up" works on your original zone.

    Cheers,
    Monica

  • 0
    Avatar
    Eric Fauque

    Hi Monica,

    The sensor is actually set up on the side posts of a swing.

    Sensor on one post and reflector on the other one.

    Visitors will sit, start swinging, interupting the beam and starting the audio file.

    We want the audio file to keep playing as long as someone is on the swing, but stop playing once no one is on the swing anymore.

    I don't think the GPIO "up" idea would work since everytime someone swings in front of the beam, it would trigger the file again.

    Is there a simple way to tell the player that if it does not get a trigger after let say 10 seconds, it should stop playback?

    Thanks.

  • 0
    Avatar
    Monica Knutson

    Hi Eric,

    Yes, that follows the first thoughts I had with the sensor and variables.  Let me whip together a sample BrightAuthor presentation.  Stand by...

    Cheers,
    Monica

  • 0
    Avatar
    Monica Knutson

    Hi Eric,

    Give this a go:

    https://www.dropbox.com/s/k8qzy2ibljy794h/BrightAuthor%20Trigger.zip?dl=0

    I have two zones setup, a listener and a playback and use Zone messaging to trigger the play and stop of the audio from the listener.  Take a look at some of the State entry setup on the Listener states, as well as the Conditional targets on the timeout.

    Let me know if you have any questions.

    Cheers,
    Monica

     

    ** Edit **
    Revised link is added a few posts down (2022-07-27)

  • 0
    Avatar
    Eric Fauque

    Hi Monica,

    Thank you so much for your help!

    I have loaded your sample presentation on my HD224 and it worked well, once I changed the audio output to analog stereo, in the zone properties ( I am outputing to headphones for my tests) ;-)

    With your sample presentation exactly as it is, I can trigger playback with the sensor and it will play the audio file without interuption, even if I trigger the senser multiple times. The playback stops 20 sec. after the last trigger of the sensor.

    Only thing that is not working, is when I replace your test sound with my sound file.

    For some reason, playback will not stop before the end of my audio file, even if there are no triggers on the sensor.

    If I do a trigger after 20 sec wait, the audio file will restart from the start, but if I leave it like that,  it will not stop until the end of the file, even if there is no trigger.

    My audio file is much longer than your file (2minutes ,51sec), could this be why it does not stop?

    Thanks

  • 0
    Avatar
    Monica Knutson

    You may have to set the Event Handler on the Audio Zone to "Stop Playback" on that tickbox.

    Give that a go and let me know...

    Cheers,
    Monica

  • 0
    Avatar
    Eric Fauque

    Hi Monica,

    That did it!

    All working as desired now.

    Thank you very much for your help, I will spend some time looking at your sample presentation, to understand how it all works together.

    Take care and thanks again.

    Cheers,

    Eric

  • 0
    Avatar
    Monica Knutson

    Happy to help!  :o)

    Glad the solution worked for you.

    Cheers,
    Monica

     

    * Note to future forum perusers on this topic *
    I'll save the sample presentation with the updates and if you need a copy of it, please reply to this thread and I'll get you a link for download.

  • 0
    Avatar
    Ronald Kolonay

    Hi Eric and Monica, 

    I know this conversion is quite old now.   Back in 2020, but I thought I would give it a try anyway.   I found your conversion after searching for something that was related to starting and stopping an audio file  using a motion detector.  I'm new to brightsign and working on a project that sounds similiar to what this swing and motion detector does.  We have an AU335 and was wondering if this presentation file Monica mention in this conversion was still available somewhere

    Thanks, 

    Ron

     

  • 0
    Avatar
    Rudolph
    Hi, I have a similar project, could you send me a copy of the sample presentation?
    Thank you.
  • 0
    Avatar
    Frank Lentz

    Hi Monica.  Wow, I hope Eric sent you digital flowers!  I would like to play-around with a tip-jar that says "thank you" messages using beam-break IR.  Any chance you still have that sample project to share as a template?  Thanks in advance.

  • 0
    Avatar
    Monica Knutson
  • 0
    Avatar
    Frank Lentz

    Thank you, Monica!  A simple picture paints a thousand words!  Will give it a whirl and report back.

  • 0
    Avatar
    Davy Whiteley

    I have to make a similar project for a museum, an ambiant sound that is played in a room only when people are in.
    I just use a PIR sensor instead of a "beam break sensor".

    I just stumbled upon your presentation Monica and it works flawlessly, thank you so much.

    I had to analyse everything inside : event handlers, zone messaging, timers, variables… to really understand how you made it to work and, while it makes so much sense once you see it, I could never have done it myself.
    I'm really amazed of how many things you can do with Brightsign once you understand it deeply.

    Thank you again.

    PS : I believe there is no way of making the audio fade out when it stops without using plugins ?

Please sign in to leave a comment.