0
\$\begingroup\$

I am raising an object/platform up and down using a DC motor connected to a threaded rod. I wish to know exactly when the top of the object reaches a certain threshold point during its movement, sort of like a limit/end-stop. See drawing below.

What would be the best way to do this such that my microcontroller can be notified with low latency (< 50 ms) and good positional accuracy (< 1 mm)? Would mounting a simple reflective optical sensor at my desired height do the job?

Note: I understand a stepper motor + driver would have been an acceptable solution but I'm going with a DC motor for lower cost, and because I only need to "know" one position along the movement.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Maybe a slotted hall switch with matching metal screen? \$\endgroup\$ – venny Sep 15 '14 at 20:57
  • \$\begingroup\$ Would you be more specific? You wrote "... microcontroller can be notified with low latency", how long is that, 1 millisecond, 100 milliseconds? You wrote "good positional accuracy", what does that mean, 1mm, 0.1mm, 10mm? \$\endgroup\$ – gbulmer Sep 15 '14 at 21:54
  • \$\begingroup\$ @gbulmer: Good point; I have specified them with an edit above. \$\endgroup\$ – boardbite Sep 16 '14 at 0:01
3
\$\begingroup\$

A limit switch, such as one of these:

enter image description here

They're cheap and plentiful. For a switch like that, you would connect the digital input pin of the microcontroller to the common pin of the switch. The NO and NC pins of the switch would be connected to power and ground. When the switch is relaxed, the digital input sees one voltage. When the object gets close enough to depress the switch, the digital input sees the other voltage. Your microcontroller then tells the motor to stop.

For a non-mechanical solution, you can use a magnetic proximity sensor. The simplest would be a reed switch. When a magnet mounted on the moving part gets close to the stationary reed switch, the switch activates and signals to the microcontroller similar to the limit switch. Reed switch are also very cheap.

Beyond that, there's a world of proximity sensors that represent the whole range of cost, complexity, and accuracy. Just type "proximity" into Digikey to get an idea.

\$\endgroup\$
  • 1
    \$\begingroup\$ Yup, come in lots of flavors. Fancy ones have ball bearing rollers on the end of the lever arm. \$\endgroup\$ – George Herold Sep 15 '14 at 22:21
  • 1
    \$\begingroup\$ Microswitch used to be a brand name for this style of snap-action switch, but it's become genericized. Because of the snap action they've got quite good repeatability. \$\endgroup\$ – Spehro Pefhany Sep 15 '14 at 23:52
3
\$\begingroup\$

Another cheap alternative is an (IR) slotted sensor. They are used a lot in printers.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ In this kind of arrangement, I suppose there would be some opaque tape or plastic overhang of the moving cartridge head, that can go into the slot? \$\endgroup\$ – boardbite Sep 17 '14 at 1:00
  • \$\begingroup\$ Correct. (which in itself is too showrt for a comment :( ) \$\endgroup\$ – Wouter van Ooijen Sep 17 '14 at 6:02

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.