Line tracker Sensor 2019?


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.

1 Like


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.
Connector Definition:
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.