Electronic – How to drive a 12V automotive relay with a uC running on 5V

microcontrollerrelay

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…?

Best Answer

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.

Related Topic