Hey guys, I have been working with microcontrollers and basic stamps lately trying to figure out how to trigger a relay. The problem obviously is that the microcontroller can only supply so much current, where as the relay needs ~70 mA.
Now I guess I need a power transistor. I have never worked with any before and I don't even know how to select one, this is where I could use some help. I'm trying to have the micrcontoller control the relay to switch 12V battery.
Can anyone provide a simple explanation or maybe point to an aritcle in NV they read about this? I have many of the issues.
Thanks for any help.
How to trigger relay?
- Clyde Crashkop
- Posts: 99
- Joined: Fri Feb 06, 2004 1:01 am
- Location: Florida
- Contact:
Clyde's suggestion is good. I'm not sure he was suggesting this, but you might use the MOSFET to directly switch the 12V and eliminate the relay altogether, depending upon your application. The latest N&V (May issue) has some good stuff about MOSFETs in the Q&A section.
"if it's not another it's one thing."
Re: How to trigger relay?
the suggestions for mosfets will work but, for a lot less money, I would use a simple NPN transistor as a low side driver. I usually use 2n3904s but that's because I bought 100 of them a while ago. note that using a mosfet to directly control 12V will work but you don't get isolation. A relay is a cheap(ish) form of isolation.divzr0 wrote:Hey guys, I have been working with microcontrollers and basic stamps lately trying to figure out how to trigger a relay. The problem obviously is that the microcontroller can only supply so much current, where as the relay needs ~70 mA.
Now I guess I need a power transistor. I have never worked with any before and I don't even know how to select one, this is where I could use some help. I'm trying to have the micrcontoller control the relay to switch 12V battery.
Can anyone provide a simple explanation or maybe point to an aritcle in NV they read about this? I have many of the issues.
Thanks for any help.
R1 should be in the 1K-2K range. R2 can be large-ish (10K and up). D1 is just about any silicon diode. Q1 can be just about any NPN transistor (2n2222, 2n3904, and so on). This will work for just about any electromagnetic relay. cost new? about 1/10th the FET. Any marginally stocked junk-box should have the parts....
The theory of how you go about selecting the transistor and R1 are pretty interesting but perhaps for another day...
edit: V+ can be anything upwards of the max rating of the transistor. for 12V, no sweat...
Exactly. My favorite general purpose small transistor is the MPSA06. 80v, 500ma, what's not to love? They cost about 5 cents from someplace like Jameco. (you have to buy 10 at that price though) I buy them by the hundred.
And if the circuit doesn't have enough drive for the transistor, a darlington like MPSA13 will work, and those are under a dime as well.
And if the circuit doesn't have enough drive for the transistor, a darlington like MPSA13 will work, and those are under a dime as well.
All the drive that circuit needs is about 3 mA. I use an Hfe of 30 (which is way low for most situations) so 3 mA Ib means 90 mA Ic (in rough numbers).
On the digital logic side, any microcontroller will be able to deliver that much current and for general logic I suggest people use 74HC stuff since it's capable of plenty of current.
On the digital logic side, any microcontroller will be able to deliver that much current and for general logic I suggest people use 74HC stuff since it's capable of plenty of current.
-
- Posts: 149
- Joined: Tue Oct 29, 2002 1:01 am
- Location: Arizona
- Contact:
-
- Posts: 24
- Joined: Tue May 30, 2006 11:43 am
- Location: rochester ny
- Contact:
-
- Posts: 2277
- Joined: Wed Nov 24, 2004 1:01 am
- Location: ASHTABULA,OHIO
- Contact:
Tommy,Div
Snubbing circuits are used across the contacts for arc reduction, but the values are determined by the type of load. These calculations can be a science in itself. For low current resistive loads, you wont need anything. BTW what is your load and what level of current will you be breaking?
Snubbing circuits are used across the contacts for arc reduction, but the values are determined by the type of load. These calculations can be a science in itself. For low current resistive loads, you wont need anything. BTW what is your load and what level of current will you be breaking?
while the question has been answered, I want to point out that pretty much nothing you can do at the coil will affect the contacts. I suppose if you powered the coil at the Must Operate voltge, you might get a slow closure and a bit more arc'ing but that's pretty willfully disregarding reasonable practices.Tommy volts wrote:Philba,
Does the diode across the relay prevent arcing on the relay contacts and any problems associated with that?
Who is online
Users browsing this forum: No registered users and 53 guests