Shift register board (74HC595)

Greetings.

Does anyone know if there is a way to bind a shift register?

I explain myself: I’m talking about using 3 GPIO pins (Latch, CLock, Data) to command a shift register board (based on 74HC595), in order to command more and more pins (in my precise situation, some 8Ch Relay Boards).

Or do you think there is a different way to achieve the same result?

Thank you for your help!

Using the GPIO binding, connect the chip and control as needed. Is this to control an led array?

No. To control a chain of 8-16Ch Relay Board for 220V. In my case, 4x 8Ch Relay Board, to be controlled by only 3 pins, and some input boards to be readed by 3 pins. At the moment, I control and read them with Arduino, but I want to switch everything to a sole RaspberryPi.

As you wrote, I can obviously use GPIO binding and code everything from scratch. But, noting that someone else has needed this before, perhaps there is a binding just coded and ready to use.

No binding for a single chip that I know of.

If the arduino can control everything now look at using the Exec binding and move your script (python?) to OH.

Hi,
i’m trying to find a way to use Arduino / Pi with 74HC595 so i can use both regular wall / light switches and mobile / sensors / Alexa.

I have never worked with OpenHab until now. I didn’t even install it so can you please help me with some questions ?

I’d like to use a 12/24V relays so i can use a laptop power supply.

What type of relays/boards do you recommend for Arduino / Pi ? https://goo.gl/o4LXgZ or https://goo.gl/jwJCVM or https://goo.gl/Zhe2mn or https://goo.gl/Xn4mHZ and why ?

Why do you want to switch from Arduino to Pi, just to put everything in one place ?

Do you have any custom made circuit board for 74HC595 or you found a suitable one ? Can you share please ?

What buttons / wall switches do you use and how did you wire them ?

Thank you

PS: i’ll start rewiring all my apartment and i’d like to know how to do it the proper way so i can expand / adjust things in the future

Unless your planning to run copious amounts of wire from a single location I would recommend wireless (Esp8266) or bluetooth (Esp32) for TX/RX and relay switching.

Are these relays 12/24v switching power? If so the relays with an Arduino or RPI will need to use something like a transistor as they are 5 and 3 volts output only.

This will depend on your background and skill level but generally whatever is easy to work with and accomplishes the goal. You can buy 3.3 volt relays that are 110v 10A rated, they work good with anything using 3.3v logic.

Arduino is a micro-controller (stupid but strong, power wise) RPI is a microprocessor (smart but weak, power wise). Short answer, Arduino can’t run an OS where the RPI can.

This question can have numerous answers, take some time and read theTutorials & Examples category to get some ideas. For a quick answer. You can buy something pre-made that works with Zigbee or Zwave and use one of the OH binding to control the device. If you prefer the more DIY route then look at the Sonoff switches or Esp8266/32 and use mqtt to communicate with OH.

Thank you for your quick answer.

i prefer to use as many wires as i can because i’ll rewire all the apartment and if i miss something i’ll use wireless. For sensors and switches i’d like to use CAT5 - 6 wire so spare wires will remain.

I don’t want to power the relays with Arduino or Pi, i want to power them with an external source (laptop) and use boards just to send the signal, that’s why i thought about 12/24 v relays, isn’t that possible without transistor and other electronics ?

In my example all the relay boards are 110-250V 10A rated but they are different types and shapes and technology (please check the links)

I know you cannot use OS on Arduino but you can combine both of them, right ?

Well, i don’t want pre-made expensive stuff each one with it’s own software, rules etc. I’d like to make everything as unitary as possible, not a “rainbow” of electronics

For my home I did something similar except I ran shielded two pair twisted wire for powering small devices like the Esp8266 and use wi-fi to communicate. If using cat6 maybe look at devices or ways to use POE.

If the relay requires 12/24v to energize then an external power supply will be needed along with a transistor so the 3.3/5v of Arduino/RPI can control the relay.

Yes they can be combined.

I’m the same way, for my setup I like to use Esp devices and flash either tasmota or Esp Easy firmware. I do have other smart devices that use Zigbee protocol, for those I use a CC2531 USB stick to communicate with OH.

Thank you, you’ve enlighten me a bit :slight_smile:

I’d like to mount all electronics and intelligence inside a box with an Arduino wired up waiting for all type of signals and switching appliances on and off through a DIN rail mounted relays.

So if i use 5v relays, how many i can control with Arduino without an external power supply ?

Is there any schematics and sketch to accomplish that ?

If your open to more ideas, take a look at using a small PLC. Not sure what the price range is but it would be more reliable as this, among other things, is what they are designed for.

You’ll need to check the Arduino web site or read thru their forum to get help with those answers. You should also be able to find plenty examples and sketches as well.

I know this is an old/ish topic but I may be able to help.
I am moving from hass to openhab, and using esphome to control 16 (did try with 80 relays successfully, could have done more but ran out of relays) relays via esp8266 nodemcu. And as mqtt is supported with esphome it should be a very easy transition.
Happy to throw up some pics etc if you are still looking, as well as a howto.