SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By cgull
#179943
Disclaimer: I just got the Uno R3 this week and am at the bottom of learning curve :oops: The only thing I've really done at this point is run through all the basic tutorials for wiring all the components.

I have an Optex AX-70TN photo eye that I would like to connect to the Uno R3. I'm powering the photo eye with 12V and the documentation claims an NC alarm output 28V: http://www.optexamerica.com/sites/defau ... _200TN.pdf

The problem is I'm not seeing anywhere near 28V when I connect my multimeter. In fact, it barely registers on my multimeter when triggered and the reading fluctuates the whole time. I must be doing something wrong b/c it reads well under 1 volt when tripped. I measured the DC power in just to make sure and it reads correctly at 12v.
User avatar
By Ross Robotics
#179947
It does not output 28V, that's the maximum rating.. If you are supplying 12V, how can it possibly output 28V?? Have you measured the output voltage when in both states? It should output 12V or 0V respectively depending on state.

On that note, the Arduino cannot tolerate 12V input on a pin. You will need some circuitry to drop that voltage to 5V. Some resistors making up a voltage divider should work.
By Mee_n_Mac
#179953
cgull wrote: The problem is I'm not seeing anywhere near 28V when I connect my multimeter. In fact, it barely registers on my multimeter when triggered and the reading fluctuates the whole time. I must be doing something wrong b/c it reads well under 1 volt when tripped. I measured the DC power in just to make sure and it reads correctly at 12v.
The alarm output is listed as "NC, 28vdc, 0.2a max". This tells me it's a switch, which is normally closed, that opens when the beam is broken. The switch is rated for 28v and 0.2a.

Are there 2 output terminals ? If so try measuring the resistance between them w/an ohmmeter in both the trapped and non-tripped states.
#179957
I measured the resistance and it is 5.1 (on the 200 setting) when it wasn't tripped and when tripped the meter just shows a '1.' which usually means it's out of range. No matter what range I have the ohmmeter on it always shows '1.' when the sensor is tripped. I have a Sperry DM-350A btw.

I figured it wouldn't be 28V but I thought I would see something close to my input voltage (12V). Since I'm so new to this I don't know the implications of it being a switch but hopefully measuring the resistance will assist!
By Mee_n_Mac
#179960
The 5 ohm measurement seems high to me but you've confirmed what I thought. So connect 1 terminal to the Uno's ground and the other terminal to the Uno pin you want to use as an input. Then declare that pin as an input w/the internal pull up enabled. Read the pin as done below. The input will be HIGH when the beam is broken.

http://arduino.cc/en/Tutorial/InputPullupSerial
#179962
That worked thanks!!! I had a button wired on my breadboard from previous examples so it was basically plug and play. This was the first time I used the internal pullup vs using a resistor so that was good to learn too.