3
\$\begingroup\$

I have a project where I need to engergize a 40A relay in a car. My uC based circuit is running at 5V via a 7805 and is mainly doing its own thing, but I need a digital out to energise the 12V relay, which in turn is driving an air conditioner clutch (as it happens).

My thoughts were (discounted in turn, possbly incorrectly) 1) a transistor (worried about 5V on base, 12V across CE, and if there's sufficient current) 2) an opto-isolator / opto-darlington (worried if it can drive the current, and at 12V if the power dissipation will be too high) 3) a relay (feels a bit silly using a relay to energise a relay, but otherwise seems sensible) but even so I'm likely to need more coil current than the uC can drive (or do I?) 4) an opto-isolator driving a relay (handles the 5V/12V disconnect nicely and the currents should be high enough) but now I feel like I'm badly overengineering.

I should mention that while I (and everyone) says 12V, in a running car it's usually >14V.

What would be my best and easiest approach, bearing in mind I'll be building a fair number, so cost is also a consideration...?

\$\endgroup\$
4
\$\begingroup\$

Higher-power transistors generally have lower gain, so you almost always end up using a small transistor (2N3904/3906) to drive the big bugger, which in turn drives the relay. For automotive though it is easy to find relays with less than 100mA of coil current (easy to drive) but with contact ratings you'll be looking for to drive the A/C clutch.

But transistors to switch big current are passé; why not use a FET? Logic level FETs are available and capable of switching dozens if not hundreds of Amps at the voltages you're looking for, and appropriately sized would need a modest (if any) heatsink. What are the current requirements for your A/C clutch?

I disagree about needing an opto; your micro is already sharing the same common as the rest of the vehicle and the inductive kickback would be handled by flyback diode in the FET or with the diode you place across the relay coil; it's highly unlikely that a failure mode would present 12V at sufficient current to damage an I/O pin. If you were nervous enough you could always use a transistor to switch the FET.

\$\endgroup\$
  • \$\begingroup\$ Apparently I need 200mA @ 12V to energise the coil but I don't have the tester yet to see what I can get away with... I've never used FETs, so I'll do a bit of reading. Thanks \$\endgroup\$ – Jon Dec 17 '12 at 15:41
  • \$\begingroup\$ In the end I'm going to save the learning for when I have some more time and just go for a beefy BJT for now. Thanks for your help anyway... \$\endgroup\$ – Jon Dec 18 '12 at 22:14
2
\$\begingroup\$

Update

If you think your relay will draw more than 300mA, or there are temperature concerns, or you just want to be on the safe side, you can use a TIP102 (or TIP101 or TIP100) instead of the BC548. The TIP102 is much beefier, and comes in a TO-220 package. And it is still very cheap, ~$.50 US.


All you need is a BC548 NPN transistor, and 1N4004 diode. This will only end up costing a couple dollars at the most, and is probably the cheapest solution. There are a number of different NPN transistors and diodes you can use, if for some reason you can't find these ones.

Most uC's can only source about 20mA at 3.3v to 5v, so you need to use a transistor to switch that much power (kind of like using a relay to switch a relay, like you mentioned.) You need the diode because current flowing through the coil of the relay creates a magnetic field which collapses suddenly when the current is switched off. The sudden collapse of the magnetic field induces a brief high voltage across the coil which is very likely to damage the transistors.

This is how it would be wired: enter image description here

See Transistor Circuits for more information. And perhaps this Arduino to Relay thread may help (although I haven't read it.)

My thoughts were (discounted in turn, possbly incorrectly) 1) a transistor (worried about 5V on base, 12V across CE, and if there's sufficient current) 2) an opto-isolator / opto-darlington (worried if it can drive the current, and at 12V if the power dissipation will be too high) 3) a relay (feels a bit silly using a relay to energise a relay, but otherwise seems sensible) but even so I'm likely to need more coil current than the uC can drive (or do I?) 4) an opto-isolator driving a relay (handles the 5V/12V disconnect nicely and the currents should be high enough) but now I feel like I'm badly overengineering.

  1. Don't worry, that's what transistors do!
  2. This isn't really the correct part for the job.
  3. Like you said, it is a bit silly, and most uC's can't drive one on their own anyway.
  4. Absolutely unnecessary!
\$\endgroup\$
  • \$\begingroup\$ Funny enough that's precisely the circuit I ended up with, after faffing for a while with the transistor on the high side. Obviously I realised my error now... For me a BC548 (loads in the parts box!) blows up when I simulate it (too much power) but I also have some BD435s which appear plenty manly enough in simulation so will build a quick tester and see. Thanks very much for your help... \$\endgroup\$ – Jon Dec 18 '12 at 22:07
  • \$\begingroup\$ @Jon see my update on the top of my answer. \$\endgroup\$ – Garrett Fogerlie Dec 19 '12 at 9:22
  • \$\begingroup\$ Thanks.... The BC548's I have are TO-92 packaged and have a max Ic of 100mA. The 40A relay I need to engergise wants at least 150mA. The BD435 seems a little oversized at Ic of 1A, Vce 32V but I can saturate it easily enough (min Hfe=50 so I figure I need about 3mA). Since these are already in the part box (and more @ 0.30 each) would there be a problem using these instead? Aside from being a sledgehammer to crack a nut...? \$\endgroup\$ – Jon Dec 19 '12 at 11:20
  • \$\begingroup\$ @Jon That should work fine. As for the sledgehammer metaphor, it never hurts to be over spec! Also, next time you order parts, grab a few TIP102's (or TIP101 or TIP100) because they really come in handy, and are nice to have around. \$\endgroup\$ – Garrett Fogerlie Dec 19 '12 at 12:56
0
\$\begingroup\$

First question is the coil current of that relay...

My suggestion would be an opto-isolator (protect the CPU!) driving a transistor on the 12V side, rated for that coil current. And don't forget the protection diode to protect the transistor.

\$\endgroup\$
0
\$\begingroup\$

You just need a BJT transistor with a proper design to have it working in saturation mode ( ie acting as a switch ) You don't need an opto isolator to protect the CPU, but a diode in reverse parallel to the coil in order to protect the bjt. Here a couple of article, one explaining why you need a diode to protect the transistor: http://electro-am.blogspot.it/2012/12/why-do-we-need-diode-in-reverse.html and the other one to design the component for the BJT driving a relay: http://electro-am.blogspot.it/2012/12/how-to-use-bjt-as-switch.html

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.