Author Topic: How to control a basic battery powered prop?  (Read 831 times)

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
How to control a basic battery powered prop?
« on: March 11, 2019, 03:36:19 PM »
Does anyone have any suggestions on the simplest way to control one of these props? Its the kind that works on motion control or a try me button.  I want to have this guy start & stop playing his banjo during a portion of a sequence. Could it be as simple as running a 5v DC adapter from one of my LOR channels and wiring the 5v end into the props battery box or do you also need to do something with a GPIO relay to trigger it? If so how do you setup to trigger it in xlights?

https://www.amazon.com/Halloween-Prop-Description-Background-Gathering/dp/B00O2ZT0SC?SubscriptionId=AKIAILSHYYTFIVPWUY6Q&tag=duckduckgo-ffhp-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00O2ZT0SC

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,584
  • Kudos: 50
Re: How to control a basic battery powered prop?
« Reply #1 on: March 20, 2019, 11:50:48 AM »
The GPIO relay is the best method with the relay connected to the try me connection.  The first thing that I would do is check to see if the try me button starts and stops the prop or just starts it.  Set up your prop and hit the try me button.  While the prop is doing its thing, press the button again and see if it stops, resets and starts again, ir just keeps running.  This will determine what you need to do to have full control over the prop and once I know how it reacts, we can set up your prop for full control from xlights.

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #2 on: March 20, 2019, 01:33:28 PM »
Thanks for the reply, I still need to order the prop. Once I have it I'll check the try me button and feedback

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #3 on: April 03, 2019, 12:54:53 PM »
Hi, I received the prop in last night. I didn't have time to play with it too much because it scared the crap out of my cat but I can confirm the try me button will turn it on and also turn it off.

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,584
  • Kudos: 50
Re: How to control a basic battery powered prop?
« Reply #4 on: April 04, 2019, 06:40:32 PM »
Cool.  You can control it with a relay board connected to the GPIO pins on the PI.  The Adreno relay boards work well with the PI.  They are 5V with ground triggers and the PI can supply this type of control.  The PI can with a 2.5A power supply can handle up to a 4 relay board with no issues but if you are going to go with a 8 relay or larger board, I would get a separate power supply for the relay board.  You need to determine exactly what type of control you want to have over the prop.  Are you just going to trigger the prop and let it run through its routine or do you want to control both the start and stop?  Is the control of this prop reactive or just part of a sequence or set of sequences?  Does this prop always do the same thing for the same amount of time or does it do multiple things that that take different amounts of time?  The problem with this type of prop is that if you trigger it while it is already running, then it just stops of if you attempt to stop it with by using the try me button and it has already stopped, you will just wind up starting it up again.  These can be real issues in a reactive setup because there is no way for the show or the PI to know if the prop is running or stopped so the single channel control method just doesn't work all that well.  Play with the prop and figure out what it does and what you want it to do and we can get you set up.

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #5 on: April 05, 2019, 12:31:53 PM »
Thanks, For this prop I think all I really want to do with it is trigger it in xlights to start and run  at a specific point in the song. It would be a plus to stop it but honestly letting it run its course in the particular song I'm doing wouldn't hurt anything. BTW, it basically just does the same thing each time. Since the Adreno relay can support 4 relays I have another prop I might look into triggering in this manner as well. I do wonder however how far away the props can be from the Pi and relay? The Pi is in the garage and I can put the relay next to it but the wires going to the props would need to be about 30 feet. I'm also curious how you trigger the relay in xlights? Is it some kind of effect that you drop? On a side note, I did find these AC relays the other day that might be really easy to just plug into an open Lor channel and use that to trigger the relay although doing more than one prop that way would be more expensive than using the adreno relay.https://www.frightprops.com/controllers-electronics/electronic-components/ac-activated-double-pole-double-throw-5-amp-relay.html

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,584
  • Kudos: 50
Re: How to control a basic battery powered prop?
« Reply #6 on: April 05, 2019, 03:28:21 PM »
Controlling it in xlights is nothing.  Just set up a single channel for it like any other device or prop.  I had 5 of them last year and am adding 4 or 5 more this year.  I just named the single channels after the name of the prop they were triggering.  Then to trigger the prop, I just turned the channel on for a second and back off.  This simulates the pressing of the try me button or stepping on a step pad.  If you wanted to control the stop as well, you could just trigger the step pad again but if the prop had already stopped or never started, your stop command would just start it.  For that I would use a second channel and relay and have it controlling the props power.  Then to stop the prop, just take away its power.  You can set the PI to control its GPIO outputs by specific show channel numbers.  Then any value sent to that channel above zero turns that GPIO pin on and setting it back to zero turns it off.  I currently have an 8 relay board connected to one of my PI's and have all 8 relays connected to GPIO pins and all 8 pins are configured to channel numbers.  They are also set up in inverse mode so they supply a ground when triggered which is what the Adreno boards use.  I use a separate power supply for my relay board but you might be okay letting the PI power a 4 relay board.  I would test that prior to setting up your show.  The triggers should be able to go 30 feet and more without issue.  I would just make up a cable the length that you need with a mono phono plug on it and plug it into the prop to test.  Then with the prop powered up, just touch the wires together on the other end and see if the prop responds.  If it does, and it should, you are good to go when you connect that end to your relay board.  My longest run so far is about 25 feet and it works fine.

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #7 on: April 05, 2019, 04:49:30 PM »
Thanks, Ill order a relay card and give it a try. Do I need to install any scripts in fpp or is there a setup page already in fpp where you just configure the GPIO pins to the channel you are using in xlights?


