Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Module i2c relay.
#1
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.
Reply
#2
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
Reply
#3
(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.
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

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.
Reply
#4
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?m...cts_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.
Reply
#5
I'll keep that in mind, thanks
Reply
#6
(2024 Jun 16, 06:08 AM)litronas Wrote:
(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.
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

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.
The commands used for this integrated are these in case it helps anyone.

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
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)