Author Topic: GPIO Output  (Read 404 times)

Offline svatech

  • Newbie
  • *
  • Join Date: Oct 2018
  • Location:
  • Posts: 4
  • Kudos: 0
GPIO Output
« on: October 31, 2018, 10:21:33 AM »
I am a noob at this and this is my first year with a musical display. I don't have any LED Pixels. i simply want to use the GPIO pins on my pi 3+ to drive 16 relays to turn dumb strings on and off. I've tried everything i can find on the internet and i can't seem to make it work. when i activate the outputs and reboot it all the relays turn on but thats all it does.

Offline jediosu

  • Newbie
  • *
  • Join Date: Oct 2017
  • Location: Ohio
  • Posts: 26
  • Kudos: 1
Re: GPIO Output
« Reply #1 on: October 31, 2018, 10:40:22 AM »
Can you post a picture of your output screen showing what channels you have mapped to what GPIO pins and a picture of your PI with the pins connected? In my experience its usually an issue with the pins being mapped wrong on the pi.

Offline svatech

  • Newbie
  • *
  • Join Date: Oct 2018
  • Location:
  • Posts: 4
  • Kudos: 0
Re: GPIO Output
« Reply #2 on: October 31, 2018, 10:46:10 AM »
Here are pictures of my output and the pi itself

Offline JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 5,058
  • Kudos: 116
    • Granbury Christmas Lights
Re: GPIO Output
« Reply #3 on: October 31, 2018, 10:49:39 AM »
I am a noob at this and this is my first year with a musical display. I don't have any LED Pixels. i simply want to use the GPIO pins on my pi 3+ to drive 16 relays to turn dumb strings on and off. I've tried everything i can find on the internet and i can't seem to make it work. when i activate the outputs and reboot it all the relays turn on but thats all it does.

The GPIO output voltages are only 3.3volts and not very high current capability. They may not be enough to trigger your Relays from Open to Closed.

Too late for Halloween but my preference would be to get a pair of USB controlled Relay boards (8 relays per board) from http://www.icstation.com

They control as simple DMX channels, 1 thru 16 (if you define them that way)


Offline JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 5,058
  • Kudos: 116
    • Granbury Christmas Lights
Re: GPIO Output
« Reply #4 on: October 31, 2018, 10:52:15 AM »
OK, looking at your picture - are any of the Relays changing state? (clicking like crazy) ??

Because you should have 2 wires coming off of each relay. One on the "middle" and one on either Open or Close.

I only see 2 wires on a single relay.

Plus - all your start channels are 1.  They are all going to trigger at the same time. Shouldn't they be 1 through 16?

Offline svatech

  • Newbie
  • *
  • Join Date: Oct 2018
  • Location:
  • Posts: 4
  • Kudos: 0
Re: GPIO Output
« Reply #5 on: October 31, 2018, 10:53:11 AM »
I would agree with you but when it boots up the relays are off and when it finishes they turn on

Sent from my SM-G960U using Tapatalk


Offline JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 5,058
  • Kudos: 116
    • Granbury Christmas Lights
Re: GPIO Output
« Reply #6 on: October 31, 2018, 10:57:11 AM »
My 4 relay ICSTATION boards all "energize" the relays when power is applied but no DMX output is telling them to change state.

For mine, sending an ON value (usually 255) actually turns the Relay OFF.

When nothing is sent (value of 0) the Relay turns ON.

Seems backwards but that's just how it is.

Offline svatech

  • Newbie
  • *
  • Join Date: Oct 2018
  • Location:
  • Posts: 4
  • Kudos: 0
Re: GPIO Output
« Reply #7 on: October 31, 2018, 11:03:58 AM »
nevermind the relays arent being triggered because the voltage isnt high enough.  forgive my stupidity.

Offline JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 5,058
  • Kudos: 116
    • Granbury Christmas Lights
Re: GPIO Output
« Reply #8 on: October 31, 2018, 11:21:28 AM »
A set of "buffering" chips can be used to raise the 3.3v up to 5vdc.

