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:

  • phone (I am using Android, but I assume iPhone will work, too)
  • red LED with clear plastic (red LED with red plastic will probably not work)
  • four-connector cable from an old headset
  • flashlight
  • oscilloscope app (my instructions will be aimed at OsciPrime; source code and free APK are here; I have no connection with the authors)
  • fan / drill / drill press / other rotating object

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.

Step 1: Make a light detector for your phone

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.

<p>Great! I was looking for a simple solution like that.</p><p>How fast would this set up detect changes in the rotation speed? In my application, I have a fan (of a DIY rowing erg) that will change from 10-20rps (rotations per second) to 50-60rps in about 0.5s. And I need to measure these speed changes at a high rate (300-600 times per second). How that be possible?</p>
I don't have any fan fast to test this. It would probably require custom code to recognize the shifts.
<p>While a LED can be used as a detector, a photo diode is much more efficient.</p><p>They're relatively inexpensive, and you can easily salvage one from an old VCR, TV, or anything that can be controlled by an infrared remote control.</p>
<p>Sure, but I had a bunch of LEDs sitting around, and no photodiodes. Zero cost and instant gratification beats a drive to Radio Shack. :-) </p><p>And all our IR controlled devices are unavailable for salvage. I would also expect that some IR controlled devices will use a receiver module tuned to a particular frequency, like a TSOP382, instead of a discrete photodiode.</p>
<p>Wow! Never ceases to amaze me, what mobile phones are capable of. Pocket supercomputers....</p>
<p>Better than just a computer, because of all the sensors in them.</p>

About This Instructable


112 favorites


More by arpruss: Toby the Targ from Star Trek Photos from phone to Minecraft Star Wars and Star Trek in Minecraft with Raspberry Jam Mod
Add instructable to: