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.
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,
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.