I’m working on a very basic project that requires a relay to momentarily close a contact and so activate/ deactivate an AC 240V powered motor. I’m using a Raspberry Pi 4 to control the relay. I have the breadboard and code working for test purposes but it’s inconsistent in operation and after a bit of on-line research I think it is probably that I have a 5v relay and am trying to drive it from a 3.3v signal from the Rasperry Pi.
I have seen in the forum discussion about this issue and a recommendation to add a logic level converter to the circuit . However, I would prefer to just use a relay that works on the 3.3v signal from the Raspberry Pi. Can you recommend a suitable single channel relay.
A logic level converter will not provide enough current to do anything. (dependant on type of converter) but I think an opto coupled relay driver should be OK. While the descriptions mostly say the relays should work at 3.3V I have reservations about that as pointed out in some posts. Often these boards have provision to power the relays separately (otherwise why isolate the relay with an opto coupler) so personally I would power the relay itself with 5V leaving the 3,.3V logic to operate the opto coupler.
That unit linked by James should work. Personally I would still power the relay at VDD with 5V.
Also a 1k resistor between your I/O should be used to limit the Mosfet gate current at switch on to a safe 5mA.