Controlling a 12V Solenoid with an Arduino Mega

Hi all,

I am working on a senior design project trying to control this Solenoid:
https://aheinfo.com/product/v61r517a-a212jb-v61-series-12vdc-5-2-locking-solenoid-actuated-spring-return-1-4-npt-ported-valve/

I am doing this with a MOSFET, with what I have read is the easiest way to do this. I am doing it with the IRF520 MOSFET board.

I might be an idiot mechanical engineer right now, but when I got the wires that connect to the solenoid there were 3 wires, red, black and white. I assumed that was power ground and trigger of some kind. I am just not sure how to connect everything to the board so that I can power it properly. Any help would be greatly appreciated.

The link goes to a sales site. If You post a link to the technical manual, or datasheet, it would help both of us.

It’s a locking solenoid actuated/spring return ported valve so it would probably have more than 2 wires.
Why did you buy this type of valve?

According to datasheet, coil power is 2 Watts, 2W / 12V = 167mA.
Which Arduino are you using? IRF520 won't work with 3.3V gate voltage, you need a logic level MOSFET with low threshold voltage (< 1V).

We needed the ability to actuate a piston in two directions, that was the main reason we had bought this one.

Not sure if it was the most ideal choice looking back on it, but due to time constraints need to adapt with what I got right now.

I am using the Arduino Mega, so if I need a mosfet with a logic level like you are saying any recommendations?

With 167mA current, I would use the old, reliable 2N2222 BJT transistor.

Scheme-it-export-NPNMot-1-2024-04-10-16-59

1 Like

A solenoid like that has typically 3 connections, marked 1, 2 and PE.

If not marked, the one that’s different is the PE.

If you’re not in an area with hazardous materials and/or powering with low voltage you can leave the PE open.

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