We are going a bit around in circles without ironing down some truths about this relay board.
Please correct me if this is wrong, but the way it’s supposed to be used in a 5V system is to:
- tie IN1 to 0V to turn the relay ON
- tie IN1 to 5V (or open) to turn the relay OFF
If that’s true, then I would imagine the circuit looks a bit like this with a PNP transistor driving the relay coil:
There is at least one LED and resistor missing from this schematic that I see on the relay board, if not two of them. @semaja2 can you confirm how the board operates and how many LEDs are on it. If you take a close up picture of the board on both sides, we could probably generate a very accurate schematic.
If you look at the schematic above, you can see how it works when you set IN1 to 0V. Current flows through the Emitter-Base junction and is amplified in proportion to the Emitter-Collector junction. All that is required is to pull the Base 0.7V lower than the Emitter voltage and the PNP transistor will start to turn on.
If you set IN1 to 5V, there will be 0V between Emitter and Collector and the PNP will be off.
If you set IN1 to 3.3V, depending on the series resistor… SOME current will flow. There is definitely enough voltage across the Emitter-Base junction to turn ON the PNP. The amount of Base current would be
(5V - 3.3V)/R. The proportional Collector current would then be
Ib * Hfe (the gain) of that transistor.
So driving IN1 with an output LOW for ON, and setting that output to an input (high impedance/open) for OFF hopefully makes more sense now
Now if you can just tell me why they didn’t use an NPN transistor to pull the relay coil to GND, and make driving it make more sense (High = ON, Low/Open = OFF) and universally work from 3.3V and 5V systems…