[SOLVED]Problems on switching the 5V relay with BLYNK button

I want to implement a virtual button on BLYNK to switch the 5 relay on and off. The relay can not be switched on and off although it can blink the led on same pin of Particle Photon. The relay has already connected to the 5V supply.

Common ground between the relay and your mcu?

Yes, in fact I use the dc-dc converter to boost the 3.3V from Photon to 5V for the relay. The relay can be turned on but it cannot be control by the Photon’s digital pin. The digital pin can really blink the LED using the virtual button. It’s strange.

This will be the issue.

The 5V relay is only refering the the power. The logic will be hte same as most relays…

0 - 2.79v = LOW
2.8 - 5v = HIGH
(or vice verca if your relay is active LOW)

So your 3.3v logic from your Photon will still trigger the state change fine.

Try this:


For the specific value of what you gave you need to know when transistor or MOSFET enters saturation region. Not sure how you got those values cause they will be different for each transistor/MOSFET and actual VCC supplied to the coil really has nothing to do with threshold voltage or saturation voltage in a case of the normal transistor. Picture of particular relay module would be useful to say anything.


If relay is powered by 5v it cannot be triggered by a 3.3v digital pin so in this case the relay should be powered by 3.3v.
The 5v relay can work even with 3.3v power source but in both cases you can’t power it directly from Particle Photon board unless you will use a transistor.
Instead of using transistors to power relays from the board I use ecternal power source.

OK, I have solved the problem. I was my mistake because I am not using the relay directly. In fact, it is a relay module. However I am still wonder why would it happen. I found that while I supply the 5V from the Vin of Particle Photon, the relay module keeps switching on, no matter what the state of the output pin is. Then, I supply 3.3v to the relay module instead of using 5V. The relay module can be switched properly. But that relay module is a 5V single channel relay module.

Thanks for all of you.

Vin = Voltage In

Not Voltage Out… I would highly recommend against doing this in the future.