Index Automation Using Photoelectric Sensors

My team is working on improving our robot before our second district event in Week 5. We decided to go with using photoelectric sensors we have lying around to automate our indexing system because we believe it would be quicker to add, learn to program, and tune than vision targeting, giving us more time for drive practice.

The thing is, @Wazzily02, our programmer, electrical team member, and team captain has no idea where to start with wiring and programming a system to do this.

Our plan is to stick one at the back our intake, where, upon detecting a Power Cell, moves it back until it it is no longer seen. Can someone please help us with this?

Well I’m not a programmer but we have one for indexing our ball and it works wonderful we have it wired right into the rio and have it tuned so that when it sees a ball it spins our magazine belts until it no longer sees the ball then it waits till it sees another ball

Which sensors are these? Are they the blue Automation Direct ones from a few years ago or are they the black Allen Bradley ones that have been given out more recently?

We have both the blue AD ones and at least one of the black ones off of this year’s FIRST choice

3468 has been using these ~$7 IR Photoelectric Sensors from Amazon with great success. Because we had much more defined separate pickup and conveyor subsystems, we used two for indexing and they worked out great!

So something we figured out with the AB sensors is that it has a very short range of less than half an inch. You might be able to sense a power cell with them, but we’re just going to use the AD ones for now. That aside, how we’ve used the AD sensors is to line them up across from a piece of retroreflective tape and let it sense based on that. Our implementation isn’t quite done yet, but the current plan is to have a power cell break the beam and then we’ll know when it stops putting out a signal. One thing to watch out for that we had issues with in previous years is that I don’t think it puts out enough voltage to fully pull the DIO pins high, so you’ll need either a piece of hardware that can step up the voltage or you can plug it into an analog port and use the AnalogTrigger class to detect when it’s active.

Note that multiple AB (Allen-Bradley) sensors have been available in FIRST Choice recently, and they do not have the same range specs. This sensor (the VisiSight) has the short 1/2" range while this sensor (the RightSight) has a 20 inch range. We successfully used the RightSight to detect Cargo in our intake last year.

That said, the RightSight in FIRST Choice is a PNP sensor so it won’t work natively with RoboRio inputs. You must put some extra circuitry in place to get the expected signal levels into the RoboRio. We ended up using a small relay off of Automation Direct to interpose between the two signals. It works but for the cost and complication I’d rather just get the sensor @ExploitSage linked to, which is what we are trying to use this season instead.

We have been using these in our robot to detect balls through our indexing system.

We have three of them in our column, we automate it in a way so the balls don’t touch each other (we have serious issues when they do). So the automated system just queries the DigitalInputs to move the balls from one beam break sensor to the next, up until they are at the end where we want them.

Here is the link to our intake subsystem, the relevant method is called pullInBalls(). just an aside, the sensors we use are True when nothing is breaking the beam, and False when they are (in case you try to follow the code).

We used Command-Based, so here is a link to one of the commands that uses this method.

Hopefully that’s enough to get your programmer going.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.