And what would be really cool using a stepper motor is when you power up = the project, the control 'moves' back to the last stored position nice = and smooth... -----Original Message----- From: Roman Black [mailto:fastvid@EZY.NET.AU] Sent: 28 June 2002 11:24 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE]: stepper "digital" knob viability (re stepper motor for a digital knob thread) I've just been playing with a 12v unipolar "surplus" stepper from an old 5.25 disk drive. Connected it to the CRO and used a clothes peg for an accurate "knob". Output voltage doesn't seem to be a problem, even the slowest one-detent moves make +/-200mV or more, 400mV P/P, a decent speed (like 0.1 rev/sec) gives +/-1v, and anything like a spin (>0.3 rev/sec) slams the volts into the 4.6v safety stop (I used a 4.6v zener in parallel with each coil). So using 2 transistors biased at 500mV (just off) you could sense positive going pulses over 100mV, would give decent "dial" operation for any real twiddling speed. Yes it is possible to move the knob if you really try without triggering a 100mV setpoint, but it's not easy. Ok, so not as good as optical dial encoder on that point, but better in terms of bearing/shaft/detent/mounting quality, etc which matter a lot in high use or high quality application. And probably price too! :o) I don't think the problem will be detecting pulses but in the decoding. Detecting only the + pulses is easy and will give quadrature encoding (90 degree phase) when the dial is turning. So turning dial will work well. The problem will be in tiny fractional moves. There were 200 obvious "detents", but some (half!) produce - pulses. Looking at one coil only, you can turn the knob one detent and it makes a + pulse. Turn it another detent and it makes a - pulse. I really don't know how to get around this problem. For any real turning speed the thing will work great, but for fractional moves there will be 1 detent in 4 that makes - pulses on both coils, which won't be detected. This doesn't matter if the knob is turned more than a few detents and also doesn't matter if the tiny movements don't need to be measured exactly equivalent by degree. The very easiest solution would be to detect when both + pulses occur together, then when one ends before the other the PIC logs a "pulse" in that direction. This would only increment one pulse per 4 detents, or 50 pulses per shaft rotation but work very reliably. 2 transistors, 4 1N4004 diodes, handful resistors. -Roman Peter L. Peres wrote: > > LM393 with + inputs grounded and motor coils between - inputs and gnd. > Pullups required on outputs. Or LM358 (still with pullups to achieve = Vih). > Maybe add two 1k resistors in series with each coil to avoid pumping = the > supply if the motor is turned very fast. > > Peter > > > >Josh Koffman wrote: > >> > >(regarding rotary encoders for DIAL use) > >> There are ways to use a stepper motor as well, though I've never = tried. > >> The ETC Expression lighting console uses just such an arrangement. > > > On Fri, 28 Jun 2002, Roman Black wrote: > >I *really* like this idea! :o) > >Having replaced optos (darn unreliable things) in > >so many VCR optical "dial controls" the idea of using > >a $1 surplus stepper motor is brilliant. The detent > >"spring" will never wear out as it is the magnetic > >field of the motor, and with such low currents and > >heating the thing will work for about a zillion years, > >or until the bearings give out. Strong panel mounting, > >all-metal construction, solid bearings, hardened shaft, > >etc etc. Now cheap old-style steppers are available > >everywhere from the junk guys this sounds like a REALLY > >GOOD digital dial. > > > >Now any takers on the simplest circuit to connect one > >to 2 PIC digital inputs?? :o) -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.