proximity sensor for art project

Hi there,

I am new to arduino and wondering whether it is possible for me to create some kind of proximity sensor that interprets data at close range (0-6cm). The idea is that a continuous stream of visuals pass by the sensor and as this happens, the data is captured in maxmsp. I'm not sure about the kind of 'visuals'. I was hoping for a textured piece of material (ie. raised in some places and depressed in others giving varying degrees of length from the sensor).

Is this possible?
What sensor would I need?
I am wondering if the QRD1114 IR emitted / Phototransistor is suitable?

I'm not sure about the kind of 'visuals'.

You mean like a barcode reader?

i was hoping for 3D, like different sized blocks.

Imagine an architects model of a cluster of skyscrapers. Like that with the sensor reading from above, so the taller buildings would be closer to the sensor and the shorter ones further away.

Does that make any sense!?!

It would be easier to measure the height of blocks from the side. If you use the blocks to either block or reflect light you can use a Light Dependent Resistor (LDR) to sense the size of each block.

If you want a quick solution then a ranging IR sensor like the GP2D120 sensor and its cousins would work:

The output is analog and can be read directly with an A/D converter input.

Using your QRD1114 is more of a yes/no decision as to whether an object is present or not. You can play tricks with it to change its detection distance by modifying the duty cycle really quickly: low duty cycles on the LED will detect objects closer, higher duty cycles farther. We do something similar on our Gadget Shield with the IR emitter and detector. Have a look at the code for an example of how we do object detection.

The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected