1
\$\begingroup\$

I have a square-shaped plastic plate (3 cm length X 3 cm width X 1.5 cm height) attached to a motor that rotates it at 500 Hz:

Drawing

I would like to have an interrupt fired on my microcontroller every time Point X (on rotating plate) reaches Position Y (fixed).

What would be an accurate way of accomplishing this such that the interrupt fires as exactly at that location as possible?

__

My notes: I would prefer not to modify the square plate with any additional material (so I'm guessing magnetic encoding is out). Therefore, I'm thinking some sort of optical interruption/reflectance sensor would do the job, but for greater accuracy perhaps the system might benefit from using an infrared laser diode placed above the plate, and a photodiode with matching wavelength range under the plate?

__

EDIT 1: I should mention that the square-plate is permanently fixed to the motor shaft, and cannot be removed to, e.g., insert an optical encoder disk in between.

EDIT 2: Detecting any/all of the four X corners of the square is OK; it doesn't have to be one particular X.

EDIT 3: Accuracy desired: +/- 0.1 mm radial travel.

\$\endgroup\$
  • \$\begingroup\$ What's the diameter of the motor housing? \$\endgroup\$ – EM Fields Aug 11 '14 at 10:25
  • \$\begingroup\$ @boardbite - how accurate do you need? Within 1 degree, or 0.4mm, or 5us; those values are all quite close to the same accuracy. They are quite challenging for some techniques. So I think that it is worth being clear about accuracy. I don't mind how you specify it, use whatever makes sense. \$\endgroup\$ – gbulmer Aug 11 '14 at 11:50
  • \$\begingroup\$ @EMFields: The motor: Approx. 2 cm diameter. The shaft: Approx. 0.2 cm diameter. \$\endgroup\$ – boardbite Aug 11 '14 at 20:25
  • \$\begingroup\$ @gbulmer: Would be ideal to detect it with an accuracy of within +/- 0.1 mm along the circular path of the point X. \$\endgroup\$ – boardbite Aug 11 '14 at 20:27
  • \$\begingroup\$ @boardbite - that is a very useful piece of information. I SWAG +/- 0.1mm is about 2us, or a response in +/- 1 cycle at 1MHz. I think that eliminates some of the answers. \$\endgroup\$ – gbulmer Aug 12 '14 at 2:13
1
\$\begingroup\$

Do you need to detect only that corner distinct from the others or will any corner work? If any one will work you can use a reflective type photodetector or possibly a Hall effect sensor. With proper positioning you can get it to detect the corner of the plate but you will not be able to distinguish one particular corner from the others.

Check out Optek reflective photosensors.

\$\endgroup\$
  • \$\begingroup\$ Yes, no need to distinguish between the corners. Were you implying the photodetector would be placed close enough to the corner that any reflections from other points along the square's sides would not be detected? \$\endgroup\$ – boardbite Aug 11 '14 at 2:47
  • \$\begingroup\$ Yes, you'd have to take care to place the sensor as far out away from the center as possible. As with any sensor, there would be some small error. The better your positioning, the smaller the error. There are also transmissive type sensors as you indicated in your question. Optek sells those, as well. They're cheap so maybe test a couple of types. Calibration would be the biggest issue. \$\endgroup\$ – Chris Ryding Aug 11 '14 at 3:00
2
\$\begingroup\$

A little piece of shiny tape on the corner (or even on the edge) could be detected with a LED and phototransistor. The silvery tape I'm thinking of is applied to 1/2 inch mag tapes to mark beginning-of-tape, but I'm sure 3M makes lots of other suitable reflective tapes.

\$\endgroup\$
1
\$\begingroup\$

maybe you could try to install an optical encoder to the shaft of the motor and read that with your microcontroller with good accuracy. The idea of using a laser and a photodiode is good, but if high accuracy is needed you would need a very narrow and collimated beam because the square-shaped plastic is quite small.

\$\endgroup\$
  • \$\begingroup\$ The optical encoder is a usable idea; only problem is that the plate cannot be separated from the shaft of the motor for the optical encoder disk to be installed. \$\endgroup\$ – boardbite Aug 11 '14 at 1:40
  • 1
    \$\begingroup\$ what if you install a parallel shaft with a couple of bearings and then interconnect the shafts with a belt? That would give you fairly low mechanical disturbance and you could attach the encoder disk in the second shaft. \$\endgroup\$ – ehilario Aug 11 '14 at 2:00
1
\$\begingroup\$

Can you drill a hole through the one corner of the square plate? If so then put an LED on one side and a detector on the other side. The LED would shine through the hole for a short moment as the hole turns by and allow the detector to see the pulse. To increase accuracy and reduce outside disturbance you can mount the detector in a small tube that has an inner diameter similar to the hole that you drill through the corner of the plate.

You could compare the diameter of the hole to the circumference of the circle traced out by hole as it rotates around. That ratio compared can be used to compute the pulse width to expect out of the detector considering the rotational period of the plate. At 500Hz the rotational period is 2 msec.

Place the hole in 0.5 cm from edge of each side of the corner of the plate so that the of the plate gives the hole a rotational radius of 1 cm. This will allow the detector tube to be fully obscured by the plate except for when the hole is directly over the tube. At 1cm radius for the circular path of the hole the total circumference would be ~6.283 cm. A small 0.3 cm hole would result in ratio of 0.3 / 6.283 = 0.0477. The scaled rotational period would make the time the hole was over the detector tube be on the order of 95 usec. Of course the sensor would see a increasing and then decreasing amount of light from the LED as the hole eclipses over the detector tube.

Any reasonably decent photo detector should be able to "see" a pulse eclipse that is 95 usec wide. To make the circuitry easy to deal with I would recommend that you try a detector such as the Fairchild QSE158 available from Mouser for around a buck. A detector like this makes things easy because you simply power it from 5->15 volts and get an open collector logic level output that you can interface to your MCU with a suitable pullup resistor.

An emitter that is compatible with this type sensor would be the Fairchild QEE123. Also available from Mouser this part can biased off your supply with a series resistor selected to permit from 20->75mA to flow through the infrared LED.

A couple of other things also come to mind. You could put the hole very near the corner of the plate but then the detection logic of the target MCU becomes a little bit more complex because you would have to discern the difference of the plate corners passing over the detector versus a corner that includes the additional narrower pulse due to the hole.

If you cannot drill through the plate then consider gluing a piece of opaque plastic tubing all along one edge of the plate. Then put both the emitter and detector each at ends of an equivalent piece of tubing that is lined up with the edge tubing once per revolution of the plate. This will give a similar eclipsed pulse scheme. Due to the greater distances involved you would need to use a bit more care in lining up the tubes and aiming the sensor/emitter concentrically down the center of the tubes.

\$\endgroup\$
1
\$\begingroup\$

You can't modify the plate and you say you can't remove the plate to fit an encoder.

Can you put a mark on the motor shaft under the plate so it passes an optical sensor as point X lines up with point Y? That seems like the simplest solution. A mark, or a small magnet, or a lump that breaks a beam, or a ferrous lump that excites a VR or hall sensor.

\$\endgroup\$
-1
\$\begingroup\$

I would use a Microswitch(tm) or similar switch positioned to be hit by a corner of the plate, although, without modifying the plate slightly, this would give you four pulses per revolution.

\$\endgroup\$
  • \$\begingroup\$ Thanks but I'm concerned that this method would involve wear and tear over time and also might disrupt the rotation. A non-contact method would be preferable. \$\endgroup\$ – boardbite Aug 11 '14 at 1:38
  • \$\begingroup\$ First find a microswitch that will work being actuated at 500Hz... I don't think so. \$\endgroup\$ – John U Aug 12 '14 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.