> > As usual, there's a bit of buggering about making sure the > cam isn't > > spinning too fast so it overshoots and re-enagages the > microswitch, etc. > > The way to handle this is to use a SPDT microswitch that > shorts the motor when it turns off (which stops the motion quicker). > You wire the short through the turn-on relay (can't use a FET > here, unless its a SPDT photmos) so that it's removed at turn on. > > Or put a ballast resistor across the motor so that it gets > damped when the power gets turned off. Now you're making it complicated. You don't need more parts, you just change how the microswitch interacts with the cam. If it works detecting a hole cut in the cam, then just make the hole a bit bigger, extending the time the microswitch stays off. A resistor to act a brake would be nice, except it complicates getting the motor started again. Tony -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist