When you say linear rotary actuator, I am assuming that you mean a mechanism that converts linear motion into rotary or vice versa; and you have a feedback mechanism about the motion. If you want to hold position and you are talking about standard closed loop position control. A brush or brushless (brush is easier) motor with the encoder as a feedback element in a PI or a PID loop should do it. Microchip has an app note on it's web site dealing with the implementation of PID control on a PIC. Good luck Madhu > Hey everyone. > > Recently I obtained a very sophisticated piece of equipment. A linear rotary > actuator with an optical quadrature decoder for feedback. In other words: a > harddrive arm. I thought of making a foot control pedal with it, to be built > into a MIDI controller pedal with preset buttons. The tilt is just about > right, and the optical encoder has amazing resolution. The idea is to have > the pedal assume its last stored position for each preset, and to provide > mechanical resistance when moved by the user. > > I guess I'll hook up the "voice coil" to a PWM-controlled H-bridge. The > encoder has TTL outputs. So I'm not worried about hardware. But how would I > go about the software, to have the maximum counter torque, but also a > position hold, when the pedal is left alone? Anybody know any links to this > kind of motion control? I'm using a PIC16F874-04 > > Thanks, > Joris. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.