Since I have the IR Emitters and Detectors from SparkFun, I decided it was time to test
them. The suggested IR schematic calls for a 270 Ohm resister and 10k Ohm resister per pair, so I made a quick run to RadioShack to get them. While I was there, I ran across two different types of light sensors. I snagged a pack of each to test.
The IR pair wasn’t working with the battery and 5v regulator, but once I plugged the circuit into the Arduino 5v pin, it worked fine. The code was simple enough as it only needed an analogRead to a single pin. However, I didn’t like the physical size of the circuit required. It had a few too many wires for my taste. Basically, it worked but I wasn’t in love with it.
Next I turned to the photoresistors that I bought from RadioShack. SparkFun also sells them which gave me link to a schematic. Luckily I had already bought 10k Ohm resistors, so I didn’t need to make another run to RadioShack. I had to use my breadboard to hook it all up because I couldn’t get both wires into the A0 pin. 🙂 Either way it was a much smaller circuit than the IR circuit. It only required one row of breadboard pins, and the other two sides of the devices go to the power columns.
While the photoresistors or photocells are definitely my top choice, I decided to try to hook up the ambient light sensors. It took awhile to find a schematic for them, but eventually it was SparkFun that came through for me. While their ambient light sensor looked different, I was still confident that the schematic would work. Plus, it’s actually the same as the photoresistor circuit! One quick swap and I was up and running.
The good thing is it worked. However, the range left something to be desired. It was measuring around 170 in the one lamp lit room which is decent, but it only dropped to 150 when I shinned my iPhone’s flashlight directly at it. The photoresistors typically went from around 200 in ambient light to 30 with direct light. Photoresistors win! They have the smallest circuit and a great range of values. Time to go buy more.