Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Photoeye's not working-Difference between RoboRIO and Digital Side Card? (http://www.chiefdelphi.com/forums/showthread.php?t=133484)

SuperBK 29-01-2015 15:42

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Other sensors like the ones from Banner also show the output being pulled up to the supply voltage. I think that's just a generic way of showing it needs to be pulled up. Without the pullup it just floats and goes nowhere near 12 volts, so I don't see that as hurting anything. It pulls up nicely to 5 volts, just doesn't go low enough.

Alan Anderson 29-01-2015 15:47

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Quote:

Originally Posted by billbo911 (Post 1435740)
If I am reading the Spec sheet for this sensor correctly, it needs to be connected to 10-30vdc.

Correct.
Quote:

In addition, the pull-up, as shown in the wiring diagram, needs to be connected between the same supply and the output pin.
Not correct. The diagram shows how the sensor is typically used, but its outputs are open collector and will work with a pullup to any voltage.
Quote:

If that is correct, and you also connect the sensor output to the RoboRio DIO which are 3.3v/5vtolerant, you may just destroy that input, or to whole controller.
Also not correct. The roboRIO signal pins will all tolerate battery voltage without being damaged.
Quote:

More than likely there is an internal current limiting resistor in sensor that is also preventing the output from dropping below 1vdc.
I doubt it's an intentional current limit.

The idea of connecting the output to an analog input is probably the simplest. I would power the sensor from the VRM's 12 volt output, to protect it from brownouts.

billbo911 29-01-2015 15:59

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Quote:

Originally Posted by Alan Anderson (Post 1435747)
Correct.

Not correct. The diagram shows how the sensor is typically used, but its outputs are open collector and will work with a pullup to any voltage.

Also not correct. The roboRIO signal pins will all tolerate battery voltage without being damaged.

I doubt it's an intentional current limit.

The idea of connecting the output to an analog input is probably the simplest. I would power the sensor from the VRM's 12 volt output, to protect it from brownouts.

Thanks for fact checking me. I wasn't aware that "any voltage" is safe to be used with open collector. I can see how that diagram might be generic and the pull up could be connected to +5 or +3.3.
I also didn't know that the inputs on the RoboRio can tolerate battery voltage. That is excellent in our usage because, well, sometime that happens.

Agreed, connecting this to an analog input, with a voltage divider, would be the simplest way to make this sensor useful.

jfitz0807 29-01-2015 20:34

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Sorry, but I'm getting a little confused. I have an Allen-Bradley 42EF-D1MNAK-A2. I have wired the brown (+12) and blue(gnd) wires to a PDP channel for 12V. I then put the white wire to an Analog signal input (Analog channel 1). The black wire from the sensor is floating.

The white wire is sliced into the white wire of a PWM connector. The red and black wires are isolated from each other and floating as well. I was expecting that the ground on the Analog input channel was tied to the ground of the PDP.

The sensor seems to be doing something. As I move my hand back and forth under it, the LEDs come on and off. Soecifically, when the green LED is on, it's reading 0.7v. When the orange LED is on, it reads 0.4v. When the orange and red LEDs are both on, it also reads 0.4v. I guess I was expecting a little wider range of values.

I'm also trying to determine if we can use this to "see" when we get to the scoring platform. Any suggestions?

Alan Anderson 29-01-2015 23:09

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Quote:

Originally Posted by jfitz0807 (Post 1435866)
Sorry, but I'm getting a little confused. I have an Allen-Bradley 42EF-D1MNAK-A2. I have wired the brown (+12) and blue(gnd) wires to a PDP channel for 12V. I then put the white wire to an Analog signal input (Analog channel 1). The black wire from the sensor is floating.

The white wire is sliced into the white wire of a PWM connector. The red and black wires are isolated from each other and floating as well...

The output of the sensor does not produce any voltage. All it can do is sink current. You will need to add a pullup resistor. I suggest about 5k between the +5 and SIG pins (red and white wires) on the analog input.

SuperBK 30-01-2015 01:25

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
We connected our sensor to an analog input with a pullup to 5V. In one state, it reads near 5V, and in the active state, it reads 1.3 volts. We split the difference to delineate on or off. We powered it from the VRM. Seems to work OK.

SuperBK 06-03-2015 08:09

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Just for completeness with the QMRN-0N-0A, we wound up using an opto-isolator to connect it to a digital input. I grabbed these from Sparkfun: https://www.sparkfun.com/products/314.

This separates the 12V and 5 volt side completely. The sensor's open collector input drives the input of the isolator through a 470 ohm resistor, and the collector output transistor of the isolator is connected to a digital input on the roboRio. That gives me a nice low logic low level.

Kevin Sevcik 06-03-2015 11:58

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
Okay, I apologize for not coming across this thread earlier. I feel like someone should do a little testing and then write up a white paper on what sorts of sensor work with the roboRIO and how to safely connect them. I think this probably should have been FIRST or a beta team, but whatever.

For the record, I'm declaring it ridiculous to be concerned about connecting a DIO pullup resistor to 5V. RoboRio specs say the inputs are 3.3V/5V compatible, and ozrien's pullup was dumping 4.98V onto the signal pin with no ill effects. We have microswitches 3-wired to the DIOs, so we're shorting 5V directly onto the signal line with no ill effects.

You should have absolutely no concern about applying 5V to any of the DIO signal pins. The only path from the 5V to the 3.3V there is through the pull-up resistor, which is going to limit things to <1ma of boost on the 3.3V line. I would quite honestly be MUCH more concerned about connecting 3.3V through a pullup to the signal line. If you short around that 3.3V resistor and short to the 5V pin on the DIO header, you absolutely ARE shorting 5V directly onto 3.3V. Far better to keep potentially error-prone unprotected 3.3V wires far away from that 5V pin.

The only ways a short 5V pullup could possibly go wrong are if the internal pullup resistor is shorted already (in which case you're already in trouble), or if you accidentally end up shorting 5V directly to ground with no pullup. The latter is just as big a problem with a 3.3V pullup, and I suspect/hope the power supplies are short circuit protected.

So I'm declaring it 100% safe to connect 5V to the signal lines in whatever fashion you choose. You're all obviously welcome to continue with your 3.3V pullups and connecting things to analog inputs and whatever, but I think you're needlessly complicating and confusing things. And thus needlessly worrying and confusing teams.

Now, connecting 12V sensors into the 5V IO system is obviously trickier, but anything with an NPN open collector output should be connectable just like those Banner sensors with a 5V pullup. Opto-isolators shouldn't be necessary unless you're worried the output transistor is going to meltdown and dump 12V directly onto the output line. And the ground as well, since that's the third leg of the output transistor.

SuperBK 06-03-2015 14:26

Re: Photoeye's not working-Difference between RoboRIO and Digital Side Card?
 
The reason I needed an opto isolator or at least a transistor in line with the sensor is that the NPN output in the transistor won't pull the DIO pin low enough for a logic low. In other words, its not a logic level sensor. I called Automation Direct support and confirmed it. As long as I was going to put something in between the sensor and the roborio, I figured I might as well use an opto-isolator. That way I don't have to worry about any ground differential voltage.

The last thing I wanted to do was do something to make reading the sensor unreliable.


All times are GMT -5. The time now is 09:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi