I want to check the steps of my stepper-motors and I have got hold of some GP1A57HRJ00F from SparkFun
I found this post with a suggestion of how it should be wired:http://forum.sparkfun.com/viewtopic.php?f=32&t=32268
Pin 1 will go to 5V.
Pin 2 will go to a resistor.
The other end of that resistor goes to ground.
From the table on page 4, you will see the forward voltage is about 1.14V at 7ma. That means the resistor need to be (5-1.14)/(.007) or 551 ohms. But since the LED can go up to as much as 50ma a standard 330 ohm resistor should do just fine.
Now the transistor side is even simpler.
Pin 3 goes to 5V
Pin 5 goes to ground
Pin 4 goes to a digital input pin on the Arduino.
This instruction is hard to cock up. [EDIT .. not entirely true ..]
When I test the setup, the blinded sensor do catch high values (1025), but starts quickly to fluctuate.
When stimulated by light, the sensorValues drops to the neighbourhood of 950.
I imagined that I would have a larger difference .. I'm pretty sure that there will be too many blunders for a trustworthy check on the motors. Can I improve the situation .. any suggestions?
I tried the setup on the specs page 6, but that was top-values on the sensor any way around. I did keep the capacitor, trusting that marking:
(whatever it means) is something that can substitute a 0.01uF cap.
// a bit off topic
When I go online and wait for the page to download .. the wait-cursor of my pc (a ring icon) slightly pulsates with a 1 hz pulse. When testing the interrupter I noticed that the static response would pulse with the same regular frequency. Maybe I should howl at my pc-trader.