Instructables
loading
loading
Picture of Measure rotational speed with phone and LED
20140629_141308.jpg
20140629_142739.jpg
29_06_2014_14_09_16.png
2014_06_29_14.09.52.png

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.

 
Remove these adsRemove these ads by Signing Up
LucasF6yesterday

Great! I was looking for a simple solution like that.

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?

arpruss (author)  LucasF6yesterday
I don't have any fan fast to test this. It would probably require custom code to recognize the shifts.
philip4210 months ago

While a LED can be used as a detector, a photo diode is much more efficient.

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.

arpruss (author)  philip4210 months ago

Sure, but I had a bunch of LEDs sitting around, and no photodiodes. Zero cost and instant gratification beats a drive to Radio Shack. :-)

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.

craftclarity10 months ago

Wow! Never ceases to amaze me, what mobile phones are capable of. Pocket supercomputers....

arpruss (author)  craftclarity10 months ago

Better than just a computer, because of all the sensors in them.