Relay is not working properly

While working with single channel relay module, if I make connection with the NO pin then initially the bulb is in the on condition and after sending signal ( high or low anything) the bulb becomes off and after that the state of the bulb can not be changed.
Similarly, if I make connection with the NC pin then initially the bulb is in the off condition and after sending signal ( high or low anything) the bulb becomes on and after that the state of the bulb can not be changed.
I can’t understand the reason. Please help.


For the relay module, what power supply are you using?

The relay module may be using an active low circuit configuration. In which case if you power it using the 5v supply, then regardless of whether you set the Bolt WiFi module pin to high or low, the circuit will detect it as a low.

In such a case, it is best to supply 3.3v power to the module, and then try changing the state of the Bolt Pin.

1 Like

I am using 5v supply.
How can I use 3.3v supply?


You just have to connect the 3.3v pin of the Bolt WiFi module to the supply pin of the relay module.

Thanks. It has started working.

Can you please tell me, can I apply analogWrite function using relay?

Hi @bikrammondal947,

You can use it, but I am guessing it will not work in the manner that you want it to work.

While analogWrite works by using PWM control, as in swithing the pin high and low, the relay module will probably not be fast enough to switch at that speed. As such the output of the relay module will act as though you have given a logic 0 to the input side, unless, you have the PWM value above a certain threshold, in which case it will act as though it is getting a logic 1.

This threshold is decided by the relay module circuit.

I have used led bulb and when I am using analogWrite and pass the value around 127 it is continuously fluctuating and I am getting a continuous noise from the relay.
What might be the solution?

Hi @bikrammondal947,

There is no solution if you want to use a relay. DO NOT USE ANALOG WRITE WITH YOUR RELAY THIS WAY.
The relay may get damaged.

Also, intensity control of LED bulb is possible only for a specific types of LED bulb. You have to first check if your bulb allows this or not.

Also, if you are really want to do intensity control of a light source, use a helogen bulb with the following type of relay

Ok, thanks.
This means I have to use solid state relay and halogen bulb to control intensity.

1 Like

Can 4 ch 5v DC relay module and bolt module be kept on for days for home automation if so then how many days(MIN AND MAX DAYS)?
I used BOLT home automation led circuit ,i changed the led circuit with 4ch 5v dc relay module in which i connected VCC,GND,IN1(INPUT1 for channel no 1 of relay module) with 5v,gnd,0 pin RESPECTIVELY of bolt module .The BUTTON for OFF made led TUBE on while BUTTON for ON made led TUBE off can any1 tell me why this happened ?
(however i interchanged the code LOW TO HIGH ,HIGH TO LOW)
(relay connections NC -open ,COM- to led bulb,NO- WITH PLUG )
ALSO led TUBE was on for 5 min only when i wanted to change it i was not able to do so ,can any1 plz tell m why ?

You may change the connection of one wire of the plug from the NO terminal to NC terminal. I think this will solve your 1st problem.