Electronics > Beginners

12v Automotive relay trigger

(1/2) > >>

andrewlapham:
hey,

I drew up a diagram of what I think would work but need some input. Basically, I need to trigger a 12v relay from an Arduino pin. I'm just not sure if the 2N222 is going to feel the pain and let the magic smoke out or not.

digsys:
The 2N2222 has a current gain of ~ 100-150X, so if the relay coil is 100mA, all you need is ~2mA. Even if you said 5mA for certainty. Assuming 3V3 op / .005 = 660R
I'd just increase your resistor to say 560R and put a 10K from Base to Emitter. You can tweak values depending on coil current.

Ian.M:
Please ignore this if you are just using a car battery as convenient portable power for some gadget in a field somewhere!

However if your gadget is going to be fitted to or used in a vehicle, I'd be very wary of transient ground potential differences in an automotive environment.  If the transistor emitter, Arduino Ground and buck regulator ground aren't all connected to the same point by relatively short wires, you are likely to have trouble.

Also, is the buck regulator rated for automotive use?  The transients it  may be subjected to are absolutely vicious, and even on a modern well maintained vehicle  are not nice and well outside the abs. max. ratings of most commodity switching and linear regulators.  Google: "ISO 16750-2" or the superseded standard "ISO 7637" which may be easier to find the full text of as ISO charge for access to their standards.

andrewlapham:
One thing I'm not so sure about now is the ground connections, Should they all be common?  Can the 12v and 5v lines share the same ground?

ptricks:

--- Quote from: andrewlapham on July 01, 2019, 11:42:23 pm ---One thing I'm not so sure about now is the ground connections, Should they all be common?  Can the 12v and 5v lines share the same ground?

--- End quote ---

Yes and they have to be for the circuit to work correctly.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod