I have some questions about a couple Infrared Sensors I found.

So I found a couple of Keyence PZ-G61CB Infrared Sensors while I was digging around in my team’s stash of parts. Problem is nobody knows how to use them, and we’re really trying to implement IR so…

  1. What are the pros/cons of using this model of sensor?

  2. Does the latest version of LabVIEW offer example code for these kind of sensors or even support them at all?

  3. If it does, where can I find it?

Thanks in advance! If I can think of more questions I’ll let you know :smiley:

The answer to this depends on what you are trying to do with the sensor. IR sensors do not all do the same type of measurement. Are you trying to measure distance to an object? Are you trying to detect the presence/non-presence of an object? Are you trying to detect the edge of a line?

We have not used this same model, but it looks like (from the manufacturer website) it is intended to be pointed at a particular retro-reflective target. I am not familiar with the output protocol it has either. I didn’t download the full data sheet since they wanted a lot of info from me. Depending on what you are trying to measure, there are probably better options that are inexpensive and will work with Roborio out out the box. We use Sharp IR sensors extensively. I can help recommend ones of those.

If memory serves, there’s some retroreflective tape around the tower goals, and my team wants to use those to help set up for climbing. That’s where the retroreflective sensors come in.

Apologies for not being kinda vague. First time I’m actually working with something like this, which is kinda embarrassing since I’m the team’s head programmer :confused:

  1. Can I get a Sharp IR sensor (or sensors) that can help me with alignment with the goals?

  2. If I can, where can I find LabVIEW code to help me out?

I’ve used the Sharp sensors with some success. However the long range version is good to about 1.5 meters. Not sure if that’s enough for you. It however will sense distance to just about any solid object, not just the retroreflective tape. It works in the infrared domain. We’re planning to use it to sense the presence of a boulder in our shooter chamber.

It’s an analog device so you would look at the analog sensor example to see how you might use it. It returns a voltage directly proportional to the distance to a solid object in the path of the sensor.

Hope this helped.

Probably not. You will have big challenges figuring out what part of the tape your sensor is seeing, and discriminating when it is seeing the tape or just close to a reflective object that returns the same value. The sensor you have is probably used in a fixed industrial setting where the reflector is mounted across some gap, and the sensor is always pointed at it. When an object obstructs the view of the reflector, the sensor indicates it can no longer see the reflector.

As for other IR sensors, they are good for measuring the distance to an object in front of them. Most output an analog signal that is proportional to the distance measured. Like this one:

This same feature can be used to detect presence of an object (if range to object is less than X, then there is something there), and some IR sensors come with a carrier board that is set to do this for a particular range. Like this one:

Another is line-following sensors that look for a difference between two detectors to sense an edge:


For finding the goals in autonomous, vision processing is going to be your best bet. Many active threads here on CD to help with that, and the example code provided in your software install is very helpful. For help with finding them in teleop, you can also go with a low-tech solution. Have a bright light (flashlight) aligned with your shooter. When the drive team sees a bright reflection on the tape in their camera view…time to shoot.

There is one that can work out to 5 meters. We will be using one of these this year to sense our distance to the castle wall. It’s better than ultrasonic because you do not have to worry about interference from other bots using ultrasonic.

Hmm, that’s new to me. I like it.