Help with air solenoid


This is my first post on the forum.

I am looking for some advice on controlling a 24v air solenoid with photoelectric eye and arduino.

I have attached a photo of the schematic as well as a general shot of the wiring/ solenoid valves.

What I am looking to do is to bypass the clip signal from the Vemag and instead send a signal from a photoelectric eye mounted on a packaging machine to signal SOL105.

I need help in determining the correct photo eye, and how to wire and code the arduino.

This is the model of solenoid:

This is the current photo eye I am using to signal our date printer on the packaging machine and it works well, but I’m not sure if it is suitable to send a signal for the solenoid (It is a Fotek CDR - 30X) :

Any help is appreciated.



Sorry - Here is the attachment of the schematic.

What's the purpose of the Arduino?

It would be used to control the time the solenoid is activated once it receives a signal.

Currently the machine is set with a clip time of 140 ms.


If there's room in the enclosure I think you'd be better served using an industrial timer like this. Many others make such things. Since all you want is a timing function it should be easy peasy for any competent controls type.

With the Arduino, besides working up reliable code, and maintaining it, and keeping a spare, and..., you have to deal with interfacing the 5VDC Arduino to the equipment's 24VDC levels. More componentry/connections. And, your insurance agent may raise an eyebrow at such. Certifications and all that.

Not to mention whatever time it'll take someone to develop the Arduino approach.


Hi Doug,

Thanks a lot for the suggestion.

Originally I thought the arduino would offer some increased flexibility, but taking your points into consideration, this seems like a simpler idea.

Thanks a lot!

You're welcome! ;D