I am trying to set up the QRD1114 phototransistor with my Arduino Uno, but I can't seem to get it to work right. Whenever I tell it to print the value on the pin, it always comes out to around 1020-ish with nothing in front of it and will add 1 with anything in front of it, regardless of color. I tried to follow the tutorial with it, but I may have something wired wrong. Here is a quick sketch of the circuit for it:
Also, I have tried replacing the 4.7k with a 10k and I got the same results, along with trying everything I had from 230 to 1000 for the other one.
Any suggestions on what I am doing wrong?
It looks to me like you have wired it up wrong, but you don't show in that sketch which way up it is, so it is hard to tell.
Are you looking from the top or bottom?
Can you see any light coming from the LED when you look at it through the electronic view finder of a camera? That is the first step.
Then To test put a piece of white card in front of it about 5mm away.
I didn't see a light but when I looked more closely I saw that the ground for the light was in the wrong row on the breadboard(double vision and bread-boards do not mix). Seems to work now, black registers as about 1010, with white at around 940. Do you know how I could increase the sensitivity so I have a bit more buffer between them?
Replace the 4K7 (in the diagram you have it as 4.7 ohms) with a much larger value say 100K.
And drop the IR emitter resistor to 100R. (don't go below 75R)
Radio Shack is a high price clip joint, man. If it's just convenience then sure but if you can wait for shipping then Digi-Key, Allelectronics and many other parts houses will give you more for less. Also Adafruit, Seeedstudio, Arduino-direct (all .com) and undoubtedly other Arduino hobby sources are lighter on the wallet.
I'm wondering if something like this could be used to create an optical encoder using a white/black paper wheel. It would be nice to think that it could be connected to a hardware interrupt pin, but it doesn't look like the swing from black to white is enough to trigger an active low pin that has been pulled-up...or is it? Not to highjack the topic, but build upon it, I was looking at a similar device, but just much smaller: http://www.sharpsma.com/webfm_send/1267
A few years ago I played with reflecting IR off paper to an IR sensor using a led to tell me positive and...
even where I had printed black it reflected which when I thought about it was no surprise.
So then I went to an office store and had transparencies laser printed for 25 cents and -that- worked.
I was making gradient strips as well as stripes/spokes/slots. I even had apertures on the page since
hey 8-1/2 x 11 ain't to be wasted!
JIC, no, I didn't use reflection to make it work. And IMO the transparency material is superior to paper.