Is is possible to detect objects, like walls, thru clear plastic?

My little project bot lives inside a clear plastic ball (critter crawl) that rolls around the floor banging into things. I never thought it would be able to "see" through the plastic to avoid objects (without some complex analysis of a video/still image which I don't want to do) but I thought I would throw it out to the group. I know something like sonar wouldn't work, I might be able to detect IR through the plastic but that would be people/pet objects, perhaps I'm not thinking of something.

Any ideas how I could detect objects like walls while looking through clear plastic that is not smooth?

Thanks -

I suppose it'd have to be some sort of optical sensor. Depending on the colour of the walls and lighting etc, perhaps you could use a simple brightness sensor?

You might be lucky and have a ball that is IR transparent. If it is, then an you could use an off-the-shelf IR distance module like the one at IR distance sensor includes cable (10cm-80cm) [GP2Y0A21YK0F] : ID 164 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits.

If you want to see if your ball transmits IR, pop a TV remote into it and look at it with a digital camera while you press buttons on the remote. Assuming the camera doesn't have an IR filter (which is easy enough to test with the remote outside of the ball), you should be able to get an image of the LED if ball transmits.

Nice idea, poeticoddity. I gave you a karma bump!

poeticoddity:
If you want to see if your ball transmits IR, pop a TV remote into it ...

... and see whether it still operates the TV.

PeterH:

poeticoddity:
If you want to see if your ball transmits IR, pop a TV remote into it ...

... and see whether it still operates the TV.

Haha. I hadn't even thought about that.

If the signal still works the TV, that's great, and you know what you're working with. If not, it may be filtering IR (in which case IR's not an option for this application, or it may be refracting and scattering the IR, in which case a camera should still spot it but the IR source should look larger than the LED or you might spot fringes. If refraction is the case, it may still be suitable for short-range sensing, but longer ranges are out of the question. (In that case, collision detection may be possible, but ranging or general navigation would be out.)

And thanks, MaliG. I hope this works out for you. I love hamster-ball style robots.

Thanks all. Good ideas, wish I had a TV. Actually no I don't. LOL

I have an old Sony Mavica camera around here somewhere that I tested years ago with a remote but my Canon 20D is filtered. I also have a PIR that I might check out as well for transparency. I had looked at Adafruit's IR sensor but thought there might be too much back scatter because the critter ball has a lot of slots that could cause problems especially as they spin by the sensor. But if I get a range of readings I can always use the farthermost.

Anyhow, the IR ranger seems like a good inexpensive option to explore. Thanks.

Currently I use an accelerometer for both motion control and collision detection, which works good, but it does of course mean physical contact. I had to slow it down a bit because I was crashing pretty hard into the furniture. It's 13" in diameter so F=MA was causing some concern with my wife, but bless her heart, she still humors me in my old age.

Could you use LDR's mounted low in the ball facing out to detect the balls shadow when it approaches a surface?

Offhand, is the mechanics inside the ball stabilized to gravity [ie always maintaining
the same attitude], or does it endlessly somersaut as the ball rolls? So will the sensor
views be fairly stable?

Another possibility would be to shine a focused visible or IR light source through the plastic from one side of the 'bot aimed towards the center, so that the spot where it met an obstruction moved sideways depending on the distance to the obstruction. Then you could use a crude light sensor with a small field of vision to see whether the reflected spot was in the right place to indicate an obstruction at the distance you're interested in.

The bot has a single axle and that is firmly attached to the sides of the critter ball, so the assembly spins inside. I use the battery at one end to provide a "gravity" drive. So when the bot is at rest, the battery naturally goes to the bottom. The plan is that when I get everything running correctly, the assembly will remain somewhat stable, so I should have an opportunity to look forward. My accelerometer tells me if it's upside down etc. so I could use it for a 360 view as well when it needs to escape a corner.

Interesting idea about the light at an angle. I was thinking at one point of using a small laser at an angle with a small light sensor(s) maybe mounted at the end of a tube or a set of three tubes and light sensor looking for the reflected dot. I would have to remove the ambient light if the room becomes too bright. However I wasn't sure I wanted to spray the room with a laser dot, although the cats would go nuts with that one. My "board" (now a piece of 5x8 inch plexi) is a bit narrow but I might be able to move them apart somewhat. Eventually I want to miniaturize the prototype so my final solution may have some space constraints in the future.

I'm making a feeble attempt to blog about it (and a worse attempt as a videographer) but I recently posted a video if anyone wants to see more about the vision challenge:

Thanks -

Since you more or less have a stable platform, you can try something similar to the
following, which is basically the light at an angle idea. You can probably adapt an
AVRcam, CMUcam, or ArduinoCam.
http://www.seattlerobotics.org/encoder/200110/vision.htm

You shouldn't actually need a laser, and to save eyeballs and retinas, a bright focused
light spot will probably work for short-range detection. It can also be pulsed on/off
to aid detection, using frame-differencing.

re: oric_dan

That's probably a lot more than I want to do right now but thanks for the link.

I just thought it might make some useful thought material.

That was always in the back of my mind as an ultimate solution but I would rather concentrate on a simple bot. That was why, in my opening question, I added:

(without some complex analysis of a video/still image which I don't want to do)

I've bookmarked that link for perhaps a future project.

Thanks