PDA

View Full Version : FPP Help flip flop the on/off for channel



JonnyBeardLighting
08-20-2016, 12:26 AM
So I'm running ras pi with FPP and 8 channel relay though the gpio pins. It's configured in the "other" tab in the browser. Everything works fine except the fact that when its on the light should be off. And when it's off the lights should be on. It's like it's a negative picture. Is there a way to flop it. Thanks a lot your the best

Should the lights on the relays be on when you power it up

Barnabybear
08-20-2016, 06:31 AM
Hi, I think in FPP V1.7 they added an option to invert the GPIO outputs. I haven't upgraded to that version yet so I can’t help you with where to find it, but I’m pretty sure that will do the trick.

jnealand
08-20-2016, 10:48 AM
I'm probably not understanding all this, but with a relay can't you just swap the input leads.

Barnabybear
08-20-2016, 12:29 PM
I'm probably not understanding all this, but with a relay can't you just swap the input leads.
Hi, not with a lot of the relay boards for Raspi, Arduino etc. One side of all the relays (in reality opto-couplers) is connected to Vcc 3.3 or 5V so the only bit broken out you can switch is the connection to ground for each relay. If you connect them to your micro controller, switching the output high (which most would consider 'on') just connects both side to 3.3 or 5V and nothing happens. Switching the output low connects the relay circuit to Ground completes the circuit and the relay switches on (what is happening in this case). Unfortunatly this means the output is inverted as compaired to normal thinking.
It appears a bit silly do it this way, but it means open drain outputs can be used which are generaly cheaper and can handle more load i.e. a simple on off switch within the IC that ether shorts to ground or is open circuit. It is easier to controll FETs to switch higher voltages with this setup as well.

There is an 8 channel example just over 1/2 way down this page (http://arduino-info.wikispaces.com/ArduinoPower) if anyone wants to do some more reading.

JonnyBeardLighting
08-20-2016, 08:22 PM
Ok so was playing with it and discover that I did end up wire it wrong. I swopped the wires and it works great now. Thanks for your help


Sent from my iPad using Tapatalk