Answered FPP Pi3 GPIO to control a relay

Grant Astley

New elf
Joined
Oct 11, 2017
Messages
24
Location
Dubbo NSW
Hi All
I have searched the net for a few days now looking for a way to use one of the GPIO outputs of the FPP running on a Raspberry Pi 3 board to control a relay which will be used to turn on and off the 240Vac lights. I need no clarification, etc on the physical connection of the relay or what is required to control 240Vac, qualified sparky :)
I am just after help on how to set up the control of this pin on the Pi
- One article showed a script called GPIO output on.sh however this is not available anymore? It required installing the script and then setting up an event to call the script and using the scheduler to control the event, I like this idea as the 240V lights can be turned off during some sequences and on during other.
- Another one said it was as simple as setting up a channel output as Other and scheduling it as you do other lights? As I use a F16V3 to control all of my digital pixels which is connected to the Pi via ethernet E131, I would assume that the Pi needs to be set up as a controller in the scheduling software for this to occur? Any odea how to do this? I am currently using Vixen for this.

If anyone has any info / ideas on this it would be greatly appreciated.

Cheers
Grant Astley
 

Chris_Mas

New elf
Joined
Dec 14, 2018
Messages
25
Hi Grant,

First off, note the Rpi GPIO pins you are using for the relays.

For Example Relay1 = GPIO13, Relay2 = GPIO6, Relay3 = GPIO5 etc.
Then in FPP, map the first GPIO Output type to StartCh=1 and set this GPIO13.

Proceed with the other relays.
RpiRelay4PNG.png
You may note that I selected Invert since my relays are toggle on when High (or vice versa, I can't remember :rolleyes:)



In Vixen, create Elements for the number of relays, then patch these to Generic Serial ports
The Generic Serial Ports references Channel 1,2 and 3 in FPP.
Likewise, the Elements, allows you to create your Vixen sequence and know which Relay to activate in your sequence design.

Vixen1.PNG


In the Vixen sequence editor, set the Color gradient to High or Low.
For example, Ive used the Alternating effect and set the color White to be HIGH and Black to LOW.
You change the gradients by moving the gradient bar High or Low as shown in red and yellow.
This will signal the appropriate On / Off triggers within FPP.
Hope that helps.

Vixen3.PNG
 
Last edited:

Grant Astley

New elf
Joined
Oct 11, 2017
Messages
24
Location
Dubbo NSW
Hi Chris

Thank you for this detailed explanation. I have now got the GPIO pins to operate a relay.
Much appreciated.

Cheers
Grant
 
Top