Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to add a 12V relay to the PIC ?

Status
Not open for further replies.
An example from Nigel's page at
**broken link removed**
 
Or use an N-channel MOSFET and get rid of the base resistor. While the picture shows a 5v relay you can easily use a 12v relay since it's a "sinking" driver.

Have fun. Mike

n-fet-low-side-switch-png.12974
 

Attachments

  • N-FET Low Side Switch.PNG
    N-FET Low Side Switch.PNG
    7.7 KB · Views: 1,856
The 2N7000 does not require a current limiting resistor.

If you have a 2N7000 then use it, else most NPN switching transistors will work as long as they're rated for the coil load. Just add a base resistor 1K should work for most applications.
 
Last edited:
pasanlaksiri said:
What really happend if i use FET. Can some one explain it to me.:)

A FET is fine, but without the resistor if the FET goes source/gate S/C then the PIC is likely to be damaged by it. The simple resistor prevents this - but the FET has no advantages over the bi-polar circuit, except the lack of that resistor.
 
pasanlaksiri said:
What really happend if i use FET. Can some one explain it to me.:)

A FET is fine, but without the resistor if the FET goes source/gate S/C then the PIC is likely to be damaged by it. The simple resistor prevents this - but the FET has no advantages over the bi-polar circuit, except the lack of that resistor.
 
I wouldn't wory about that, if the MOSFET fails the chances are your circuit is doomed anywayr.
 
Hero999 said:
I wouldn't wory about that, if the MOSFET fails the chances are your circuit is doomed anywayr.

????? - why would the circuit be 'doomed' if the MOSFET failed?. Without a resistor it might blow the PIC (such poor design choices are unfortunately all too common in commercial equipment!), with a resistor only the FET would fail, and not affect anything else.
 
If something (like ESD) has caused the MOSFET to fail then the PIC sure as hell would have failed to.

I don't see how there's more chance of the 2N7000 failing than one of the tiny MOSFETs etched onto the PIC's die.
 
Hero999 said:
If something (like ESD) has caused the MOSFET to fail then the PIC sure as hell would have failed to.

I don't see how there's more chance of the 2N7000 failing than one of the tiny MOSFETs etched onto the PIC's die.

Components often fail for no apparent reason, and certainly MOSFET's are probably worse than most in this respect - the PIC isn't likely to fail as it's under no strain (and micro-controllers/micro-processors are generally VERY reliable). The FET is doing more work, because that's what it's there for, so the chances of it failing are much higher than for the PIC.

Using a resistor and a bipolar is probably cheaper than an FET (certainly for me!), and is probably more reliable as well, plus it ensures that if the transistor dies, the PIC doesn't die as well.
 
A 12V relay instead of 5V ones? Joining the positive path of the relay to the output side of the 7805 Regulator? or giving a 12V supply in a different way even though it worked halfly in 5V?
 
Last edited:
Gayan Soyza said:
A 12V relay instead of 5V ones? Joining the positive path of the relay to the output side of the 7805 Regulator? or giving a 12V supply in a different way even though it worked halfly in 5V?
Just supply 12 V to the 12 V relay. As long as they are common grounded.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top