It's fun to check how fast various things--fans, drills and the like--are rotating. And it's easy to do with the following ingredients that many of us will have at home:
Disclaimer: This works on my phone. It might not work with your LED or your phone. It might damage your phone, etc. All the responsibility is yours.
Background: An LED converts electricity to light but also can be used in reverse as a photodiode that converts light to electricity. The resulting current is low but sufficient to be captured by the microphone input of a phone (at least my Galaxy S3). An oscilloscope app can then capture the output and you can get the rotational speed.
I've used three different methods depending on what the rotating object is. The through-light method is for fans and other objects that you can shine light through. The matte object method is for objects like drills with plastic chucks that are not reflective. The metallic object method is for objects like drills with shiny metal chucks.
One tricky thing is that you might think that the light the LED will most efficiently convert to electricity will be of the same wavelength as the light it emits, but that does not seem to be true for the red LEDs I have. The red LED that I've tested seems most efficient in generating electricity from light in the green range (I get about 1.5 volts by shining a green laser). It seemed to have no measurable output from my white LED flashlight with a red filter (maybe the red component of the flashlight was too narrow and missed the sensitivity window of the red LED). This is important, because it means that if the LED were encased in red plastic, the photodiode function would be effectively killed. So if you use a red LED, make sure it's got clear plastic. Interestingly, the infrared LED that I tested was quite responsive in the red and infrared ranges, so if you want to work with a red laser or infrared light as your light source, use an infrared LED. I am assuming other LEDs will be like mine, but if not you may need to rummage around in your scrap electronics box.
The LED makes a super-simple light detector for your phone. While your phone may have its own light detector, this doesn't work with the oscilloscope apps I've tried, and has a much lower sampling rate than the microphone. The microphone input has a decent sampling rate, though unfortunately it filters out constant voltages on my phone and hence is only sensitive to changes.
I was originally going to explain how to do all this with a stand-alone oscilloscope, and indeed one can do it this way, but one of my kids pointed out that few people have oscilloscopes, so I switched to using a phone. Which is anyway easier than dragging my vintage 30 lb oscilloscope from room to room.
This is very simple. Get a headset cable with a four connector 3.5mm jack. Hook up the LED's anode (positive, longer leg, no flat) to the microphone input and the LED's cathode (negative, shorter leg, flattened plastic ring) to ground.
On my phone, if you end up reversing this, the LED will emit a very weak light and so you know you've got it reversed. With the correct connection there is no light.
The four connectors on the 3.5mm jack are: tip, ring, ring, sleeve. On Android phones, the ring nearest to the sleeve is typically the microphone input, and the sleeve is ground. So as in the diagram, the anode goes to the wire connected to the ring nearest the sleeve and the cathode to the sleeve. I understand that iPhones have it reversed, but I don't have an iPhone and am just going by something some website said.
I actually didn't have to do any soldering myself because I didn't have a spare headset cable at home but I happened to have some 3.5mm four connector male to DB9 female cables (from Sharp 7xx organizers). It is very unlikely that you have one of these, but if you do, you can just stick the LED right into the DB9 female connector (after checking which DB9 pin connects to which jack connector). The fit will be loose, so I wedged in some solid copper wire to keep the LED secure.