Recently I deconstructed an old HP Office All In One printer. In the process I scavanged 3 devices that look like this:
HP Branded Opto Device
I’ve seen these before when deconstructing printers and assumed they were some sort of optointerrupter devices. After some research online and I found a device at Digi-Key that looks similar. The photo of the OPTO SENSOR 5MM DARK-ON TRANS looks similar and the scavanged device acts like the name in the sense that the sensor turns on the logic output when the light can’t get to the sensor (e.g., dark).
These devices work by having a infrared LED on one end of the slot and a phototransistor at the other end. There are transistor like devices in the catalogs and there are logic devices as well. Since the current flows when the light is blocked I assumed this was a logic based device and not just a raw optotransistor for the sensor. I am not sure if this is correct, but it doesn’t matter since I was able to get it to work.
I played with the device a little and decided I could build something that could measure the reveloutions per minutes (RPM) of some of my hobby DC motors.
The schematic of how I wired this up is shown below. Since I don’t know the actual device in use, the schematic of the actual optointeruppter should be asumed to be wrong, but close enough.
I assembled a small jig using Actobotics™ parts from ServoCity and attached a 12-24V hobby motor to the jig. I cut a 70mm disk out of some stiff paper and attached it to the small gear on the motor shaft. The opto device was glued to a piece of hook and loop material that the other half was also glued to the jig.
Front of Jig – Notice Slot In Disk
The Top of the Jig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
You can see the results on the OLED display shown below. With the hobby motor I was able to get the motor to slow down to ~203 RPM at 2.5 volts before it stalled and up to ~3500 RPM at 27.8 Volts.
I’m very happy with how this worked out. I was hopeful to get some sort of measurement but did not know how responsive the actual opto device was going to be. In a word this was “fantastic”.
OLED Display on the mbed Application Board
Scope Trace at ~203 RPM
I was really hopefuly that the rise and fall times for the opto device were fast enough that I could measure 3500 RPM. You can see from the trace below that at 3500 RPM the device has a fall time of about 45us and a rise time of 320us. So lets assume the total dip time (fall + transparent slot time + rise) is about ~500us at this speed. If this holds up (and the slot time will go down) then this device should be able to measure a motor speed of more than 1000Hz or 1000 Cycles / Sec * 60 Sec/Min or 60,000 RPM. I don’t think I have any motors faster than maybe 5000 RPM. It would cool to test something in the 10,000 RPM to 20,000 RPM range.
Scope Trace at ~3467 RPM
All in all I’m pretty excited by these results. I hope to code up an Ardunio version and test that soon. I will post the results here for those of you that want to do this with an Arduino.