It is the same circuit used on the PiCaps to drive WS2811 pixels that need a 5vdc output for their data.

Assuming that is the Sainsmart 16 relay board, looks like you'd need to buffer up to 12vdc for the trigger.

Offline Matt

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 1
  • Kudos: 0
Re: GPIO Output
« Reply #9 on: November 10, 2018, 08:41:42 AM »
Late to the party but I had the same issue.  I bought these: https://www.adafruit.com/product/395 for my setup, and now have a 12v powered 16 channel relay board being turned on and off from the gpio pins on the Pi. 

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,556
  • Kudos: 46
Re: GPIO Output
« Reply #10 on: November 19, 2018, 04:13:44 PM »
Being way late to the party, there are a few things I would change.  The first is to alter your configuration to not have every relay operating on channel 1 unless you really want every relay to operate from the same channel.  The second and more important thing is to NOT power all of the relays from the PI.  It really doesn't have enough power available to power 16 relays.  This board should have both a VCC and a JD-VCC input and most have a separate 3 pin connector with a jumper between the VCC and JD-VCC pins somewhere on the board.  If so, then to power the relays separately, you would remove that jumper and connect a separate 5V power supply to the JD-VCC and ground pins on that connector.  Never put that jumper between the VCC and ground as that shorts out the board.  Many see this as a jumper that is used to select something but that is not what it is here.  It is just an easy way to connect the VCC and JV-VCC to the same power source.  As for the VCC connection, there should be two of them, one at the 3 pin connection and the other with the GPIO inputs.  You can use either one and connect that to one of the 5V pins on the PI's GPIO connector.  These boards use a ground to trigger the relays which is why you are setting the GPIO output to inverse so the GPIO trigger pins supply the grounds for the triggers, IOW, do not connect the ground pin on the relay board to any of the ground pins on the PI's GPIO.  That ground connection is just a second ground connection for the relay coils and is provided for use when the PI is supplying power for the triggers and relays and is not needed or used by the triggers. 

Offline Adbrig4

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 8
  • Kudos: 0
Re: GPIO Output
« Reply #11 on: November 28, 2018, 11:11:25 PM »
Hello, has anyone had anyluck using one of these type relay boards with the Falcon player software? Im trying to build a small setup with a Sainsmart 8 channel relay board  to start out with.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,483
  • Kudos: 191
Re: GPIO Output
« Reply #12 on: November 28, 2018, 11:40:12 PM »
If the relays are on when the value in the channel is 0 or there is no sequence running, then you may need to turn on the 'invert' option on your GPIO Channel Outputs.  A lot of these relay boards are active-low, so FPP needs to send out an inverted output turning the GPIO on to turn the relay off and turning the GPIO off to allow the relay to turn back on.
-
Chris

Offline tbone321

  • Hero Member
  • *****
  • Join Date: Oct 2014
  • Location:
  • Posts: 1,556
  • Kudos: 46
Re: GPIO Output
« Reply #13 on: November 28, 2018, 11:41:29 PM »
Yep, used one to control the animatronics for my Halloween display,  I set up a remote PI with ver 1,11 of FPP controlling an 8 relay board.  I used a separate 5V power supply to power the relay board and the PI to trigger the relays.  You really need a separate power supply for the board because the PI really doesn't have enough reserve power to trigger all 8 relays and run its processor at the same time.  When you configure the GPIO outputs for each relay, Make sure that you select the inverse option for each output because these relay channels are activated by grounding the trigger and that's what the inverse option does.  Also make sure to have a diagram of the GPIO pins available to make sure that you are connecting to the correct ones,  You will need one of the 5V pins and the GPIO outputs that you want to use.  The ground pins on the PI are not used since the output pins will be supplying the grounds when triggered.

Offline Adbrig4

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 8
  • Kudos: 0
Re: GPIO Output
« Reply #14 on: November 29, 2018, 06:32:22 AM »
Ok, thanks. Do I need to have programming in the Pi to test the relay board? Ive tried the channel test but I cant get it to do anything. Im using just one Pi as a stand-alone unit it that possible?

 

Back to top