Read photo-diode / resistor as a digital value

I bought these photo-diodes, or resistors - I can not remember since I forgot to label the bag. I think I just bought some general purpose ones to get me started. They look like this:

I want to aim my 5mw 5v 650nm RED laser diode at this a short distance. I want this light sensor on my digital-interrupt pin on Arduino to toggle hardware interrupt, when red laser is on target with this sensor.

BEFORE I guess and destroy my hardware, I wanted to ask here if I am doing this right.

I was going to put a 100k pot on the resistor, in series. +5v->100k pot->photo sensor->ground. I test the voltage and see where the sweet-spot is when I am aim laser for this to show +5v signal. Tie that line into pin D2 or D3 and then be done with this.

Do I need to bring in an opto-coupler or some other component into this circuit, or will this simple design be sufficient?

You can probably make it work, but LDR's are most sensitive in the green-yellow part of the spectrum. You can use a simple voltage divider circuit and easily sample it with an analog input.

As an input to a digital input, it will also work but the hysteresis margin is very small. For the most reliable operation, you should interface it with a comparator circuit with positive feedback for adequate hysteresis.

That device is an ldr (light dependent resistor) as aarg said. It responds relativly slowly to changes in light levels so you may have trouble getting it to trigger a interrupt directly.
You have not explained why you need to trigger an interrupt instead of using a simple analogRead() but one possibly more reliable method of triggering an interrupt from this would be to use the built in analog comparator in the (AVR) Arduino.

Good point. You shouldn't need an interrupt for such a slow device.

BEFORE I guess and destroy my hardware, I wanted to ask here if I am doing this right.

I was going to put a 100k pot on the resistor, in series. +5v->100k pot->photo sensor->ground. I test the voltage and see where the sweet-spot is when I am aim laser for this to show +5v signal.

That's safe.

Also, if you have a multimeter you can measure the LDR with and without the light hitting it. (Then, you can estimate the required series resistor value.)

If you don't have a multimeter to check the voltage, run the Read Analog Voltage Example to check the voltage.

Greater than 3V will be read as high and less than 1.5V will read as low. In-between is undefined.

DVDdoug:
Greater than 3V will be read as high and less than 1.5V will read as low. In-between is undefined.

Erm, not quite undefined. In between will give you the last valid state (>3V or <1.5V) that was input. If you connect to an analog pin you can try the analog and digital method, with the same circuit.

I am testing about 600 ohms on the sensor at idle ambient on my desk. When I aim the laser at it, I get 83 ohms.

This sensor has to pickup the speed of this spinning hexigon mirror from a laser printer. Guessing by the high shrill noise alone, I estimate it's spinning at least 20,000 rpm. 7 sides of the mirror. I calculate 140,000 * 60 seconds = 8.4 mhz timing. It has to rise/fall fast enough between each of the 7 mirror faces.

I hook up my oscilloscope. (I am still learning this machine). I set channel 1 on the sensor, channel 2 on the power wire for the laser. On oscillioscope, I set "ROLL". It scrolls the signals from right to left. I turn the dial all the way down to "250ms" is the lowest setting.

I am looking at signals on the scope. Both signals appear to toggle at the exact same time. I assume my test is inaccurate and this roll option on the scope was not intended for high precision. I guess the 250ms is the gap between grid lines.

Your calculation is wrong. RPM is revs per minute. 20,000 rpm is 333 Hz.
Then times the number of mirror faces. But the ldr will still be too slow. Use a photo transistor or diode,

6v6gt:
Your calculation is wrong. RPM is revs per minute. 20,000 rpm is 333 Hz.
Then times the number of mirror faces. But the ldr will still be too slow. Use a photo transistor or diode,

Whoopse - sorry. I am really good at doing to opposite calculation - normally. So at 333mhz, is 2.333 ghz is impossible for me to do this on an Atmega328. I can't say what is going on until I know I can get an accurate rpm reading since my guesswork is obviously really wrong.

That frequency estimation keeps getting higher!
Read carefully. I said Hz not MHz.

At 2.333 KHz (K=1000) the period is around 0.5mS or 500 microseconds.
That is well within the abilities of an Arduino.

My senses are deceiving me with age, but I was not really good at taking measurements - seems like it only takes me 20 tries at least, to get it right.

But I found a TEMT6000 sensor with reaction of under 15 microseconds. 360nm - 970nm range will work with both my test 650nm red laser and 405nm burning laser.