0

On my smart home controlling PCB I want to add some relays. As I want to be flexible with signaling I want to add a jumper to be able to switch between HIGH and LOW level triggering the relay (3V3 from a RPi). Since I have no idea how to change the trigger level with only one jumper as it is e.g. on the following module (see jumper on the bottom right side) I'd appreciate any help on how to planing this circuit.

Relay breakout board

alve89
  • 113
  • 4

2 Answers2

2

The relay module in the image has an EL354 optocoupler which has two anti-parallel LEDs instead of one. Hence, the optocoupler can be used with any polarity between pin 1 and 2. This leads me to believe that the circuit works in a similar way like this.

Relay module

If the jumper J1 is connected to Vcc, the circuit will become active-low. If it is connected to GND, the circuit will become active-high. This circuit just explains the basic working of how the trigger level is changed and you may have to refine it for it to work practically.

PCBCrew Engineer
  • 1,494
  • 2
  • 13
  • Okay, that's a pretty good idea. Those optocoupler seem to be quite affordable so I could buy some of those. Thank you for this very simple solution! What do you think of the solution in my updated question? With this I would not need to order additional stuff. – alve89 Feb 07 '23 at 06:52
  • Seems fine to me other than the fact that the LED may be missing a current limiting resistor. Also, are you using 3.3V to power the relay? – PCBCrew Engineer Feb 07 '23 at 07:46
  • Oh yes, you're right, thanks! Yes, I'm powering the relay with 3.3V. If the current is to high, I change this to 5V power supply. – alve89 Feb 07 '23 at 08:56
1

This would also work.

enter image description here

When the jumper is bridging pin 2 and 3, the NPN transistor is controlled directly by passing 3.3V as signal. When the jumper is bridging pin 2 and 1, the NPN transistor is controlled through the PNP transistor by passing 0V as signal.

alve89
  • 113
  • 4