0

Is "normally" open relay opened on 0V or 5V?

Here it is written that yes. But here it is written that no.

What is the truth?

Experimentally I see, that my relay module LED lights ON and "normally open" pin closes on OV on GPIO.

That would mean that "normal" is 5V and I would just flip contacts, but...

The problem is that I want it be "normal" common sense, i.e. it should be the state when Raspi is just turned on, which is not true. When I turn on my Raspi, my NO relay is open. When I set

GPIO.setup(pin, GPIO.OUT)

it turns 0V and closes. So I can't access relay without triggering it.

Is it possible to overcome?


Here is my module:

enter image description here


I am connecting VCC of module to 5V pin of Raspi, GND to GND, and IN to GPIOs.

Whatever "normal" is, why is it change on

GPIO.setup(pin, GPIO.OUT)

? Shouldn't it be and stay in "normal" before and after this instruction?

Dims
  • 175
  • 1
  • 8

1 Answers1

2

"Normally open" contacts are open when there's 0V on the relay coil. Depending on the circuit of the module, that could correspond to 0V or 5V on the digital input which you connect to the Pi. Apparently, that's 5V for your module, or, more precisely, 3.3V since that's the maximum allowed voltage for the Pi GPIO.

Mechanical relays are slow, so if you run

GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, 1)

it will not have enough time to toggle.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147