Module i2c relay. - Printable Version +- SIP (https://nosack.com/sipforum) +-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1) +--- Forum: Feature requests (https://nosack.com/sipforum/forumdisplay.php?fid=4) +--- Thread: Module i2c relay. (/showthread.php?tid=332) |
Module i2c relay. - litronas - 2024 Jun 11 Hello, the other day I found i2c relay modules, 16 relays and XL9535, in Chinese stores. And it would be great if someone wrote a complement, because it would greatly simplify the construction of projects, thank you and great job. RE: Module i2c relay. - astrogerard - 2024 Jun 12 Shouldn't be too difficult to do. I don't have such a board otherwise I would write a plugin for it. If you know a tiny little bit of Python programming then you could modify my I2C plugin to work with the XL9535. See https://gitlab.com/seventer/pcf857x_plugin_sip to get the idea. The XL9535 isn't widely used so you might need to fork/rewrite some libraries. --Gerard RE: Module i2c relay. - litronas - 2024 Jun 16 (2024 Jun 12, 08:16 PM)astrogerard Wrote: Shouldn't be too difficult to do. I don't have such a board otherwise I would write a plugin for it. Thank you very much, my knowledge is null in python, but I found a way with control_cli plugin.. executing the code i2cset -y 1 0x20 0x** 0x**, depending on whether I want them to turn on or off. thank you. The good thing is that it works for any i2c expander and the bad thing is that you can't put several at the same time. RE: Module i2c relay. - astrogerard - 2024 Jun 17 If you prefer a i2c board without the need to wire everything yourself you could also use something like this https://www.ebay.co.uk/itm/114237194670?chn=ps&_ul=GB and use my driver for it. The addressing allows for 8 boards, so you can have 64 stations in total. --Gerard p.s. There are also boards with a pcf8574 and pcf8574A. like: https://www.ereshop.com/shop/index.php?main_page=product_info&cPath=143_178&products_id=789 If you have 8 boards of the 8574 and 8 boards of 8574A then you have a total of 16 boards effectively having 128 stations. RE: Module i2c relay. - litronas - 2024 Jun 19 I'll keep that in mind, thanks RE: Module i2c relay. - litronas - 2024 Jun 22 (2024 Jun 16, 06:08 AM)litronas Wrote:The commands used for this integrated are these in case it helps anyone.(2024 Jun 12, 08:16 PM)astrogerard Wrote: Shouldn't be too difficult to do. I don't have such a board otherwise I would write a plugin for it. They are two inverted 8bit registers i2cset -y 1 0x20 0x06 0xfe //relay 1on i2cset -y 1 0x20 0x07 0xfe //relay 8 on translated with Google |