Sent from my iPhone using Tapatalk

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,584
  • Kudos: 50
Re: How to control a basic battery powered prop?
« Reply #8 on: April 05, 2019, 05:22:21 PM »
FPP can already do this, no need for any scripts.  Just go into Input/Output Setup and then into Channel outputs.  On that screen select the other tab and press the add button.  In the selection box that will appear you can select GPIO and configure the entry for the GPIO pin being used and the channel it will respond to.  Make sure to check the inverse check box as well and you should be good to go.  Add a separate entry for each channel and GPIO pin being used.  The channels do not have to be consecutive.

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #9 on: April 05, 2019, 06:38:15 PM »
Thanks!


Sent from my iPhone using Tapatalk

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #10 on: April 06, 2019, 03:52:51 PM »
Hi Tbone, What do you think of this relay? It looks like a hat and I like that it cuts down on the wiring a lot but I'm not sure if the software would interfere with the EDMRDS plug in.
https://smile.amazon.com/KEYESTUDIO-4-Channel-Shield-Expansion-Raspberry/dp/B072XGF4Z3/ref=cm_cr_arp_d_product_top?ie=UTF8
Or would it better to stick with a more standard relay?
https://smile.amazon.com/Channel-Module-Arduino-Raspberry-K49/dp/B01BACQF1Y/ref=sr_1_8?crid=2PRRFTS23SWX6&keywords=relay+switch+raspberry+pi&qid=1554587369&s=gateway&sprefix=relay+switch+rasp%2Caps%2C232&sr=8-8

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,584
  • Kudos: 50
Re: How to control a basic battery powered prop?
« Reply #11 on: April 07, 2019, 08:43:13 AM »
The problem with the hat type devices is in many cases the builders of them assume that you will be dedicating the PI to whatever their hat does.  They also offer no flexibility.  In this case, it will cover all of the GPIO pins, preventing you from using other pins for things like input triggers, other relay boards, or even controlling some nodes directly if needed.  Another issue I see is the GPIO ports that this devices uses.  It appears to be connected to ports 3,7, 22,and 25 and I don't believe that ports 3 or 7 are available for use in FPP.  I know that they are not available in FPP 1.X and I don't see why that would change in ver 2.X which would render the two relays connected to these ports useless.


The other 4 relay board is really the better way to go.  It only requires 6 leads to fully connect it to the PI and they are pretty easy to set up.  You can order the jumper leads from Amazon as well and the link to them is in the "usually bought together" section of the page.  This setup gives you the flexibility to connect to whatever GPIO channels that you want and leaves the remaining GPIO pins open for any other uses that may come up.  If you have issues with the PI powering the board, these boards allow the relays to be powered from a separate 5V supply. 

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,836
  • Kudos: 214
Re: How to control a basic battery powered prop?
« Reply #12 on: April 08, 2019, 10:37:13 AM »
It appears to be connected to ports 3,7, 22,and 25 and I don't believe that ports 3 or 7 are available for use in FPP.  I know that they are not available in FPP 1.X and I don't see why that would change in ver 2.X which would render the two relays connected to these ports useless.

Just a little background on this.  GPIO 3 and 7 aren't allowed by default in FPP's GPIO Channel Output because those are used for i2c and SPI.  These could be disabled, but it isn't something we wanted to do in the default FPP image.
-
Chris

Offline Reys Dad

  • Jr. Member
  • **
  • Join Date: May 2018
  • Location: SJC
  • Posts: 57
  • Kudos: 1
Re: How to control a basic battery powered prop?
« Reply #13 on: April 10, 2019, 10:11:28 PM »
FPP can already do this, no need for any scripts.  Just go into Input/Output Setup and then into Channel outputs.  On that screen select the other tab and press the add button.  In the selection box that will appear you can select GPIO and configure the entry for the GPIO pin being used and the channel it will respond to.  Make sure to check the inverse check box as well and you should be good to go.  Add a separate entry for each channel and GPIO pin being used.  The channels do not have to be consecutive.
I was trying to work on this tonight and I can set the channel in FPP but don't I need to assign that channel to a universe so this will communicate back to xlights or does this work with some other protocol? Kind of confused on this point

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,389
  • Kudos: 43
Re: How to control a basic battery powered prop?
« Reply #14 on: April 11, 2019, 06:10:56 AM »
I was trying to work on this tonight and I can set the channel in FPP but don't I need to assign that channel to a universe so this will communicate back to xlights or does this work with some other protocol? Kind of confused on this point


The Channel Inputs screen (under FPP Input/Output Setup) is where you map incoming Universes to FPP channels
-Mark

 

Back to top