I was playing with the 16-channel relay that is widely available for IoT projects and it turned out a great tool.
To reduce number of pins I used also very polpuar cheap 16C multiplexer (HP4067)
Here is a video from part of my project:
https://www.youtube.com/watch?v=0oiGmXb5Kuc
I plan to add code controlling it via WiFi and publish on github soon )
Controlling 16-channel relay with ease
Re: Controlling 16-channel relay with ease
If you want to reduce the I/O even more try using the MCP23017 (I2C interface) or the MCP23S17 (SPI interface)
https://www.digikey.com/product-detail/ ... ND/5226680
https://www.digikey.com/product-detail/ ... ND/5226680
Re: Controlling 16-channel relay with ease
Good idea - use the IO expander. However I wonder how many pins are needed for expander.
With multiplexer there are 6 mux pins plus 3.3VCC because mux ground goes to the relay board.
SPI would be only 2 pins less I think and MCP23017 I2C total 2 pins - best choice.
But code complexity for multiplexer is ridiculously simple. Just few lines of code)
With multiplexer there are 6 mux pins plus 3.3VCC because mux ground goes to the relay board.
SPI would be only 2 pins less I think and MCP23017 I2C total 2 pins - best choice.
But code complexity for multiplexer is ridiculously simple. Just few lines of code)
Re: Controlling 16-channel relay with ease
4 pins. Power, Gnd, SCL, SDA. Those 4 pins gives you 16 I/O.However I wonder how many pins are needed for expander.
It is true that the code is simple for the other IC. However, once you have the code its just as simple to call it and change I/O. Not to mention that if you need more I/O, say another 16 you arent going to use any more pins for the next IC.
Re: Controlling 16-channel relay with ease
So I had this idea that with one 16c multiplexer we could control 4 another 16c multiplexers using 4bits x 4 as inputs.
Going further because esp is 32bit we could control 128 channels with only 16bits of two input multiplexers serving 256 channels!
There is of course a way of accessing unlimited number of channels with those 4bits but speed is lost.
The rule is 5 multiplexers can control 16 x 4 channels and that sounds like some led panel project)
Going further because esp is 32bit we could control 128 channels with only 16bits of two input multiplexers serving 256 channels!
There is of course a way of accessing unlimited number of channels with those 4bits but speed is lost.
The rule is 5 multiplexers can control 16 x 4 channels and that sounds like some led panel project)
Re: Controlling 16-channel relay with ease
Ya, if your looking for a led project you should check out the IS31FL3731. you can control 144 leds with just I2C.
http://www.issi.com/WW/pdf/31FL3731.pdf
http://www.issi.com/WW/pdf/31FL3731.pdf
-
- Posts: 1
- Joined: Sat Jun 15, 2019 5:10 pm
Re: Controlling 16-channel relay with ease
Hi Deouss,Deouss wrote: ↑Sun Mar 03, 2019 12:54 amI was playing with the 16-channel relay that is widely available for IoT projects and it turned out a great tool.
To reduce number of pins I used also very polpuar cheap 16C multiplexer (HP4067)
Here is a video from part of my project:
https://www.youtube.com/watch?v=0oiGmXb5Kuc
I plan to add code controlling it via WiFi and publish on github soon )
I have viewed the youtube video and was wondering if you would be prepared to share the pinout configuration and code with me as I am an absolute newbie and looking for a basic starting point?
Who is online
Users browsing this forum: No registered users and 95 guests