I'm obviously missing something basic as I try to set things up for the first time. SIP seems to be running fine on my pi-4 and I can create new programs and assign them to stations. But I cannot figure out how to assign a GPIO pin to a station. I was assuming I could do something like:
Assign any BPIO pin to a station (eg, say...pin 7/GPIO4 to S1)
Connect that pin to a relay
Connect that relay to the valve for S1
Then, when the SIP scheduler turns S1 on, pin 7 goes high (or low, depending on relay), which activates the relay and opens the valve.
I can't find info on that anywhere....
Eventually, by trial and error I tried adding the relay_board plugin; using the figures in its wiki I got the SIPs scheduler to turn an LED on and off (didn't bother adding a relay). But since that uses an optional plugin, that's probably not the normal way to do things.
I have lots of available pins so don't think I need a shift register (I've never used one of those...though the figure there indicates pins 7, 11, 13, and 15 are important...)
In any case, can someone tell me what obvious thing I am missing? I've studied the wiki and searched the Forum but have found nothing, and nobody else seems to have this problem so I am feeling pretty dumb!
2020 Nov 27, 03:15 PM (This post was last modified: 2020 Nov 27, 03:15 PM by dan.)
If you want to connect relays directly to the Pi's GPIO pins you will need to use a plugin. Either the relay_board plugin or the relay_16 plugin. That is what they are for.
(2020 Nov 27, 03:15 PM)dan Wrote: If you want to connect relays directly to the Pi's GPIO pins you will need to use a plugin. Either the relay_board plugin or the relay_16 plugin. That is what they are for.
Thank you. Sorry for being so thick here...So do all installations use one of the relay plugins (perhaps with a shift register if needed) to associate pins to stations? I don't see any alternatives but maybe just missing them...
SIP was originally designed to work with shift registers and does not need a plugin for that.
Because users requested to be able to use inexpensive relay boards with SIP the plugins were developed.
Probably a majority of users are using relay boards with a plugin.
SIP's plugin system was added to be able to add specialized functionality without causing software bloat. Users can develop new features and share them with the user community.
The docs file here may be useful; I found the attached figure to be the best reference for associating pins to stations (thank you, Dan for the figure).
For relay_board, the wiki is here, with a figure and pin assignment table (for 26 pin header).
The docs file here may be useful; I found the attached figure to be the best reference for associating pins to stations (thank you, Dan for the figure).
For relay_board, the wiki is here, with a figure and pin assignment table (for 26 pin header).
Thank you for this post. I was in the same boat. I used the relay board Plugin, but could not figure out which pins to connect for each station.
I plan on using 5 electro mechanical relays, but haven't connected them yet.
Using LEDs, I probed each pin using "Run Once" to activate each station until I figured out what was going on and eventually found the picture with the wiring for an 8 relay board (Board numbers, not GPIO!).
I also used this system to figure out the correct settings for Master, so that I got two LEDs to go on together.
On the way I noticed, while connecting the LEDS to each GPIO pin, that sometimes I got a dim glow on the LED from a pin that was not associated with a station. Is there an explanation for this? is this bad for my pi?
I am using a Pi 400 with the latest RPiOS to set up and test the system. I plan on moving it to a Zero W.
A dim glow means that the gpio pin of the Pi is not configured for output. Either the SIP program hasn't started (yet) or it is connected to a non-output pin. This is not "bad" for the Pi but it can result in unwanted (in)active relays and/or valves.
(2022 Aug 30, 07:19 AM)astrogerard Wrote: A dim glow means that the gpio pin of the Pi is not configured for output. Either the SIP program hasn't started (yet) or it is connected to a non-output pin. This is not "bad" for the Pi but it can result in unwanted (in)active relays and/or valves.
Thank you for your reply.
Is there any point in configuring all the pins and setting them to "off" before (or after) SIP starts?
SIP initialises the (potentially) used pins. Be aware that not all pins are output. E.g. a rainsensor requires a input pin. If you have connected a relay on that pin than a dim glow may appear.
Normally you don't need to set io pins when using SIP. There is a brief moment between power-on and a started SIP that the pins are in a undefined state. Well, undefined isn't fully true since there are some defaults on the Pi which are somewhat configurable. I tried this but had mixed results and for me it doesn't matter because I use the pcf8574 I2c module(s).