The gray-scale wheel was supposed to be printed on transparency (clear) paper, but I did not have it available. However, the results are spectacular! Reading the analog output, I get 3 with black, 70 at white, and linear readings throughout the gray-scale! I am sure the resolution will be much better if printed on clear plastic and resolution will be improved if a larger gray-scale range is used. (I photo-shopped three gray lines of incrementing darkness).
The optical switch has a NPN phototransistor built-in (the ones with the photodiodes probably won't work) and an infrared LED. Make sure you use a resistor on the LED, as I blew my first one (making this an $8 gyro). I will try to get the video online shortly.[Wiring info: I used an OPB804. The dot is on pin3! I connected pin1 to Vcc, pin2 to a resistor (I use 500 ohms to be safe), and then to ground. Pin3 I connect to Vcc via an LED (as an indicator). Pin 4 goes to my Arduino's Analog In and also to a resistor (3000 ohms) to ground. ]

When you say "Pin 1 to Vcc" do you mean pin 1 to the 5volt pin on the Arduino? By the way, your blog is hte only reference I could find to someone using an OP's is the only reference I could find to someone using an OPB804 with an Arduino. Did you finish the project? I am curious if the Arduino/OPB804 was fast enough to keep your object upright.
ReplyDelete