I’m interested in using these too - I assume you have them hooked up and they work?
The low voltage side hook up looks really straight forward using 5V, Ground and signal with the DIO port.
I’m not sure about the 12V side - yes, the Allen-Bradley sensor signal output goes to the HV1 on the Level Converter, but I’m not 100% sure about the 12V and ground connection (HV and GND) connection source - VRM, or something else obvious that I’m not figuring out?
You want the 12v supply voltage to be coming from a boosted source, not the battery voltage that fluctuates as we drive.
The sensor works down to about 10.5v or so, but becomes undependable as the voltage dips below that, which is pretty common for FRC robot batteries.
So, either a VRM or similar custom circuit voltage booster is recommended to prevent the sensor from cutting in and out as you drive.
Yes thanks - I’m probably not being clear.
I will be connecting the Allen-Bradley sensor to a VRM, my question is the 12 volt input I saw in a picture for the step down to 5 volts when using the device from Sparkfun:
That 12v input can just be battery voltage, if it’s feeding a step down.
Just to be clear, 5.25 V is the “Absolute Maximum”, beyond which permanent damage to the Roborio may occur. It reflects a “Nominal” of 5.00 V with a tolerance of ± 5 %, an industry standard.
5.00 V is the value that users should be aiming for when finding solutions for attenuating the 12 V signal, not 5.25 V. Some (hopefully very small) number of users who use 5.25 V as the target will damage their Roborio’s.
The grounds on both sides of the Sparkfun Optoisolator can be connoted together for this application. You’d feed 12v as the supply on the sensor side from the VRM. On the output side you’d give it 5v for the RoboRio’s DIO port.
Has anyone measured the voltage coming out of the signal line when the Allen / Bradley’s are plugged into the 12v 500ma?
For our team, The Rev Color Sensor V2 worked perfectly. Its a bit hard to program it since we used I2C to talk to the sensor.
Did you have to build a I2C driver from scratch? I have one of the RevColor sensors as an alternative to the Allen-Bradleys.
(I wanted to use two of the RevRobotics 2m distance sensors two, but those plus the color sensor would make 3 I2Cs…two with the same address)
We are planning on using two Rev color sensors as well.
This post talks about using multiple sensors of the same type.
Hopefully that helps
@Mark_McLeod Can you comment on the need to step down the output of Allen Bradley 42EF-D1-MNAK-A2 from 12V to 5V? I believe this is the sensor from the 2011 KOP that you were talking about in this post. I think there is some misinformation in this thread about those sensors putting out 12V and the need to step down the output.
I measured the signal output of an Allen Bradley 42EF-D1-MNAK-A2 at .6 to .8 volts.
So, that signal wire certainly doesn’t need a step down. It’s just a switch.
Try taking a look at these. They can plug right into the RIO and we are using them to successfully detect the gaffers tape on the carpet.
These are the same ones we are using with success as well
Im having trouble finding documentation other than in Chinese. Is there anything out there that will help us get these up and running (java directly plugged into Rio)?
Which sensor are you asking about?
The ones pugsly14 linked plug into a roboRIO DIO port.
See the diagram beside the DIO pins to see that the ground connection goes to the outside, power in the middle, and signal on the inside.
Red - “+”, Yellow - signal, Brown -”-”
In code you treat it like it’s a switch-it will be either true or false.
I was originally thinking it would output a value. But our programmers played around with it tonight and came to the same conclusion. Still need to test against the competition carpet though. Thanks for the help!
How would we connect these to the robot?
There are two versions of each size of sensor array, an analog and a digital version. The digital version will just tell you if it sees a reflection or does, while the analog one will give you the strength of the reflection.
If you want to use the analog version, you can connect it to the analog input pins - there are four at the bottom right of the roboRIO, and 4 more on the MXP. A description of the pins on the roboRIO can be found in the roboRIO User Manual. You’ll need to connect each individual reflectance sensor to a different pin.
If you want to use the digital version, you can connect it to the DIO pins; there are ten on the left side of the roboRIO and ten more shared with SPI and PWM on the MXP. Alternatively, you could use an IO expansion breakout like the SparkFun SX1509 and read the values through I2C. Using this board could simplify your wiring significantly.