Author Topic: Raspberry Pi GPIO output direct to SSR board  (Read 12253 times)

Offline sbmcdaniel

  • Newbie
  • *
  • Join Date: Nov 2014
  • Location: Palatka, FL
  • Posts: 3
  • Kudos: 0
Raspberry Pi GPIO output direct to SSR board
« on: November 22, 2014, 02:30:20 PM »
Hello everyone. (yes, new guy - first post) :D

I am attempting to drive relays directly from the Pi's GPIO pins. I know it is simple, but that is what I am attempting to do. I have scoured the internet for information on every resource I know of. I have successfully used Vixen 2 to make a test sequence which works with an Arduino and 8 channel SSR board. When using xLights to convert this sequence, I cannot get it to work with FPP. I am certain this has everything to do with driving a channel directly, instead of driving through an external board and associated protocol. I have setup the outputs in FPP to use GPIO and nothing works. I have tried to build a sequence in xLights/nutcracker but have been unsuccessful as I cannot find a way to link the outputs to the GPIO directly (only setup choices are USB type or E1.31 type) I have searched the forums here for GPIO output and other related searches but have come up empty handed. Any input?

/r,
Brian

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #1 on: November 22, 2014, 08:15:10 PM »
Are you using the right pins for the BCM GPIO pins you have configured in the channel output screen?  There is a table in the help for that screen which lists the BCM (chip) pin to Pi header pin numbers.  Press F1 or click the link at the top right of the page under the menu.
-
Chris

Offline sbmcdaniel

  • Newbie
  • *
  • Join Date: Nov 2014
  • Location: Palatka, FL
  • Posts: 3
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #2 on: November 22, 2014, 08:45:39 PM »
Yes, I have configured the correct pins. I have also ensured that they were set to "active".

Thanks for the response, I will continue to dig. I believe my problem originates from the sequence. I assumed the Pi would correlate the correct output based on channel number alone. I may have an issue with the setup within xLights, when making the conversion.

Offline sbmcdaniel

  • Newbie
  • *
  • Join Date: Nov 2014
  • Location: Palatka, FL
  • Posts: 3
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #3 on: November 22, 2014, 09:42:53 PM »
Figured it out. I had to configure the xLights setup before making the conversion from .vix to .fseq. When xLights setup was blank, the .fseq file was created but xLights would crash to the desktop. After setting up a fake E1.31 device with 8 channels, using multicast, it would convert fine. All is well. Vixen > xLights > FPP > Pi B+ GPIO > 8 Ch SSR, works like a charm.

 :)

Brian

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #4 on: November 22, 2014, 09:50:02 PM »
Great, thanks for reporting back.

Offline viperbe

  • Newbie
  • *
  • Join Date: Oct 2015
  • Location:
  • Posts: 5
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #5 on: October 06, 2015, 12:00:00 PM »
Figured it out. I had to configure the xLights setup before making the conversion from .vix to .fseq. When xLights setup was blank, the .fseq file was created but xLights would crash to the desktop. After setting up a fake E1.31 device with 8 channels, using multicast, it would convert fine. All is well. Vixen > xLights > FPP > Pi B+ GPIO > 8 Ch SSR, works like a charm.

 :)

Brian

Would you be willing to share your config? this is what im looking to do.

I am new to Xlights, Is there a way to configure Xlights for GPIO direct output on the pi? if so can someone point me in the right direction? I tried to search but didnt find anything.
I did find the Xlights to pi conversion but i was wondering how to setup on windows to do all my work on windows first then import on the pi ..

Can someone help me out and get me started on the config for GPIO 0-7

I was looking at also vixen 3 at doing the same thing or Vixen > Xlights conversion would that be possible? Either way does anyone have a guide to setup vixen or xlights to go directly to GPIO from PI?

Offline uzelessknowledge

  • Hero Member
  • *****
  • Join Date: Jan 2015
  • Location: Alabaster, AL
  • Posts: 558
  • Kudos: 2
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #6 on: October 06, 2015, 02:51:12 PM »

Figured it out. I had to configure the xLights setup before making the conversion from .vix to .fseq. When xLights setup was blank, the .fseq file was created but xLights would crash to the desktop. After setting up a fake E1.31 device with 8 channels, using multicast, it would convert fine. All is well. Vixen > xLights > FPP > Pi B+ GPIO > 8 Ch SSR, works like a charm.

 :)

Brian

I'm interested to knowing how you did this as well. Using an SSR gives me some ideas.


Travis
Sent from my iPhone using Tapatalk

Offline viperbe

  • Newbie
  • *
  • Join Date: Oct 2015
  • Location:
  • Posts: 5
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #7 on: October 06, 2015, 02:55:53 PM »
http://doityourselfchristmas.com/forums/showthread.php?36545-Falcon-Player-Installation-Instructions

What you want to do is download all the predefined events for the pi. Configure the events to trigger with the GPIO nubers of your desire. This is all done via the FPP web interface.

