News:

LATEST RELEASE:  FPP 8.5.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.5

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16895
Latest: Chriotjuh
New This Month: 11
New This Week: 5
New Today: 1
Stats
Total Posts: 135480
Total Topics: 16986
Most Online Today: 103
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 2
Guests: 68
Total: 70

Question regarding multiple GPIO boards

Started by jasp3r, November 02, 2019, 09:27:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jasp3r

I have a simple question that most likely will not have a simple answer but there is so much information on this and other sites that it is almost sensory overload when trying to figure out how to do this.

What is the best or maybe I should say easiest way to add more than 16 SSR relays to Falcon player running on a Pi?

Currently for the past several years I have run 16 SSR per Pi but in order to get to 32 GPIO I had to setup 16 more on another PI and set one as master and the other as slave.  While it worked one thing I noticed is that they seem to get slightly out of sync from time to time.  The SSR we are using are the 8 channel SainSmart SSR boards.

Last year I added in a F16V3 Pixel Controller to begin playing with RGB lights.  We added in a simple row just to learn.

What I would like to do is run all 32 GPIO channels from one Pi but as we know by default the Pi can only run 16.  I purchased an IO Pi Plus from https://www.abelectronics.co.uk/p/54/io-pi-plus but honestly I simply cannot figure out how to make it work with falcon player so I am thinking there are probably better ways to go about doing this.

I am open to any newer/better options to accomplish this so any feedback would be greatly appreciated.

Over all goal for this year is to run 32 GPIO channles along with my 1 string of RGB using my F16V3 all from 1 Rasp Pi if possible. 

Thanks in advance from anyone willing to help me figure this out.
KJ

nickd

I am not familiar with the IO Pi Plus board, but it should be easy.  In Falcon Player, (note you need version 3.3 or higher) under other channels outputs, there is a output called MCP23017.  This board looks like it has 2 of those chips on it, so you will add two "MCO23017" outputs.  According to what I found online, the default address for each chips are IC1 = 0x20 and IC2 = 0x21.  So when you are done, there should be two lines, each a MCP23017 output, one with address 0x20 and the other with 0x21.

If you are using just one 1 string, I would use the Pi to directly control the string and save the F16v3 until you need more strings.  Will be less to have to setup.

jasp3r

Interesting.  I have the Pi built with this on top and the latest falcon player installed so let me take a look and report back.  I might not be able to reply about this for a couple days but I will reply and hopefully I can get this working with everyone's help.

jasp3r

Ok I attempted to do what was suggested however it did not work.  

This got me to testing a few new items and there appears to be a bigger issue at hand and I think it has to do with the Pi 3B+ and here is why I say this.

I have been running 2 controllers for the past 3  years with a couple Pis.  These were the Pi 3.  They were running versions 1.8 and 2.4

I have not touched then and I do not plan on it until I can get this figured out but none the less it wasn't like there was much to setting them up.  Plug in the SainSmart relay with the 5v, Gnd, GPIO pins.  Go into FPP to Outputs, Other, add in the GPIO, match the GPIO to the port.  

This is something I did multiple times in the past with no issue at all until this year.

I was testing this IO board and simply could't make it work so I thought well I better make sure the relay board I have works.  So I removed the IO and ran directly off Pi and it doesnt work like it used to.  When hook it up and map the GPIO and hit save as soon as FPP restarts all the relays turn on.  In the past if that was the case you go back through and INVERT them all which I did but nothing happened.  In the past if you uncheck active the GPIO would turn the relay off.  I tried this and still nothing happened.

So I thought maybe I have something wrong with my Pi.  I took another one out of its box and started it up.  Tested the same way and got the same results.  So I tried another relay board which was brand new and still the same results.

I simply cannot make GPIO work in any form.  The only thing I can think of is these Pis are newer and maybe something is different than my older ones.

Does anyone have any ideas as to what may be happening?

jasp3r

Just to give a little more of an update.  The Pi and the relay board themselves work.

I installed raspian on the pi and tested a simply Python script to see if the relays would work and they turned on and off without issue.  

#!/usr/bin/env python

import time

import RPi.GPIO as GPIO


GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
GPIO.output(17, GPIO.LOW)

time.sleep(1)

GPIO.output(17, GPIO.HIGH)
GPIO.cleanup()


The relay on GPIO 17 turns on for 1 second and back off afterwards.

There has to be something wrong with GPIO Outputs in FPP with the 3B+ 

I am going to download an older version just to see if it work to know whether or not this issue is with the Pi or if the issue is with FPP and the 3B+ board.

nickd

I would double check 2 things: 

  • To use the same output pin as your script, make sure in FPP you are using the line for BCM 17/WiringPI 0/Pin 7
  • Make sure the enabled box for that output line is checked.  This has tripped me up before.

jasp3r

I did exactly that.

