Maker Pro
Maker Pro

Wiring/Schematic help with SMC Solid State Auto Switch D-Y7NW

DrexEng2015

Aug 2, 2015
4
Joined
Aug 2, 2015
Messages
4
Hello,

This is my first post, I hope this is the right area. I have been messing around the past few days with a what is apparently called a Auto-Switch made by SMC. It belongs to a salvaged linear actuator axis and serves as an end stop or limit switch. I am not sure if it operates optically, or if it is like a reed switch, and is influenced by a magnetic field? I found the component part # under the underside of the device after removing it from the actuator assembly and it is SMC "D-Y7NW" 24VDC.

This is the link to the device:
http://www.smcpneumatics.com/D-Y7NW...Q5MzBousI-eqtOL_tKV_keK2F4Dn5dEljUhoCnPTw_wcB

The component has 3 wires colored one black, one brown, and one blue. I found a data sheet as well

http://content2.smcetech.com/pdf/AutoSw.pdf

and supposedly black is signal, brown is V+, and blue is ground. The datasheet seems to showing two different wiring possibilities. I tried connecting the signal wire to ground through a resistor, and nothing happened. I tried connecting signal to V+ through different resistors, and with large values nothing happens, and with a small value it drew 200mA from my power supply. I am worried I have no idea what I am doing with this device, and I was hoping someone with more expertise might be able to please offer some insight one how this device should be operated?

Thank You!

P.S.

If it is of any use here is a video of me messing around with the actuator, and a stepper motor. I show the device at 4:00 minutes.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
The sensing mechanism is probably magnetic, which is irrelevant to how you connect the three output wires. This is an NPN current-sinking device. The brown wire should connect to the positive terminal of a 24 VDC power supply. The blue wire should connect to the common or "ground" terminal of the 24 VDC power supply. The black wire is the collector of an open-collector NPN transistor controlled by the sensing mechanism. The emitter of this transistor is connected to the blue wire.

You connect a current-limited load between the brown terminal and the black terminal. The load can be a relay coil (use a diode across the coil, cathode to brown wire, anode to blue wire), a resistive load, such as a pull-up resistor, or an optical isolator. If you desire to interface to an Arduino input, the pull-up resistor will connect to the +5 VDC Arduino power and have a value of about 1000 to 10,000 ohms. The Arduino input connects to the black wire. The blue wire must connect to the Arduino common as well as to the 24 VDC power supply common.

You may be able to get by with less voltage than 24 VDC to power up this device, but that is the rated operating voltage and is typical for industrial ladder logic. If it is a magnetic sensor, it may be based on a Hall-effect device whose signal conditioning electronics is powered from the brown and blue wires. I would suggest you experiment to determine what minimum supply voltage is necessary for reliable operation.
 

DrexEng2015

Aug 2, 2015
4
Joined
Aug 2, 2015
Messages
4
Hello hevans1994,

Thank You very much for your informative reply!

With the configuration you suggested, I am now able to get the green led of the switch to turn on when the moving axis is just above it, and I was able to confirm that it is a magnetic sensor by holding a test magnet nearby and watching the led come on, and by finding the magnet under the actuator after disassembly. I used two 1/4 watt 1.1kOhm resistors in series to act as the resistive load going from signal to V+.

I then proceeded to take the output wire and attach it to the Analog input on my arduino, and I got a value of 28mV when the led is off, and 35mV when it is on, when watching the serial monitor. I do not think the resistors I am using so far are the "pull-up" resistors (R1 & R2) you were referring to, but I just want to double check before I do something stupid that draws way too much current again and I start burning up devices . I attached a sketch of the circuit I have so far, and up on top that dark black solid circle is replaced with what I think you are suggesting down below. Can you please confirm?

Thanks again!
 

Attachments

  • IMG_1298.JPG
    IMG_1298.JPG
    198.5 KB · Views: 140

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
SMC make pneumatic devices and that appears to be similar to the SMC switches used to detect an internal pneumatic piston position, the piston requires a magnetic ring and the switch is a form of proximity sensor.
M.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Hello hevans1994,

Thank You very much for your informative reply!

With the configuration you suggested, I am now able to get the green led of the switch to turn on when the moving axis is just above it, and I was able to confirm that it is a magnetic sensor by holding a test magnet nearby and watching the led come on, and by finding the magnet under the actuator after disassembly. I used two 1/4 watt 1.1kOhm resistors in series to act as the resistive load going from signal to V+.

I then proceeded to take the output wire and attach it to the Analog input on my arduino, and I got a value of 28mV when the led is off, and 35mV when it is on, when watching the serial monitor. I do not think the resistors I am using so far are the "pull-up" resistors (R1 & R2) you were referring to, but I just want to double check before I do something stupid that draws way too much current again and I start burning up devices . I attached a sketch of the circuit I have so far, and up on top that dark black solid circle is replaced with what I think you are suggesting down below. Can you please confirm?

Thanks again!
The output to the Arduino needs to use a 5 V supply (your lower sketch) for the "pull-up" resistor. The value of the "pull-up" resistor is not critical. It's purpose is to allow the transistor collector to be "pulled up" to the supply voltage when the transistor is OFF, while limiting the current from emitter to collector when the transistor in ON. The voltage you measure between the transistor collector and the common or "ground" terminal should vary from almost zero (the saturation voltage of the transistor) when the transistor is ON to +5 V when the transistor is OFF. If you use the +24 V supply and the two series-connected 1.2 kΩ resistors for "pull-up" the collector voltage will go to +24 V when the transistor is OFF. This is more than should be applied to the Arduino analog or digital inputs.

