Our team is having very active discussions wrapped around physical limit switches vs Color Sensors vs Photo Cell Sensors for ball awareness in a conveyor system. Have teams out there done this type of testing? Outcomes? Preferred solutions? We want to have the ability to know where a re cargo is in our conveyor system after pick up and to help index. Any help is greatly appreciated!
Most color sensor us I2C which has a bug on the rio image which may cause you issues unless you run it off an MXP which has a different less severe bug, or run it off of a Raspberry Pi which we may do.
Physical switches can get bumped and be a bit finicky sometimes. In 2020 we used photo cells quite successfully but they also need tuned and can be finicky. So I would eliminate the color sensor from your discussion and continue to debate cell vs physical switch, unless you need color and want to play with an rPi.
My 2 cents. Color is to complex unless you are doing more than ball detection. Mechanical limit switch depend on the ball actually touching the actuator. Photo switches work well. You have to be sure the field lighting do not give false triggers.
We’ve done a little writeup on this, you can see our plan and FSD. TL;DR - I like line-break/photo sensors and have used them in many different years with good success.
We have never had an issue when using similar sensors to these in combination with the retroreflective tape used on the goals.
Tune the dial so the sensor is “Green” when pointing at the tape, A white sheet of paper, or your hand should cause the LED to go red. We usually get the IR version instead of the Red visible beam version. These are also on FIRST Choice.
I would suggest staying aways from physical limit switches. we used TOF sensors for last year to serialize the balls and worked amazing. We plan on using them again to serialize because of their speed and consistency along with a color sensor as a secondary sensor.
Recently there is question if MXP I2C is even safe on the RIO. If Will is avoiding it I would too as he has probably done the most testing. Normally I wouldn’t be this cautious but the lockup the error causes is severe.
I think that was a common misconception (I actually had it for a while and I am on the WPILib team getting updates). The roboRIO v4.0 image fixed the AutoSPI issue (affecting all Analog Devices Gyros) to my knowledge it hasn’t impacted this I2C issue at all.
A complete list of known issues with this release can be found here. In particular, there is a warning against using the “onboard” I2C port (the MXP I2C port does not have an issue).
That post by Austin was made 4 days ago. The initial post by Will finding issues with MXP was also made 4 days ago. Both statements were made with our understanding at the time. Keep in mind this isn’t a WPILib issue and we have no control over its fix. I have not personally reproduced the issue (we aren’t planning to use a color sensor currently). Hopefully someone will be able to reproduce his test soon. If the reports are confirmed we can/will change our position officially and publish it in the next blog.