Connecting a reed switch with a zener and LED to arduino

Hi all,

I am working on a project -part of which is to detect the retraction and actuation of a pneumatic cylinder. For this I have placed the below attached reed sensors in the two positions of the pneumatic cylinder.

I have used the multimeter and it shows continuity to check if thesensors work, but i am not able to get the LED to light up. Currently the two wires from the sensor is connected to the pin and grnd. I use and arduino mega2560.

Can you please explain what is the right way to connect the sensors to arduino in such a way that i get an input signal to the pin as well as the sensor lights up the LED when the magnet in the pneumatic cylinder reaches both actuated and retracted positions. I havent created a program yet for the sensors.
image
image
image

A reed switch is like a button. The only difference is that the contacts are protected in a glass tube and that it is activated with magnetism.
However, you have a special reed button, one that is meant to be used with 24V with a PLC. Can you buy normal reed switches ? If you would add 24V to your circuit then there is a chance that the Arduino board and your computer gets damaged by the 24V if something goes wrong.

The manufacturer's page of the D-Z73: https://www.smcpneumatics.com/D-Z73.html
With datasheet.

Exchange the switches for D-Z80s;

Thank you @JCA34F for the recommendation. Once i buy that do i just connect one end to the pin and the other end to ground? how would the configuration differ from the D-Z73?

Thanks @Koepel @JCA34F , Is there any way i can use the D-z73 in my setup with something to drop down the voltage so that it does not burn out any other parts? i only ask because i am working on a budget,

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