Arduino with Solenoid

I have the Arduino with the ATmeag328, new learner here.

I've been wanting to have the Arduino board activate a solenoid.

I have the 12 Volts power and won't require a regulator. Just need to figure the way to wire in a relay for it.

I've noticed most the relays I'm looking at have 5 terminals. I can basicly firgure out four of the pins. Not in this particular order. But the 5th or some had 6 pins has me totally lost.

1 - Pin 8 to receive signal from Arduion 2 - 12v 3 - To Solenoid 4 - GND

Does any one have a simple schematic or notes for building a simple relay that will work?

I'm sure there is a resistor etc. just not sure yet so I'm hitting a wall.

When it sends the signal it needs to hold it pulled or pushed until it's released.

Thanks so much. Bob

These are the ones we'll be using. Don't have them in yet, but here is the spec sheet on it.

Open a jaw to grab a CD or the same but push type to push a button. The pull type will be used to hold the disk long enough to move it. maybe 15 - 20 seconds max but we will figure worse case double to 45 seconds.

Coil Resistance (+/-10%) Ohms 36 Size (Length x Diameter) (inch) 1.5 x 1.0 x 0.8 Type Open frame-pull Voltage (VDC) 12 Holding Force (lbs.@200C) 1.1 Power Consumption (W) 4 Shaft Diameter (inch) 0.31 Stroke 0.24 Weight (lbs.) 0.21

Thanks Bob

And here is one of the other ones.

Coil Resistance (+/-10%) Ohms 90 Size (Length x Diameter) (inch) 0.8 x 0.6 x 0.5 Type Open frame-pull Voltage (VDC) 12 Holding Force (lbs.@200C) 0.16 Power Consumption (W) 1.6 Shaft Diameter (inch) 0.2 Stroke 0.24 Weight (lbs.) 0.04

Thank You… This will be great.

Still new at this I must be really over looking something. I don’t see the 2N222 transistor in the diagram.


I suggest that the clamping diode would be more effective mounted right across the coil terminals 1 & 2 of the solenoid. Helps keep the transients off the +5vdc and ground buses.

The shown TIP 120 transistor would be more suitable in my opinion.


OK, great. I'll work with this. Thank you both so much. I already have the diagram printed out and made the note. There is so much to learn with this stuff. Good thing I have a lot of time on my hands for a few month's. Thanks. Bob

OK, great. I'll work with this.

Also not shown in that drawing, but there must be a wire connection made between the external power supply ground to the transistor emitter lead and then on to a Arduino ground pin, otherwise the transistor will not be able to turn on.


OK, with the emitter side already going to ground just jump to that same spot? and also jump one to the Arduino ground right?

OK, great. 1/4 watt for the resistor will work?

OK, thanks. I'll book mark that.


The solenoid you're describing looks pretty much exactly like what I am looking to use in a project I am working on. I did some Googling based on the specs you mentioned, but was unable to find a U.S. source for anything like it. Any chance you could post a link to the source for the solenoids you ended up using?

I got mine at Their part number 262247. These are 12v but are not very big. Maybe 1/2" travel but they had several others.

Thanks much for the quick answer. On order now!