Thread: Photo Sensor
View Single Post
  #4   Spotlight this post!  
Unread 06-02-2016, 18:25
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,570
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Photo Sensor

Quote:
Originally Posted by MeganPowerHawks View Post
Our sensor is the Allen Gradley Right-Sight sensor, PN 42EF-DIMNAK-A2. We aren't sure if it is digital or analog, and we can't find the information online.
I found it first try, but it appears that the part number is actually 42EF-D1MNAK-A2. You can find info on this page. In the product selection table, this is designed for a "diffuse" sensing mode, meaning to detect a wall or boulder. (The table shows suffix -F4, but the notes at the bottom indicate that -A2 is the same device with diferent connector.) This is an NPN sensor (works with a pull-up resistor), so you don't need to add an inverter. Unfortunately, this looks like it's designed to be powered by 10.8 to 30VDC, and the DIO only provides 5V.

My recollection is that the 0V of the DIO may not match the 0V of the electrical system, so in order to use this, you will need to power the sensor from a 12V branch circuit and do some sort of isolation to switch the DIO. The simple mechanical solution would be a 12V relay, and the electronic solution would be an optoisolator. Because the isolator breakout I linked to is designed for 5V input, you will need to add another resistor in between the output of your sensor and the input of the isolator. If I've done my math correctly, a 680 ohm or 1k resistor should do it.

Edit: both my look at the data sheet and a PM from Ether reminded me that if you have a 3.3V or 5V PNP logic sensor, you will need to use an inverter between the sensor and the DIO port. More info in this thread.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 06-02-2016 at 20:16.
Reply With Quote