Detecting an Object Using IR Sensors

I am building a pick and place robot with a team for my capstone class. We are trying to build a robot that will be able to detect a pill bottle placed at some arbitrary location on the table, go to it, pick it up, and place it somewhere else. Would it be possible to use an obstacle avoidance IR sensor to detect and track the object? If not, what would be some alternative solutions?

darnified:
I am building a pick and place robot with a team for my capstone class. We are trying to build a robot that will be able to detect a pill bottle placed at some arbitrary location on the table, go to it, pick it up, and place it somewhere else. Would it be possible to use an obstacle avoidance IR sensor to detect and track the object? If not, what would be some alternative solutions?

IR sensors work by detecting the IR reflected from the object, or IR radiated by the object (dog, cat, human).

Will your pill bottles reflect IR? Test it.

Paul

Sounds like a plan. But you will have to be able to rotate the sensor to scan the area and find where the bottle is.

Most will reflect enough IR to be detected, you will have to experiment. Make sure your IR beam is aimed high enough to not see the surface of the table, or you could get stray reflections from there.

This is the part I am using. I can't get back into the lab until Saturday. To my understanding it, it looks like it can only detect things within 30cm. Do I need a different part or will this work?

May work but it's very crude. Fine for obstacle avoidance, not for any accuracy in direction or distance.

You will likely have more success with a IR time of flight sensor like the VL53L0X.

darnified:
We are trying to build a robot that will be able to detect a pill bottle placed at some arbitrary location on the table, go to it, pick it up, and place it somewhere else.

This is unclear. Is the robot given coordinates and then uses the sensor to determine if an object is really there or must it search for the object?

We are not given coordinates. The robot has to somehow search for and find the pill bottle where ever our professor decides to place it. We can also modify the pill bottle to have some sort of transmitters or receivers on it if that would be more helpful. We were initially planning on painting the lid black to help the IR sensors detect it, but that might not be the best idea.

darnified:
We were initially planning on painting the lid black to help the IR sensors detect it, but that might not be the best idea.

I'd go with @wvmarle's TOF sensor idea. How many axes available?

White probably gives better reflections than black.

darnified:
track the object

That makes it seem the object is moving; it's not, is it? If not, what do you mean by "track"?

rainbow_rings:
That makes it seem the object is moving; it's not, is it? If not, what do you mean by "track"?

No, the object is stationary. Only my robot is moving. That was probably the wrong word.

The robot has 2 axels. The back axel is a dummy axel, and the front two wheels spin independently of each other so we can change the direction.

Also can someone explain to me how a ToF sensor works and how it would be any different?

ToF = time of flight, measures how long it takes for the IR to bounce back.

Advantages: fast, accurate, narrow beam (the VL53L0X only has a 15 deg. field of vision). So by scanning the table top you can accurately detect the direction and distance of the object with a single sensor, then aim your robot there and go for it.

That's great, but what if the ToF sensor detects a different object or person standing somewhere around the table instead of the pill bottle?

Make sure the robot knows in which direction to find "table" and "not table" (if only to not run off the edge), and how big it is.

Persons next to the table: too far for being the pill bottle.

Other objects on the table: can't distinguish. The sensor can find the location of an object (there's something reflecting), it can't tell what this object is. That's a whole different ballgame, and firmly out of reach of an Arduino (start looking at image recognition if you want to do this kind of things).

For this challenge to work there have to be set at least a few limitations, such as how far the bottle may be, and that there are no other objects in the area.

We’re actually going to use our obstacle avoidance IR sensors to detect the edge of the table. We have them hanging off the side of our robot, sort of like antennas, pointing down at the table. Once they no longer detect an object in front of them, the robot stops. This is also my first time using Arduinos and I do not really know how to map the dimensions of the table.

Table dimensions are easy: use a tape measure. Any object at a distance greater than the size of the table is not the pill bottle.

Edge detection should do the job of keeping your robot from falling off.

Consider following an edge while looking for the bottle to the other side (hope your table is square, so you have only one dimension). When the bottle is detected continue moving until it's out of the field of vision, then reverse for half the distance you detected it (should be hte middle), make a 90 degree turn (on the spot - correct the previous step if you have a radius) and go and grab the bottle.

Will the sensor be mounted on the robot's arm or body? How many axes?

wvmarle:
Table dimensions are easy: use a tape measure. Any object at a distance greater than the size of the table is not the pill bottle.

Edge detection should do the job of keeping your robot from falling off.

Consider following an edge while looking for the bottle to the other side (hope your table is square, so you have only one dimension). When the bottle is detected continue moving until it’s out of the field of vision, then reverse for half the distance you detected it (should be hte middle), make a 90 degree turn (on the spot - correct the previous step if you have a radius) and go and grab the bottle.

Hmm that could work. The only thing that worries me is figuring out how to give my Arduino the dimensions of the table. The only thing I can think of is letting the robot move at some velocity v for some time t because I only know how to control how long a process runs for. I imagine there is a better way to do this though? If so, do you have any resources I can check out?

Or just run until you see the next edge of the table.

Update. We also are going to have to drop the pill bottle off at an arbitrary location chosen by the professor. Suggestions?