I am using a system with a raspberry pi and multiple d-type flip flop (CD74HC273), its role is to be able to control several digital outputs with a web app.
I use 8 raspbery GPIO bits as data/input bits on each flip flops, and n GPIO bits to select one flip flop and disable the others (with master reset input), so I can control 8 x n digital outputs.
I worked fine when I tested it with leds, so I tried switching to 5v relays, which is the actual goal (below the link to the kind of relay integrated circuit I am using) https://www.amazon.fr/XCSOURCE-Bouclier-Optocoupleur-Arduino-TE213/dp/B00ZR3B252/ref=sr_1_6?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=relais+5v&qid=1579683668&sr=8-6
But I realized that those are activated by low state input, which is problematic, because 74HC273 output is low state by default if not activated, so activates relays by default, which I don't want.
I am pretty new at electronics, so I don't really know how to fix this problem.
What would be the best solution ? :
Can I find "active high" relays ?
Can I find another type of flip-flop that works in the same way, "copying" the input level to the output on clock pulse, but with a "master set" input, all ouputs to high state by default ?
Should I use 8-bits inverters on every 74HC output ?
Any great solution I did not think about ? :)
Here is a "sketch" of the circuit (although I don't know exactly what goes on underneath the hood in the integrated relay circuit, that would be the ""?"" bit, but I guess this is a pretty standard component):
Thanks a lot !!