Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pi_plates relayplate support
#1
pi_plates makes stackable 7 relay HATs for raspberry pi.  The relays are activated by simple python calls such as RELAY.relayON(platenumber,relaynumber).  What would be involved in implementing a plugin for this?  Has anyone tried?
Reply
#2
It looks like it would be very easy to modify the cli_control plugin for this.
You would just need to install the pi_plates Python modules with pip and add a line to the cli_control.py file:
Code:
import piplates.RELAYplate as RELAY
Then you could add the relay control commands on the plugin's set up page.

However, the Pi_plates RELAYplate seems a bit pricey. You can get an 8 or 16 channel relay board from Amazon for about 6 to 15 dollars and use the relay_16 plugin with just some jumper wires.

Also astrogerard is working on a I2C plugin that will allow a very large number of relays to be connected to the pi with just a couple of wires. Take a look at his early docs:
[url=https://nosack.com/sipforum/member.php?action=profile&uid=310][/url]https://gitlab.com/seventer/pcf857x_plug...57x-doc.md

Those i2c IO extender boards only cost about $2.00.

Dan
<p><br></p>
Reply
#3
(2021 Sep 24, 02:47 PM)dan Wrote: It looks like it would be very easy to modify the cli_control plugin for this.
You would just need to install the pi_plates Python modules with pip and add a line to the cli_control.py file:
Code:
import piplates.RELAYplate as RELAY
Then you could add the relay control commands on the plugin's set up page.

However, the Pi_plates RELAYplate seems a bit pricey. You can get an 8 or 16 channel relay board from Amazon for about 6 to 15 dollars and use the relay_16 plugin with just some jumper wires.

Also astrogerard is working on a I2C plugin that will allow a very large number of relays to be connected to the pi with just a couple of wires. Take a look at his early docs:
[url=https://nosack.com/sipforum/member.php?action=profile&uid=310][/url]https://gitlab.com/seventer/pcf857x_plug...57x-doc.md

Those i2c IO extender boards only cost about $2.00.

Dan

Thanks so much Dan!  I will follow your directions.  One thing you do get with the pi-plates relay plate is what looks to be built in protection for working with dangerous voltages, and they are nicely stackable.  But I agree with you, they are much more in cost. I will look at astrogerard's page.
John
Reply
#4
(2021 Sep 24, 07:04 PM)hugie Wrote:
(2021 Sep 24, 02:47 PM)dan Wrote: It looks like it would be very easy to modify the cli_control plugin for this.
You would just need to install the pi_plates Python modules with pip and add a line to the cli_control.py file:
Code:
import piplates.RELAYplate as RELAY
Then you could add the relay control commands on the plugin's set up page.

However, the Pi_plates RELAYplate seems a bit pricey. You can get an 8 or 16 channel relay board from Amazon for about 6 to 15 dollars and use the relay_16 plugin with just some jumper wires.

Also astrogerard is working on a I2C plugin that will allow a very large number of relays to be connected to the pi with just a couple of wires. Take a look at his early docs:
[url=https://nosack.com/sipforum/member.php?action=profile&uid=310][/url]https://gitlab.com/seventer/pcf857x_plug...57x-doc.md

Those i2c IO extender boards only cost about $2.00.

Dan

Thanks so much Dan!  I will follow your directions.  One thing you do get with the pi-plates relay plate is what looks to be built in protection for working with dangerous voltages, and they are nicely stackable.  But I agree with you, they are much more in cost. I will look at astrogerard's page.
John

Thanks again, Dan.  I have made a good start at a pi_plates specific module.  One issue is that the pi-plate library wants to put the gpio mode into it's own mode.  Is there any way to prevent SIP from making GPIO calls?  I have for now temporarily commented out lines in gpio_pins.py, but this is not very elegant.  Do you have any suggestions?
Reply
#5
If you have imported the "gv" module which gives you access to SIP's settings you can just say
Code:
gv.use_gpio_pins = False
That will disable SIP from using them.

Dan
<p><br></p>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)