Log in

View Full Version : Looking for a new Photo Sensor


MeganPowerHawks
06-02-2016, 08:58
We are looking for a digital photo sensor. We previously had the Allen Bradley right-sight 42EF-DIMNAK-A2. Is there any way to modify it to make it a digital sensor? Or, does anyone know of a good digital photo sensor? Thanks!

Joe Ross
06-02-2016, 10:02
What makes you believe it isn't a digital sensor?

MeganPowerHawks
06-02-2016, 10:12
What makes you believe it isn't a digital sensor?

When testing, we were getting a range of values rather than just 1 and 0. We're working on it right now, but from what we can tell, it doesn't return boolean values in the code.

Ether
06-02-2016, 12:12
When testing, we were getting a range of values rather than just 1 and 0. We're working on it right now, but from what we can tell, it doesn't return boolean values in the code.

How do you have that 42EF-DIMNAK-A2 wired to your roboRIO?

... and how are you reading it in your code?

GeeTwo
06-02-2016, 19:08
The 42EF-DIMNAK (http://www.ab.com/en/epub/catalogs/12772/6543185/6543187/11502203/6900212/print.html) is digital, but it is designed for operation using 10.8 to 30V, not 5V. See this thread (http://www.chiefdelphi.com/forums/showthread.php?t=143265&highlight=D1MNAK) for more details.

dtengineering
06-02-2016, 20:58
In a general context, however... and note that there are likely better solutions in this specific case based on what I've read above... but in a general context you can turn an analog input into a digital output by using a comparator https://en.wikipedia.org/wiki/Comparator

There are a number of cheap op-amp/comparator chips out there... you feed your analog sensor into one input on the comparator, and use a potentiometer as a voltage divider on the other input to provide a reference voltage. When your input voltage exceeds the reference voltage, your signal goes high (or low, if you want to hook it up that way).

Google a bit and you'll find sites like this http://home.cogeco.ca/~rpaisley4/Comparators.html but maybe check out some of the options above before using this solution in this specific case.

Jason

Richard100
08-02-2016, 08:52
Megan - For a digital photo sensor, we like the DFRobot IR sensor, it is adjustable to trigger at distances from 3 to 80 cm. Runs on 5VDC for $7.50. Part number SEN0019, DFRobot.com. No affiliation.

We can give you one of ours if you like, so you can try it out. PM me or contact us through team836@robobees.org.

rfolea
08-02-2016, 09:05
AutomationDirect has lots of different kinds of photo sensors.

Use your KOP voucher to take $30 off ...

AutomationDirect Sensors (http://www.automationdirect.com/adc/Shopping/Catalog/Sensors_-z-_Encoders)

Make sure you order an NPN output version and that it runs on 12Vdc.

Kevin Sevcik
08-02-2016, 09:50
Megan - For a digital photo sensor, we like the DFRobot IR sensor, it is adjustable to trigger at distances from 3 to 80 cm. Runs on 5VDC for $7.50. Part number SEN0019, DFRobot.com. No affiliation.

We can give you one of ours if you like, so you can try it out. PM me or contact us through team836@robobees.org.Seconded. These are nifty little doodads. Reminds me that I need to order some for some automation tasks on the robot....