The voltage readings you are getting are wrong: one of these should be +24 V. I will assume that the green LED comes on when the transistor is conducting and goes off when the transistor is not conducting. If that is true, then you should measure +24 V at the output when the LED is off, not 28 mV. Double check your connections and use a DMM instead of the Arduino A/D converter to measure the output voltage. You may have damaged your Arduino if you connected +24 VDC to any of its inputs.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
I checked my inventory and I have a few of these on the shelf, The spec sheet shows voltage range 5v,12v, 24v capability.
O.C. NPN output.
You can also get them in 2-wire versions for low load apps, Arduino etc.
M.
 

DrexEng2015

Aug 2, 2015
4
Joined
Aug 2, 2015
Messages
4
The output to the Arduino needs to use a 5 V supply (your lower sketch) for the "pull-up" resistor. The value of the "pull-up" resistor is not critical. It's purpose is to allow the transistor collector to be "pulled up" to the supply voltage when the transistor is OFF, while limiting the current from emitter to collector when the transistor in ON. The voltage you measure between the transistor collector and the common or "ground" terminal should vary from almost zero (the saturation voltage of the transistor) when the transistor is ON to +5 V when the transistor is OFF. If you use the +24 V supply and the two series-connected 1.2 kΩ resistors for "pull-up" the collector voltage will go to +24 V when the transistor is OFF. This is more than should be applied to the Arduino analog or digital inputs.

The voltage readings you are getting are wrong: one of these should be +24 V. I will assume that the green LED comes on when the transistor is conducting and goes off when the transistor is not conducting. If that is true, then you should measure +24 V at the output when the LED is off, not 28 mV. Double check your connections and use a DMM instead of the Arduino A/D converter to measure the output voltage. You may have damaged your Arduino if you connected +24 VDC to any of its inputs.


Hi hevans1994,

Thank You for your reply. I used a DMM as you suggested, with the pull up configuration in my upper drawing and two 1.1k resistors in series, going to 24V. When the transistor is in the on state (led illuminated), I get 0.24V on the wire I would use for output, when it is in the zero state(led off), I get 0.19V. I then implemented the bottom drawing, and used the arduino 5V supply, (common grounds), and two 1.1k resistors in series. When the transistor is on, I get 5mV, and 0mV when it is off, on both my DMM and arduino Analog input. I also experimented with other resistor values, and despite the voltage values where different, the Voltage Difference(Delta) remained the same at Delta-5mV. I still feel like I must be doing something wrong, but at the same time, despite I am inexperienced, I have definitely used a pull-up resistor before. Just recently I did this exact same thing to get a digital input from a photo-interrupter. At least at this point, I am able to get a quantifiable change using this device, although I was hoping to use it as a digital signal, worst case scenario I can use an op-amp, or an arduino program to output 5V from a digital pin based on the analog inputs from the sensor. Thank You very much for your help! :)
 

DrexEng2015

Aug 2, 2015
4
Joined
Aug 2, 2015
Messages
4
I checked my inventory and I have a few of these on the shelf, The spec sheet shows voltage range 5v,12v, 24v capability.
O.C. NPN output.
You can also get them in 2-wire versions for low load apps, Arduino etc.
M.

Hello Minder,

Thank You for your reply. I think these sensors might be a little different, but I know what you are talking about, I have one right here on my desk, that is on a pneumatic piston with about a 25mm stroke. It has two wires only, and it appears to be a mechanical reed switch, the serial is SMC D-93A. It is great for getting "closed-loop" feedback on piston position. That would be much easier to implement in this case, but the specific sensors I am trying to use, are already built into the linear actuator assembly, so my goal is to use them. Plus I get excited when I can't figure something out, it means I have an opportunity to learn something new!

Thanks!
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
The part number in your OP shows a voltage range of 4.5v - 28vdc.
M.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
It sounds like the open-collector NPN transistor is shorted from collector to emitter. This could possibly occur if you connected the +24 V supply to the output (black wire) without a current limiting resistance, and then turned the transistor on.

There should be effectively an open circuit between the black wire and the blue wire when the transistor is not conducting. You can't really tell from the LED state whether the transistor is off or on, although my inclination would be to believe that LED on equals transistor on and LED off equals transistor off. Still, that does not explain how you would measure less voltage from black wire to blue wire with the transistor "off" than you do with the transistor "on". It appears to me that the voltage measurements you have made indicate this sensor has a shorted output transistor.

One last test you can perform is to measure the resistance from the black wire to the blue wire using your DMM. Check with another voltmeter that your DMM is applying a positive voltage to the black wire with respect to the blue wire. Normally this would mean the red DMM lead goes to the black wire and the black DMM lead goes to the blue wire, but I have seen meters where the opposite is the case. Check the polarity of the ohmmeter leads, applying positive to the black lead and negative to the blue lead. There should be a substantial difference in resistance when the green LED is on versus when it is off. If you measure a very low resistance (or the same resistance) in either case, the sensor is definitely defective.
 
Top