Break beam issues

We’ve been using these adafruit break beams in our indexing system. During extensive testing in our lab and our pit they work flawlessly, but once we get out into a match on the competition field our entire system gets screwed up. We hypothesize that this could be due to stray IR rays coming from somewhere…? We have tried blocking as much outside light as possible but are still having problems. Has anyone else experienced something similar? If we can’t get it figured out we will probably switch to some other kind of sensor for our next comp.

In our experience. These types of sensors have been extremely reliable. We haven’t been to any competitions yet, but I definitely get the sense that these work very well with solid mounting and proper setup. I can write an update if we discover any issues.

We are using those exact break sensors on our robot this year as well. We had an issue where they abruptly didn’t work either. We switched them out for a spare and started working again. Keep in mind, these sensors only work at < 10" apart. Anything further than that and they will start becoming unreliable. Adafruit does sell a 5mm version if memory serves. As NerdlingNation has pointed out, make sure that they are mounted well, and in a place where they aren’t going to get bumped/tugged/other out of alignment. We originally had issues with the balls bumping ours out of alignment occasionally. Also double check your match log to make sure there are no errors/warnings getting spit out related to the sensors.

Our issue is that they are reading true (unbroken) when actually false (broken) not the other way around. We have tried both 5mm and 3mm and are running them 7" apart which is well within the range of the 3s. Alignment isn’t an issue, they are pressed into secured machined plates. Have you noticed any abnormalities under comp field lights?

Yes, we use 3 for our intake at great northern. No issues in the pit. On the field the lights were effecting it. We had to get them covered. Took a piece of wood about an inch in width and drilled a hole through it. Worked after that.

1 Like

We have not had issues so far. At Great Northern they worked as expected. Ours are VHB taped to a piece of aluminum in our conveyor. Its quite possible that ours is far enough down and covered that they wouldn’t be effected.

Good to know, thank you so much

We’ve had no issues with them, and we’re in our second competition. They’ve been extremely robust.

We did a lot of reliability tests before putting these in our bot, and the only thing we’ve found is that if you have multiple sets of sensors, you really have to allocate a couple inches (2 minimum) around them. Otherwise, the transmitters can overlap and prevent triggering at the right time.

Have you noticed any abnormalities under comp field lights?

I wouldn’t expect additional light will cause problems: Because the lights are normally lit when not blocked, additional lights won’t do anything noteworthy. When a ball is in front to block the beam, it’ll block field lights too.

Our issue is that they are reading true (unbroken) when actually false (broken) not the other way around

This is normal: Many such sensors are “active low”, which “float high” when idle and are “pulled low” when triggered. This offers a wide range of benefits on the electrical design side of things (way cheaper and easier to build), and allows some application flexibility (like hooking 4 sensors to trigger a single IO pin).

When dealing with boolean sensors, our team’s approach is to to make a constant for final boolean BROKEN = true and final boolean UNBROKEN = false. We then check the sensor state by doing sensor.get() == BROKEN . This makes the code extremely readable, and much easier for students to avoid messing up, particularly in a stressful competition environment and they’re not super familiar with that code.


Great advice, thank you

How are the light and sensor oriented in the robot? Is one above the other? or to each side of the ball path?

I wonder if field lighting might be to blame, somehow?

Mostly I’m worried now that we might have problems with ours :slight_smile:

Opposite sides of the ball path, the blue tape wall is something we added between matches to block light. We also just wrapped some electrical tape around the receiver bulbs. I’ll let you know how it works out.

1 Like

Good luck. Here’s what ours ended up looking like.

The biggest problem we had was the mounting, some driving and they wouldn’t be pointing at each other so we made a 3d print.

Tape and tape wall didn’t work. Next attempt: pneumatic tubing sleeves on receivers.

Could field light be reflecting off the ball, into the sensor?

We considered that, if this doesn’t work we will probably try sealing our intake system or exploring other sensor options for our next comp.

Prepare to watch flawless indexing- match 77 northern lights. :grin:

We have decided to change out break beams for physical buttons.

Rather than doing lots of comparasons on the fly, out team creates a helper method such as boolean getBeamBroken() which we would then call in place of the sensor raw get method. This also allows us to swap the sensor for a completly different system without having to update the rest of the code.

1 Like

We had this same issue at Northern Lights. Everything works great with the sensors in the shop, in pits, and on practice field. When we get on the competition field the sensor flickers but doesn’t break.

We have several of these sensors on our robot. The shooter (ball outlet), top of climber, bottom of climber all work fine. The ball intake fails. One difference between the locations is the distance to the ball. The intake is a couple inches wider than the ball, thus the sensors are spaced a little wider than the ball, with more room for extra light to get in. We tried tape and a 0.5" pen body light shield, they did not work.

Also, to be clear they are failing to detect a beam break. Which means they are detecting too much IR even when the ball is in place (tested with a cell phone flashlight.) I believe this is the same as the OP.

Which other break beam sensors have teams had success using?