I’ve got a relay that’s triggered by 5V. This has worked fine with an Arduino Uno (since it has 5V outs) but how to pull this off on a 3.3V Photon is stumping me.
So, is there some way to trigger 5V output on a Photo to a relay switch?
I’ve got a relay that’s triggered by 5V. This has worked fine with an Arduino Uno (since it has 5V outs) but how to pull this off on a 3.3V Photon is stumping me.
So, is there some way to trigger 5V output on a Photo to a relay switch?
you could use a simple transistor as a switch or try a logic level converter
you could use a 74HC245 it a logic level converter it comes in dip and smd.
Hi, I was facing the same issue, and I ended up buying 3v3 relays to simplify my life like these ones.
They come in a pcb designed for Wemos but work just fine with Particles since Wemos run at 3v3 too.
Cheers,
Gustavo.
@Shpigford, I strongly recommend either a transistor driver or, as @gusgonnet pointed out, a pre-assembled unit. This one provide a photo-coupler interface providing better isolation between the relays and the photon. Let us know how it goes!
Hi PK, question to you, since I like your choice.
I read in the description of the relay a "low level triggered".
Does this mean the logic of the relay is inverted somehow? meaning, a low input will engage the relay?
If this is correct, I would prefer to buy "high level triggered" ones...
@gusgonnet, you can find modules that have a programmable trigger level like this one. Since the level can be handled in the software logic, the actual trigger level is not critical. Is there a reason you want high-level triggered relays?
I think I got in trouble before with low level triggered relays when the system starts up.
The reason was something like this:
I know I can wire the garage opener to the NC contact of the relay and compensate this inverted behaviour in the firmware, but then the relay is always engaged and consuming some power.
Am I thinking this wrong?
thanks
Gustavo.
@gusgonnet, you can set the I/O preemptively with a STARTUP()
command. However, get the configurable relay board and that way you can configure it either way. Testing will provide the real-world feedback