How to power a 12v automotive relay?

Hello all,
First time using arduino, but I am a software engineer with some experience in C code. I have wrote some code that activated power on one of the pins after a delay. Here is the general theory of operation:
Launch mode Enable (External Signal)
Release activation button/switch
Delay for "X" ms
Activate solenoid and hold for "Z" ms
Release Solenoid
Launch mode disable (External Signal)
Now I know the arduino cannot power the solenoid directly as it takes around 6 amps to run. My thought was to use an automotive 12v relay, but those take up to 200ma to trip with a 12v source and the arduino only pumps out 20ma max. How can I trigger this relay using the arduino? My friend suggested I use the motor control shield but that seems overkill to just power one relay.
Thanks, Max

You need a power MOSFET which could probably run the solenoid directly.

Excellent. So here's my thinking:
Connect gate to output pin on arduino uno
Ground source pin
Drain pin gets connected to one of the solenoid wires
Connect other solenoid wire to 12v+
Does this sound correct?

"Connect Gate to output pin on arduino uno through a resistor of about 200-300 Ohms." (The theory is that the Gate acts like a capacitor and may draw more current than is safe for the Arduino.)

"Ground Source pin and Arudino Ground to 12V Ground."

Make sure MOSFET is N-Channel and "Logic Level" (switches fully at 5V or less).

And pull down the Gate to Ground with a 10k-ish resistor so the MOSFET doesn't switch on before the Arduino drives it HIGH.

While you're here, would you like to learn to run many tasks on a single thread using non-blocking code techniques? It's like the forum specialty.

AVRs compared to PC's is like EV skateboards compared to cars.
Approach differently for best results.

Just wondering if you've learned forth?

When interfacing to automotive components, especially those which are grounded directly to the chassis, sometimes a P Channel mosfet is better. If you use a P Channel mosfet, you'd need an additional NPN transistor to form a "High Side Switch".

Has the solenoid coil got its own ground connection to its coil or is the coil grounded by its housing and fitting to the chassis ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.