Relay Trigger

I am a total noob (just started looking into Arduinos an hour ago) and would like some advice if this project would be at all possible and how to go about it.

I need to trigger an automotive style relay/Solenoid like this:

The arduino needs to supply +12v to the solenoid to trigger it.
I dont think it pulls more than 5 amps, I doubt its even that much.

What I would like it to do:
Momentary switch is pushed
Relay on 12Sec
Relay off 2 Sec
Relay on 2 Sec
Relay off 2 sec
Repeat 2 sec delay (X) times
Stop

Im having a hard time explaining it, can do a video if someone wants it.

Im thinking a UNO and a relay shield might be able to do this? I would like it to be small, would a mini and relay shield be possible?

Thanks,
Dylan

A relay may not be the best option for turning something on and off many times.

What are you controlling and what is the load current?

It may be better to use a mosfet to control the load.

Whatever you cannot control the relay directly from the arduino, you MUST have a driver to switch the relay or you will damage your arduino.

Weedpharma

First question:
Do you, or do you not, have a multimeter?

If you do, measure the resistance of the relay coil.

If you do not, then do not come back here until you have purchased one and measured the coil resistance. :smiley:


Typical useless website! Do they not even supply the nuts? Is this a replacement part only?

I do but can't find the damn thing. Will try to measure resistance and amp draw tomorrow.
I know the arduino won't power it by itself, that's why I mentioned a relay shield.

The solenoid shown would have no problem switching at the intervals described.

Looks like the op may want to switch some serious current though, solenoid like this probably capable of 200 amps DC or more.

Not easy to get a mosfet to do that.

I doubt coil current would be 5 amps, more likely 500mA .

car starter solenoid tutorial

That type starter solenoid has one side of the coil grounded internally (through the metal base) so you'll have to switch a positive voltage to control it - and it's gotta be ~12v DC. Even if the Arduino pin could supply enough current to trigger the relay it'd be far short of the needed voltage.

The way to do it with the fewest number of parts is to set your output pin to go low (ground) when active, and use that to control the gate on a beefy P-channel MOSFET. Ground the MOSFET's gate, and it connects the solenoid coil to B+.

Some of those big starter relays already have flyback diodes inside to shunt the high voltage when the coil turns off. If there's no diode, it can damage the MOSFET (usually not immediately, it'll work for a while until it suddenly doesn't). Adding an external diode is a good idea, even if there's already one inside the solenoid. Two diodes in parallel will still work fine.

bluejets:
The solenoid shown would have no problem switching at the intervals described.

I know it wont, since thats what the one in my truck and thousands (millions?) of other 6.9/7.3 trucks have been doing for 30 years. The stock controllers are junk and mine died many moons ago.

bluejets:
Looks like the op may want to switch some serious current though, solenoid like this probably capable of 200 amps DC or more.

Glowplugs. Pretty sure they pull close to 300 amps when heating up.

bluejets:
I doubt coil current would be 5 amps, more likely 500mA .

Thats what I was thinking.

raschemmel:
car starter solenoid tutorial

What am I supposed to be finding in here?

cat_herder:
That type starter solenoid has one side of the coil grounded internally (through the metal base) so you'll have to switch a positive voltage to control it - and it's gotta be ~12v DC.

This was mentioned in my first post.

cat_herder:
Even if the Arduino pin could supply enough current to trigger the relay it'd be far short of the needed voltage.

Which is why I was thinking a relay module like this to supply +12v to the solenoid:

cat_herder:
The way to do it with the fewest number of parts is to set your output pin to go low (ground) when active, and use that to control the gate on a beefy P-channel MOSFET. Ground the MOSFET's gate, and it connects the solenoid coil to B+.

Ill have to look up how mosfets work but that sounds like a decent idea.

cat_herder:
Some of those big starter relays already have flyback diodes inside to shunt the high voltage when the coil turns off. If there's no diode, it can damage the MOSFET (usually not immediately, it'll work for a while until it suddenly doesn't). Adding an external diode is a good idea, even if there's already one inside the solenoid. Two diodes in parallel will still work fine.

No idea if it does, but I could add one. I have a couple 3 amp diodes laying around.

cat_herder:
That type starter solenoid has one side of the coil grounded internally (through the metal base)

Why then, does it have two coil terminals?

cat_herder:
The way to do it with the fewest number of parts is to set your output pin to go low (ground) when active, and use that to control the gate on a beefy P-channel MOSFET. Ground the MOSFET's gate, and it connects the solenoid coil to B+.

Care to think that through a bit more carefully? (Actually, a lot more carefully?)

cat_herder:
Some of those big starter relays already have flyback diodes inside to shunt the high voltage when the coil turns off. If there's no diode, it can damage the MOSFET (usually not immediately, it'll work for a while until it suddenly doesn't). Adding an external diode is a good idea, even if there's already one inside the solenoid.

And how will you know which way around any such diode would be?

{Hint: measure the coil resistance. If greater than 12 Ohms, connect the coil in series with a turn signal (or single stop light) globe. If the relay snaps in connected one way round but the bulb lights brightly the other, yes, there is such a diode in there. If it snaps in the same connected either way round, then no diode. More likely it will have not a diode, but a resistor in parallel with it to suppress arcing.}

Paul, the second stud is a legacy thing from back when ignition coils used ballast resistors. That stud is a alternate coil power supply that bypasses the ballast resistor during cranking when B+ is lower and the resistor could reduce the coil energy too much to get a reliable spark.

If there's a diode inside it'll only be on the control pin, easy enough to check with a DVOM. One end of the relay coil goes to the pin, other end goes to the metal mounting flange.

Just ordered a "16hz" Uno beginners kit and a single relay board like the one above. If this project doesnt work out I will not be super disappointed (actually Im kinda afraid of frying my glowplugs trying this), and will just use the arduino for something else.

Im thinking I just need to make a simple modified "blink" type program that will trigger the relay in the intervals I want.

Just ordered a "16hz" Uno beginners kit

Are you sure you don't mean 16 Mhz ?