Maker Pro
Maker Pro

Relay switching

Raja Vigneshwaran

Oct 18, 2016
15
Joined
Oct 18, 2016
Messages
15
Hi,
I am constructing a Home Automation using ESP8266 Wifi Module and making a relay circuit on my own .
But I am getting problem with the switching process in relay
I used BC107 transistor but it doesnt get required Current to switch ON and
I used IRF840 N Channel MOSFET but it requires Negative voltage to Turn OFF.

The output from my ESP Module is 3.2Volt and 30 Amps .

Could anybody tell me how to solve this issue ?

Regards ,
Raja.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Please post the circuit diagrams.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
There needs to be a diode across the relay coil to protect the transistor from exceedingly high voltages.
The mosfet does not need a negative voltage, it needs the gate voltage the same as the source voltage.
 

Raja Vigneshwaran

Oct 18, 2016
15
Joined
Oct 18, 2016
Messages
15
ya I will add Diode in Forward Bias in Circuit ,
If MOSFET needs Gate voltage as Source Voltage then I must use a 3.3 volt relay for this cicuit ?
Or is there any other alternate for this problem ?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
  1. the diode must be reverse biased across the relay coil.
  2. the relay should have a 12V coil
  3. The mosfet will need to be a logic level mosfet (what mosfet have you chosen?)
 

Raja Vigneshwaran

Oct 18, 2016
15
Joined
Oct 18, 2016
Messages
15
I will reverse bias the diode now and relay is a 12volt coil voltage
I am using IRF840 N Channel MOSFET
Can you suggest any Logic Level MOSFET that I could use here < TTL or any other Logic >
 
Last edited:

AnalogKid

Jun 10, 2015
2,913
Joined
Jun 10, 2015
Messages
2,913
The IRF840 is not a logic-level MOSFET, and needs a minimum of 4.0- Vdc from the gate to source to start conduction. The rule of thumb for these parts is a min of 10 V Vgs for "saturation." If your max drive voltage is only 3.2 V, search your vendor websites for "logic level MOSFET" and see what they have in stock. What is the relay coil operating current?

IRLZ14
IRLZ24
IRLZ34
IRLZ44

ak
 

Raja Vigneshwaran

Oct 18, 2016
15
Joined
Oct 18, 2016
Messages
15
I have ordered for FDT439NCT N channel MOSFET , mean while is there any other way that i could make a switch for this issue , i have a suggestion of using ULN2003 for switching purpose .
Do you have any other suggestions ?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Try this:

upload_2016-10-22_17-53-48.png

R1 and R2 about 1k, D1 1N4001, Q1 and Q2 BC548 or similar.

Note that this driver (like many simple drivers) will invert the signal from your microcontroller. Program it to operate the output the reverse to how it does now.
 

AnalogKid

Jun 10, 2015
2,913
Joined
Jun 10, 2015
Messages
2,913
Depends on the relay coil resistance or nominal wattage rating.

What is it?

ak
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
3 wires going to that relay board. That means it's using a transistor (or similar) to actually turn the relay on.
 

Raja Vigneshwaran

Oct 18, 2016
15
Joined
Oct 18, 2016
Messages
15
To Steve,
Actually there wasnt any transistor in the module he was using and In the tutorial he said that 3.3 volt will be enough to turn this 5Volt relay ON .

And About your circuit diagram , where should I connect the Relay ?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Actually there wasnt any transistor in the module he was using

I doubt that very much

Here is an updated link. It's written in Chinglish, but one of the photos clearly shows the transistor and several other assorted components.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
And About your circuit diagram , where should I connect the Relay ?

That circuit is designed to drive the gate of the mosfet if 3v3 is insufficient to turn it on. You probably don't have to go to all that effort, but I had the circuit handy.
 
Top