OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Cannot identify GPIO pins for stations

Tagged: ,

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #36971

    roydon
    Participant

    I tested v1.4 OSPi on a PI v1 and Pi 2 (model B) and only 1 IO pin (pin13) on the RPi board seems to react to the stations turning on/off.  When station 1 is on, then pin13 changes voltage, but nothing happens on ANY other pins when stations 2/3/4/5 activate.  Does any one else have this issue, and if so, what am I missing ?  I would have expected each station to cause a different IO pin to change voltage, but so far only station 1 seems to affect any of the IO pins (again, station 1 drives pin13).  Any help would be MUCH appreciated !!

    #36974

    Ray
    Keymaster

    OSPi uses a shift register to drive the solenoids, not direct GPIO pins. The shift register itself uses 4 GPIO pins.

    #36986

    Michael
    Participant

    Could you list those? I’m interested in which GPIO pins I can use for different applications.

    #36988

    Samer
    Keymaster

    This is documented in the user manual: http://rayshobby.net/docs/ospi14_manual.pdf

    #36999

    roydon
    Participant

    OK, I was hoping to use a regular relay board instead of the OSPi add-on (as I can’t get the OSPi add-on in South Africa).  If the app uses a shift register, then I’ll have to just control the GPIO directly via some scripts rather than using the OpenSprinkler software.  Great job in designing such an awesome tool, but in my case I’ll have to find another way.  Thanks for replying on this forum so rapidly !

    #37014

    Joshua Leasure
    Participant

    The sprinklers_pi script supports using the RPi’s pins directly by changing the Output option.

    https://github.com/rszimm/sprinklers_pi/wiki/Configuration

    #37031

    roydon
    Participant

    Awesome, I’ll give this a go then !

    #37037

    Dan in CA
    Participant

    The Python Interval program has a plugin specifically for using relay boards.

    https://github.com/KanyonKris/sprinkler-weather/wiki/relay_board-Documentation

     

    Dan

    #37103

    roydon
    Participant

    I’m losing a bit of faith in using a PI as a sprinkler controller.  I tried the sprinklers_pi application that was pre-installed on the OSPi SD card, but no matter what I set the GPIO settings to (direct positive or negative) I couldn’t get ANY of the GPIO pins to react at all when I activated a sprinkler.  In fact, I set the application to Direct Negative (meaning all the GPIO pins should have been ON when no zones were active), and not a single GPIO pin was active (I tested all with a LED).  If anyone has got sprinklers_pi to work, please let me know how, as from what I see thus far, it does nothing.

    #37111

    Ray
    Keymaster

    Well, I honestly have no idea. I know for sure the sprinklers_pi program works with OSPi’s shift register. I have never tested it with direct GPIO outputs. The source code is all there, so perhaps you can add some debugging code to help find out what’s happening. By the way, make sure you are running the program with root permission — GPIO operations require root permission.

    #37119

    Dale March
    Participant

    You can see in the attached PNG how to use the serial shift register. This diagram is for a 16 ch relay card. just use half for 8 relay card.

    Dale

    Attachments:
    #37140

    roydon
    Participant

    Does anyone know if there is a way to get the interval application to use the GPIO directly rather than using a shift register ?  Given that there isn’t any issue using 8 GPIO pins on the Pi (as there is no shortage of GPIO) I’d like to see if I can get that working rather than trying to integrate a shift register into the wiring of my relay board (which is an off-the-shelf 8 relay board off Amazon).

    #37141

    KanyonKris
    Participant

    As Dan in CA said, there is a plugin for the interval program to directly turn GPIO pins on and off.

    https://github.com/KanyonKris/relay_board/wiki

    I have a small collection of relay boards, active high and low and they all work with the RasPi. Some are better than others, see the link for more info. I have driven a relay board with both ospi.py and sprinkler_pi.

    You say you tested GPIOs with an LED, I hope you used a current limiting resistor. The RasPi GPIOs are somewhat fragile and easy to burn out. The opto-isolated relay boards I have used have all worked fine.

    #37147

    roydon
    Participant

    Kris (and Dan), I am clearly guilty of seeing Dan’s original post and not really absorbing what he was saying.  I’ll have a look and definitely give it a go ASAP.  Thanks !

    #37149

    roydon
    Participant

    Kris/Dan, you guys are legends.  My LED is working like a dream using the plugin with direct GPIO control happening for each sprinkler station.  Thanks to you I also had to work out how to update my version of OSPi, which was seamless as well.  The plugin manager worked perfectly and I now have the exact system I was hoping for.  Thanks guys (+ Ray from OpenSprinkler) and keep up the awesome work !

    #39175

    jay
    Participant

    I’m trying to do the same project. Do you mind sharing how you wired your pi to 8 channel relay. I have seen may diagrams and none of them work for me. I was doing a direct connection from by to relay. I think I have to use an external power for the relay since my pi is not strong enough to power my relay. Because the relay would just flutter while booting. I’ll tackle the software side later on I just need to get my relay working properly

    #43571

    kimbhoot
    Participant

    Can roydon or anybody share their secret to get this to work? Working on a similar setup and could use some help as some of these are foreign to me. I have loaded the sd card image with ospi and it’s up and running. Have a pi Model B and a 4 port relay. All connected and just need a way to enable/activate the GPIO pins from opensprinkler.

    Thanks and much appreciated.

    #43575

    roydon
    Participant

    There is a plugin called ‘relay board’. Enable that, and then open sprinkler simply turns the IO pins on and off. Each IO pin can be used with each relay on the board, so that’s your sprinkler control (I’m assuming you know how a relay works, and how a relay can be used to connect the 12v power supply that drives each valve).

    #43641

    Ray
    Keymaster

    If you are using the official OpenSprinkler firmware, it now supports GPIO stations. You can configure any station to be a GPIO station, and turning on/off that station will simply toggle the specified GPIO pin on/off. This makes it easy to use the software with a relay board.

    #43643

    roydon
    Participant

    Ah, Ray’s post did make me remember something. When I originally loaded OSPI onto my Pi, I did not have an opensprinkler adapter board, I was trying to use the PI IO directly to control the relays on my separate relay board. At that time OSPI was not able to support this, it only worked with the opensprinkler board itself (as it’s logic was to use the IO pins on a sort of bitwise method that then controlled the opensprinkler board). As a result, I had to install SIP (developed by Dan-in-CA) from github. I stand open to correction but SIP was 1 of the front-end applications that ran on top of open sprinkler. That worked perfectly for me once I’d installed that along with the ‘relay board’ plugin.

    If OSPI can now support GPIO control on the PI motherboard directly then that’s great !

Viewing 20 posts - 1 through 20 (of 20 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Cannot identify GPIO pins for stations