We want to implement a simple passive ball detection mechanism on our robot (without using the camera, we have other purposes for it) so that we can detect when a ball is close to or touching our “ball magnet” roller (and for other purposes during autonomous).
We initially said, “Hey, that’s easy, let’s use an IR beam” but a simple IR beam circuit (emitter with a 270 Ohm resistor, pointing at a detector with a 10k Ohm resistor) gives me around a 4" range between emitter and detector before the signal dies off. I don’t want to create my own amplification and pulse circuit to boost the range, I was hoping anyone with experience in IR detection mechanisms could point me in the direction of a simpler (or pre-made) solution? We’re looking at needing a 20" beam that we can break with a ball…
We are using an IR (Emitter/receiver) that might be from a previous year (it is yellow and black, some emit a red laser) for the exact same purpose that runs on the sidecar as a DIO and returns a 1 when there is a ball and a Zero if not the sensor itself has a range of between 1ft and 1in adjustable on the sensor it works great returning the Boolean indicator on the DS
2836 has been using Allen-Bradley IR sensors. While I don’t remember the exact part numbers, I believe they were in the 7000 series (http://www.ab.com/sensors/photoelectric/specialty/7000.html). There’s a transmitter on the left side of our ball collection area, and a receiver on the right side. When a ball enters the area, the IR beam is broken, sending 4 volts to the digital sidecar. The transmitter is powered by a 20 amp breaker on the power distribution board.
At the moment we’re only using the IR sensors for autonomous, such that as soon as a ball is detected, the kicker activates, launching the ball to the next zone. These sensors have worked perfectly, and we’ve successfully scored in autonomous at the NYC Regional.
Apologies for not having a diagram at work, and having to go from memory.
We used an IR Emitter/Detector pair (Radio Shack p/n 276-142). This is powered using a 7805 voltage regulator, connected as a custom circuit to the Power Distribution Board. The Emitter is driven from 5 V, with a 51 ohm series resistor (gives about 90 mA drive, max current on the emitter is 150 mA as I recall), and the sense voltage of the detector photo-transistor is developed across a 10 K (as I recall, possibly 15K) resistor.
The emitter and detector were each mounted in a 1-inch oak block (one of our mentor is a wood-shop artiste), with a hole drilled through just the size of the emitter or detector body. The emitter and detector were each super-glued into one of the blocks. The blocks were mounted inside frame rails on each end of our ball control roller with the hole in the blocks aligned with holes CNC’d into the frame rails so they were closely aligned. The holes are located at the height of the center of the ball. The whole assembly is under the frame and bumpers, so is additionally shaded from ambient light.
The distance between the rails is about 19 inches. This emitter/detector pair work great at that distance. With no ball in the roller, approximately 4.1 V is read (on the Analog Breakout), and with a ball captured, approximately 10 mV. The difference in ball position between not being detected, and being detected is about 1/2 inch.
Actually works much better than I originally thought it would. I was afraid it would not be able to transmit across that distance, or that the detection cone would be so wide that it would be hard to distinguish when the ball was captured.
We used these at the Oregon regional, and once we got the alignment and the kicker power dialed in, we score 1 ball from the far zone about half the time, and clear either one or two of the other balls.
The Banner Sensors you are refering to from past KOP are 2 different Models:
QS18VN6LV: Red light retro reflective sensor. These work well if you put the sensor on one side of the ball and retro reflective tape on the other side. It is visible red light so it is easy to align. This setup will work for up to 21ft (anyone remember 2002?). I use this on our backup bot.
QS18VN6D: Infra-red diffuse sensor. Sensor on one side, shiny surface on the other. Max range of 18in, I dont like these as much as you have to be much more precise with them.
More info and ordering for this line of Banner sensor is on their site with spec in this PDF
The Allen Bradley Photoswitch (Mark P mentions) emiter and receiver is also from a previous KOP and I am using them on our competition bot. If you like opposed sensors but dont have these, you can order QS186E and QS18VN6R from the same Banner series discussed above.
I feel like crying for my mommy. This is almost exactly what I did, but I was not driving the emitter hard enough (270 Ohm versus 51 Ohm, difference is 18 mA vs 98 mA). Is there a reason why you powered your system through a 7805 versus the 5V power provided by the FRC Analog bumper? The Analog Bumper can provide 750mA of current with 5V, and it runs straight off the NI-9201 so there’s going to be a constant supply. I guess if you wanted to go from bench-top testing straight to the robot your solution is probably the most convenient, but I was just wondering if there was a technical reason why you went with the 7805…
Thanks so much, you gave me the guts to try again…
We desoldered the three JST input terminals and soldered a servo cable in their place. Then we plug each sensor directly in to an analog input port, and point the rangefinders forwards, looking out just beneath our “ball magnet” roller.
Now we not only know when there is a ball in our possession… we also know when we’re getting close to a ball (or a wall… it ain’t perfect) and can start up our ball magnet automatically. One less thing for the driver to do… or one less power drain as opposed to leaving it on all the time.
I guess we could even use it to check to see if two balls are in our ball magnet… although we haven’t written that code yet.
Right now we’re using our practice bot to try and see if we can come up with a dashboard display to help the driver find balls in the far end of the field, or use the rangefinders to help with auto mode.
We are using a Banner sensor on our robot this year and were asked by a KC inspector to add an inline fuse since the wire from the sensor was < #18 on a 20 amp breaker. The use of an inline fuse is probably the smart thing to do but is it required and, if not, is that what most of you are doing anyway?
By R47, he could (should) have required you to replace the wire with a 18 AWG wire or larger. You did not specify the wire size you used, but it would be reasonable to use an in-line fuse if the value of the fuse was selected to be appropriate for the wire size, and was chosen to be a “fast blow” type fuse. Situation becomes ambiguous though, unless you can provide documentation about the device and it’s load characteristics.
When the wire is permanently attached to the sensor, it’s not reasonable to require it to be changed.
Our 2009 robot design had a 5A fuse inline with the 12V power to the Banner sensor for exactly the reason the KC inspector gave. (There was a brief moment of contention when one of the inspectors at DC didn’t think such fuses were legal, but he was of course unable to come up with any support for that opinion in either the manual or the inspectors’ checklist.)
Although I have tried to get the powers that be to accept the use of 5 amp breakers in the PD, the rules allow you to still use the wiring as attached to the pre-wired sensor. Please read the rules carefully next year in case I succeed.
R46
F. Custom circuits and sensors powered via the cRIO-FRC or the Digital Sidecar are protected by the breaker on the circuit(s) supplying those devices. Power feeds to all other custom circuits must be protected with a dedicated 20-amp circuit breaker on the Power Distribution Board.
As an alternative you could also wire the sensor to a enclosed perf board that contains a wired fuse and allows power wiring to continue to the PD via #18 wire.
Another question here. Can more that one Banner photo sensor be protected by a single 20A fuse? A single #18 wire could be connected to the breaker and then to a smaller fuse. Can the load side of the smaller fuse then be connected to more than one sensor? I don’t see where the rules address this unless it’s R46 F or G if this would be considered a custom circuit.
2702 had a moderately unique solution: rather than have the ball break a beam, we mounted both the emitter and sensor on the same chip, and stuck that inside our vacuum cup. When a ball was close, or when a ball was grabbed, it would reflect IR back to the sensor.
This meant we only needed one mounted place, and it meant that we weren’t tricked by things like ramps, robots, or chains getting in the way (unless they fully blocked the vacuum cup).
Yes,
Multiple sensors can be powered from a single 20 amp breaker. All other electrical rules apply however, including only one wire per Wago terminal. You can bring the sensors to a common enclosed circuit board (preferred) or you can tie them to a barrier strip or terminal block as long as the connections are insulated. It can be considered a custom circuit and so the stated rules allow you to fuse the power line in the circuit per par G. If you use the circuit board method, a fuse on the board is a good idea. Then you can connect the sensors to the board and use your own connector to wire the outputs to your breakouts.
Rather than using a breakbeam sensor, we rigged up an IR rangefinder instead. The voltage it returns increases as an object moves closer to the rangefinder. So with it mounted in a fixed position in our frame, there’s a baseline value that the voltage is steady at when there is no ball in position. When a ball enters the frame perimeter, the voltage spikes up (well alright, it increases by less than half a volt :p). So the code just compares the reading every cycle to the reading taken upon initialization and when it increases enough, alerts the driver that a ball is in place through the dashboard (still getting this to work), or allows the bot to know when to kick in autonomous.