Offline burntwood

  • Newbie
  • *
  • Join Date: Nov 2015
  • Location:
  • Posts: 1
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #8 on: November 11, 2015, 08:19:22 PM »
I'm with uzelessknowledge... I have the info on how to setup FPP on the Raspberry Pi (http://doityourselfchristmas.com/forums/showthread.php?36545-Falcon-Player-Installation-Instructions), but curious about the specific details on getting the Vixen3 sequences to the FPP to work with GPIO's.
When I export the Vixen3 show to CSV, I can see that the channels are dimming (0-255). But when I export it to FPP, it's only turning the lights on/off.

Currently using:
* Design shows/sequences built with Vixen3
* Raspberry Pi B+ talking to 8x8 (64 channels) SainSmart SSR boards with the random cross relays (202PL)

I used an Arduino Mega last year (32 channels and dimming worked), but it's not going to scale as the show grows.

So any help would be greatly appreciated!

Thanks!

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #9 on: November 11, 2015, 09:08:22 PM »
FPP's GPIO outputs only currently support on/off, any non-zero value is on and zero is off.  We might be able to support dimming in the future using the wiringPi library's PWM support but I haven't looked into that at all really.

Offline bzzbee2

  • Newbie
  • *
  • Join Date: Nov 2015
  • Location:
  • Posts: 5
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #10 on: November 12, 2015, 11:08:33 AM »
I am looking at doing a similar setup to control lights in my office.  We have a Christmas Cube Decorating contest every year.   I was thinking of doing wall to wall lights to music.  Simple on/off of the lights to the music is what I am trying to do.   Do you have any photos of your setup that you could share so I could have a better understanding of what I am getting myself into?  8 Channels through a SSR should be plenty for my cubicle.

Thanks,

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #11 on: November 12, 2015, 11:27:50 AM »
Will simple PWM work to give you dimming ability?  I think that it would be easy to modify FPP to support optionally using PWM on a GPIO output instead of basic on/off control.

In regards to the Vixen3 question.  The GPIO outputs are treated like any other channel output in FPP.  Your sequencer doesn't need to know what kind of controllers are behind those channels, it just needs to know that you want 'X' channels.  Then FPP maps those channels onto the outputs you configure in FPP's Channel Output screen.  In xLights, you can use an E1.31 controller as a placeholder or a 'Null' controller.  It will vary sequencer to sequencer, but unless you are trying to also use your sequencer to drive lights directly then the controller setup in the sequencer doesn't have to be exact.  If you are using Vixen3 or Vixen+ then you can export directly to a .fseq file and don't need to use xLights to convert to .fseq.

Offline oceanwanderlust

  • Newbie
  • *
  • Join Date: Sep 2015
  • Location:
  • Posts: 49
  • Kudos: -1
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #12 on: November 24, 2015, 10:07:57 PM »
I put some details of my GPIO/Relay setup in (humbly)Showing Off to help everyone else get started:

http://falconchristmas.com/forum/index.php/topic,3545.0.html

PWM (dimming) on GPIO would allow me to connect a strip or two of RGB lights (with a MOSFET). How many ports do you think you could accurately PWM in software without bogging the Pi down?

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #13 on: November 24, 2015, 10:30:33 PM »
I put some details of my GPIO/Relay setup in (humbly)Showing Off to help everyone else get started:

http://falconchristmas.com/forum/index.php/topic,3545.0.html

PWM (dimming) on GPIO would allow me to connect a strip or two of RGB lights (with a MOSFET). How many ports do you think you could accurately PWM in software without bogging the Pi down?

According to the wiringPi Software PWM page, doing software PWM on a GPIO pin only takes 0.5% CPU, so we could drive quite a few pins without a lot of CPU.

https://projects.drogon.net/raspberry-pi/wiringpi/software-pwm-library/

I need to spend some time looking at that page and mulling it over, but if I read it correctly, we should be able to bump the range up to 255 which would still keep the maximum update frequency at almost 40hz so we should be able to play a 50ms sequence updating the PWM range every 50ms.

I think it would be easy to implement as a checkbox in the current GPIO channel output.  If the 'PWM' checkbox is checked, we call softPwmCreate() when set initialize and then instead of calling digitalWrite() for new channel values, we instead call softPwmWrite() to change the value.

Offline powerfix

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 14
  • Kudos: 0
Re: Raspberry Pi GPIO output direct to SSR board
« Reply #14 on: December 16, 2015, 03:59:44 AM »
I would be in someones gratitude if this became a reality.

The other thing that would make my year is if the GPIO ports from expanders could be used/mapped - this is the one I have providing 32 GPIOs -  https://www.abelectronics.co.uk/products/3/Raspberry-Pi/18/IO-Pi

I'm going to pull the code and have a look, but if someone could point me in the right direction, it would be greatly appreciated.

 

Back to top