I now have the latest version of FPP running.  I do not have any GPIO outputs configured so I thought I would test the GPIO-On.sh script and the GPIO-Off.sh scripts to see if I could turn on and off a single relay.

I updated the script to turn on GPIO 17 and ran it.

The Relay turns on.
I run the GPIO-Off script and it does not turn off.

If I manually run the command sudo /opt/fpp/src/fpp -g 17 Output 0 the relay turns on but if I run sudo /opt/fpp/src/fpp -g 17 Output 0 it will not turn off.  I can change the GPIO to any of the ones connected and I can turn them on but not off so this is acting exactly the same as FPP when I configure the outputs.  They turn on but never turn off.

Thoughts?
KJ

jasp3r

Ok after getting a plain Pi3 I was able to get GPIO working. Not sure what was up with the GPIO on the other.  May have been the board or maybe the verison of FPP but either way it is working now.  I have 16 GPIO working with 2 SSR 8 port.

I however was still unable to make the IO Plus work with FPP.  In fact as soon as you add the MCP23017 as OTHER output and enable it the regular GPIO stop working.  I tried every combination I could to make it work but in the end I removed it from the Pi.  At this point I am just going to give up on it unless anyone else on this site has ever gotten it working.  It really would be nice to run 32 channels off a single Pi but I can work around the issue for now and then look at getting something else for next year.

nickd

I just tested my 3B+ Board with FPP 3.4. 

  • No outputs configured
  • sudo /opt/fpp/src/fpp -g 17 Output 0, measured output 0V
  • sudo /opt/fpp/src/fpp -g 17 Output 1, measured output 3.3V
  • sudo /opt/fpp/src/fpp -g 17 Output 0, measured output 0V

I would double check your other board with a meter, maybe measure the resistance between GPIO 17 and GND when output is set to 0.

As for the MCP23017, FPP is crashing when it tries to setup that output.  So there is a bug there, I made a change to the code in 3.3, so it is probably that.  I will go take a look at it and get it fixed.

nickd

I tracked down the problem.  Can you do a quick test?  After you configure/add the MCP23017 output in the web interface, can you edit the co-other.json file?  It is stored under ~/media/config.

The address is being saved as a string while FPP is expecting an int.  You need to remove the quotes around the address.  Change the following output:
{                                                                                                                                                                                                                  
        "channelOutputs": [                                                                                                                                                                                       
                {                                                                                                                                                                                                 
                        "enabled": 1,                                                                                                                                                                             
                        "type": "MCP23017",                                                                                                                                                                       
                        "startChannel": 1,                                                                                                                                                                        
                        "channelCount": 16,                                                                                                                                                                       
                        "device": "i2c-1",                                                                                                                                                                        
                        "deviceID": "32"

                        "deviceID": 32 

                                                                                                                                                                          
                }                                                                                                                                                                                                 
        ]                                                                                                                                                                                                         
}


After you save the file, you will need to start/restart FPP.  If you confirm this fixes your problem, I will submit a fix.

nickd

Dan just released 3.5.1 which includes the fix this (thanks for fixing Dan).  I would upgrade to that version and see if your board works now.

dkulp

Quote from: nickd on November 11, 2019, 05:38:03 PMDan just released 3.5.1 which includes the fix this (thanks for fixing Dan).  I would upgrade to that version and see if your board works now.

Thanks for doing the investigation.... once you figured that out, the fix was quick and simple.  :)
Daniel Kulp - https://kulplights.com

sirGnano

Sorry to revive such an old post but I'm having trouble getting my IO Pi Plus channels to work on a similar setup. I've always used 16 channel but I would like to increase to 24 this year. I'm unable to get any GPIO output from the IO Pi Plus so I'm guessing my channel output mapping isn't correct.

You cannot view this attachment.

Support FPP

+- Recent Topics

F16V5 and SRx1 v5 by jkp
Today at 07:19:44 AM

WS2811, Raspberry Pi 5, GPIO, could not initialize. by Ulysse-srfc24
Today at 04:36:33 AM

Differential Board: PSU & Enclosure by hakko808
March 14, 2025, 09:17:01 AM

Backup Feature not functional by Jradical
March 13, 2025, 05:59:28 AM

FPP 8.4 Back up by Jradical
March 13, 2025, 05:38:18 AM

FPP on Pi5 won't start with "FPPD boot delay" set to 2 min or higher by dnapier65
March 12, 2025, 05:39:00 PM

OBJ File in Sketchup by dspenman
March 11, 2025, 09:19:08 AM

K2-Pi-Servo - xLights Visulizer by dkulp
March 06, 2025, 09:20:30 AM

DIYLIGHTANIMATION shutting down Feb 28, 2023 by jnealand
March 02, 2025, 10:58:12 AM

configure FPP with RS485 to drive pixels? by dkulp
March 02, 2025, 08:13:06 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod