Compressed air flow control using IR proximity sensor, Relay & Solenoid Valve

I am doing a project on pneumatic ring gauges. I need to develop a system such that when the job is inserted in the ring gauge air flow should start and when it is removed air flow should stop. I have written the program, drawn the circuit diagram and made connections but its not working. IR proximity sensor is giving signal to the Arduino UNO R3 but later relay and solenoid valve are not getting energised. Can you please help me on this? Check the program and circuit diagram and please tell me whats wrong.

Most probably you killed the transistor. The relay coil deserves a snubber diode.

Please insert code as text, using Code Tags </>, not as images.

Yes thank you very much for your guidance Sir..