Author Topic: GPIO motion sensor  (Read 254 times)

Offline Griz

  • Full Member
  • ***
  • Join Date: Mar 2016
  • Location:
  • Posts: 101
  • Kudos: 3
GPIO motion sensor
« on: March 19, 2017, 01:00:05 PM »
Appreciate some help with a motion sensor on the FPP.  I have a radioshack 3.3-5v motion sensor (pwr connected pin 1, gnd pin 6, data pin 12).  I've uploaded the start playlist script and i'm trying to make the motion sensor trigger this event.  I'm pretty sure I have everything configured correct.  When it senses motion, the sequence starts, plays for about 1-2 secs, turns off, then turns on, etc.  It's almost like I need to state "don't do anything else until you played the playlist" or a timeout function because it's getting some residual motion or something.  Any ideas why it keeps starting and stopping?  Thanks in advance.

Offline Griz

  • Full Member
  • ***
  • Join Date: Mar 2016
  • Location:
  • Posts: 101
  • Kudos: 3
Re: GPIO motion sensor
« Reply #1 on: March 20, 2017, 11:10:43 PM »
Still looking for some help with this, please. 


Anytime I have a motion sensor, push-button switch, etc hooked to the GPIO pins, the FPP gets stuck in an odd loop.  It starts to play the playlist (in this instant rising = start playlist ....), plays for a second or two, stops, then starts again for a second or two, [repeat]. 


I cannot figure out why its doing this to me.  I have used these switched before and had it working...


Any help is appreciated.  Thank you.


Offline David_AVD

  • Newbie
  • *
  • Join Date: Jul 2014
  • Location: Victoria Point (QLD - Australia)
  • Posts: 39
  • Kudos: 0
    • da-Share
Re: GPIO motion sensor
« Reply #2 on: March 21, 2017, 12:20:27 AM »
Do you have a pullup resistor wired to that GPIO pin?
da-share.com - the home of da_E131, da_DMX and other handy stuff

Offline PD SHIMMERS

  • Newbie
  • *
  • Join Date: Jun 2014
  • Location:
  • Posts: 19
  • Kudos: 0
Re: GPIO motion sensor
« Reply #3 on: March 21, 2017, 06:58:36 AM »
I have a PIR switch on GPIO set as rising. triggers event script check if playing. I only have 1 playlist with 1 sequence. It will play all the way which is about 7 seconds.

Offline Griz

  • Full Member
  • ***
  • Join Date: Mar 2016
  • Location:
  • Posts: 101
  • Kudos: 3
Re: GPIO motion sensor
« Reply #4 on: March 21, 2017, 06:48:24 PM »
Do you have a pullup resistor wired to that GPIO pin?

I don't have any resisters on it.  I set this up a few months ago,  also with no resisters,  and it worked great.   Is there any reference material about resisters and the FPP GPIO pins?

Offline Griz

  • Full Member
  • ***
  • Join Date: Mar 2016
  • Location:
  • Posts: 101
  • Kudos: 3
Re: GPIO motion sensor
« Reply #5 on: March 21, 2017, 06:49:25 PM »
I have a PIR switch on GPIO set as rising. triggers event script check if playing. I only have 1 playlist with 1 sequence. It will play all the way which is about 7 seconds.

Do you have any resisters with your motion sensor? Also,  where did you get yours?

Offline David_AVD

  • Newbie
  • *
  • Join Date: Jul 2014
  • Location: Victoria Point (QLD - Australia)
  • Posts: 39
  • Kudos: 0
    • da-Share
Re: GPIO motion sensor
« Reply #6 on: March 21, 2017, 07:48:06 PM »
The help screen for the GPIO section in FPP has a nice diagram that shows the pull-up resistor.

Offline Griz

  • Full Member
  • ***
  • Join Date: Mar 2016
  • Location:
  • Posts: 101
  • Kudos: 3
Re: GPIO motion sensor
« Reply #7 on: March 21, 2017, 10:44:58 PM »
Found the diagram - thank you.


Do you need resisters if a motion sensor is a normally closed switch?  The resisters seem to be required for normally opened switches. 

Offline David_AVD

  • Newbie
  • *
  • Join Date: Jul 2014
  • Location: Victoria Point (QLD - Australia)
  • Posts: 39
  • Kudos: 0
    • da-Share
Re: GPIO motion sensor
« Reply #8 on: March 22, 2017, 12:21:02 AM »
A resistor is required for a normally open or normally closed switch.  It's required to pull the GPIO pin to a known level when the switch is open.

It will be a pull-up if the switch is wired between the GPIO pin and the 0V (ground) pin.

 

Back to top