Talking of off-the-wall ideas; this one worked experimentally though it is quite weird. I love those rotary encoders that have a detent action, you know, you turn them in small clicks. Usually these consist of a cogged wheel with a small steel strip to provide the detent action, and an optical encoder to generate quadrature phase signals. The other day I picked up a small permanent-magnet stepper motor (about 1 inch diameter) and twiddled the shaft idly, when suddenly the thought occurred, what sort of transducer does a stepper motor make?. Hooking it up to the scope, the answer was, a very good one. The motor I used had four coils, sharing a single common ground line. Picking two coil phases, I placed a 100 ohm resistor from each coil output to common, then connected the outputs via two 4.7K resistors and a silicon diode (1N914), anode to the coil, to the bases of two NPN transistors which had 2.2K collector resistors to +5V. This produced an excellent quadrature square wave. You could build, using this, some interesting gadgets. Being virtually indestructible - after all, its a rotating armature and a set of coils - no brushes etc, it would be quite reliable in a harsh environment e.g dust and dirt, where optical sensors tend to fail. Fed into a PIC, which generated a multi-phase output, you could connect an identical motor at the output and you have a rotary positioner where the output tracks the input (antenna rotator, for instance). Because the two motors are identical, rotating one by x degrees will cause the other one to track exactly. Of course, on power up the position is unknown, since it is an open-loop system, but an index sensor would allow you to calibrate at power up, much as a floppy disk drive does a track zero seek, looking for the track zero photosensor to go high. > ---------- > From: Rick Dickinson[SMTP:rtd@NOTESGUY.COM] > Reply To: pic microcontroller discussion list > Sent: Thursday, January 08, 1998 4:50 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Best way to read a POT without the A/D? > > At 02:37 PM 1/7/98 -0600, Norm Cramer wrote: > >Thought of this but I need to know the position of the pot. It needs > to > >physically stop at the high limit and physically stop at the low > limit. I > >couldn't find any encoders that would do this and give me 128 steps. > > > >At 11:25 AM 1/7/98 -0600, you wrote: > >>maybe you should look at an encoder. they require two inputs but are > >>digital. > >>www.digikey.com lists them starting at about $2.50USD. > > Here's an off-the-wall idea: > > Use an encoder, such as the Digi-key #3315Y-1-006-ND, which gives 6 > pulses > per revolution on each of the two outputs. Thus, each revolution > gives 24 > detectable states. Use two gears, one on the shaft of your knob, and > one > on the shaft of the encoder, to multiply this 24 out as far as you > need it. > A six-to-one ratio will give you 144 states per revolution, which > will > allow you to have 128 states with only eight ninths of one knob > revolution. > Physical stops at each end of the range can be achieved by adding a > pin > sticking out of the knob's shaft or the side of the gear, and two > appropriately placed stops for it to bang up against. > > What is the requirement that the end stops be physical? Appropriate > visual > or audible feedback of the current setting might be simple to achieve, > even > with an encoder that requires multiple turns to cover the full range > of > settings, and might make an appropriate substitute for "physical" > feedback > (e.g.: end stops). > > Hope these ideas help you think in directions that help you solve your > problem! > > - Rick > > +---------------------------------+---------------------------+ > | Enterprise ArchiTechs Company | | > | Lotus Certified Notes | Never underestimate the | > | Appl. Design & Administration | bandwidth of a station- | > |(818)563-1061 rtd@notesguy.com | wagon full of tape reels. | > | http://www.eArchiTechs.com | | > +---------------------------------+---------------------------+ >