Associate pins to stations? (newbie Q) - Printable Version +- SIP (https://nosack.com/sipforum) +-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1) +--- Forum: Installation and set up questions (https://nosack.com/sipforum/forumdisplay.php?fid=2) +--- Thread: Associate pins to stations? (newbie Q) (/showthread.php?tid=236) |
Associate pins to stations? (newbie Q) - noequus - 2020 Nov 26 Hi: 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:
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! Thanks for any guidance. RE: Associate pins to stations? (newbie Q) - dan - 2020 Nov 27 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. RE: Associate pins to stations? (newbie Q) - noequus - 2020 Nov 30 (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... Thanks, Gary RE: Associate pins to stations? (newbie Q) - dan - 2020 Dec 01 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. RE: Associate pins to stations? (newbie Q) - noequus - 2020 Dec 04 Thanks, Dan. In case anyone else is as slow as I am, perhaps this additional information will be helpful... For relay_16, stations 1-16 are associated with these pins (from relay_16.py, for 40 pin header on RPi). These are board, not GPIO, numbers.: [18, 22, 24, 26, 32, 36, 38, 40, 19, 21, 23, 29, 31, 33, 35, 37] 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). RE: Associate pins to stations? (newbie Q) - dan - 2020 Dec 05 The image has a habit of refusing to download from GitHub. I will look at fixing it again. In the meantime a copy is attached here Click the image to view. RE: Associate pins to stations? (newbie Q) - nanogeek - 2022 Aug 29 (2020 Dec 04, 11:35 PM)noequus Wrote: Thanks, Dan.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. Thank you RE: Associate pins to stations? (newbie Q) - astrogerard - 2022 Aug 30 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. RE: Associate pins to stations? (newbie Q) - nanogeek - 2022 Aug 30 (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? RE: Associate pins to stations? (newbie Q) - astrogerard - 2022 Aug 30 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). |