To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 10233
10232  |  10234
Subject: 
#5120 Polarity Switch: cheap shaft encoder/rotation sensor?
Newsgroups: 
lugnet.robotics
Date: 
Sun, 23 Jan 2000 10:21:10 GMT
Viewed: 
694 times
  
If you remove the lever from the polarity switch you can insert an axle through
the switch which will cycle the switch continuously between fwd/off/rev/off.
Since most of the tension in the switch is actually provided by the lever slot,
this axle can turn pretty freely.  If you connect both ends of this switch
straight across, it's an open circuit for fwd and off, and it's a short for
rev, so you can than connect this to a passive RCX sensor input just like a
normal button.  It will be off 3/4th of the time and on 1/4th of the time, and
you see two 'on' cycles per rotation.  A sensor set to SENSOR_EDGE (if you're
using NQC and the standard mindstorms fw) counts up 4 (2 transitions, to on, 2
to off) for every turn of the axle (either way -- no way to tell direction).
This can't keep up with a motor due to the debounce code in the mindstorms fw.
According to the internals page, a transition can only occur every 300ms, so
this works out to about 45rpm max.  Even in NQC you may be able to do better by
sampling it manually.  legOS could probably do very well.

Since my rotation sensors finally arrived, I doubt I'll ever use this.  But
since I noticed it I had to point it out. :-)

--Ben



Message has 1 Reply:
  RE: #5120 Polarity Switch: cheap shaft encoder/rotation sensor?
 
(...) <snipped description of polarity/rotation sensor> Ben, I think that the polarity switch is one of the most underused Technic/Train elements. The fact that it switches polarity as well as providing an off period is probably due to a (...) (25 years ago, 23-Jan-00, to lugnet.robotics)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR