DC Servo position control
KenBash
Posts: 68
I've managed to combine the HB-25 control and·the encoder feedback·programs to get a workable but still somewhat crude positioning function for a DC motor.· I know there are several downloads available for speed control but I'm not familiar with any that let you do accurate·positioning with a DC motor.·· I doubt that I am the first to need or do this. ··If so, I'd be happy to share the code·but like I said it's still pretty crude.
The optimum would be an assembly program that gets passed a position value where you want the motor (or two ) to be and it does the rest.· Does anyone know of a program that already does this?·
I'm replacing some Stepper motors with DC motors to take advantage of the extra speed. ·I don't mind spending the time, but I'd hate to be re-inventing the wheel if it's already been done.
Anyone know of anything already out there?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "
··············································· ( R.A.H. )
····································
The optimum would be an assembly program that gets passed a position value where you want the motor (or two ) to be and it does the rest.· Does anyone know of a program that already does this?·
I'm replacing some Stepper motors with DC motors to take advantage of the extra speed. ·I don't mind spending the time, but I'd hate to be re-inventing the wheel if it's already been done.
Anyone know of anything already out there?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "
··············································· ( R.A.H. )
····································
Comments
If your motor control supports reverse, and i susspect it does, you might want to try a "burst" pulse of the reverse direction. Beware that trying to reverse a motor that is in motion presents extra load to the switching elements and may overload them! If MOSFET's are used, make sure they are rated for at least double the current the design calls for. At minimal, closely monitor the temperature of the MOSFETS and motor and if the temerature climbs above 130F/50C, stop and disconnect power immediately!
Caution: The above information is given with a disclaimer that equiptment damage may occur, use this info at your own risk!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! The average PC while browsing the internet typically uses less than 30% of it's potential, why not donate a portion of the rest for cancer resaerch?
Its called a servo. DC motors are routinely combined with quadrature encoders to replace stepper motors in automation and CNC systems.
Ken, check out microchips application notes, they have serveral descriptions of servo systems using encoders and PID control. As far as I know no one has implemented a servo drive on the propeller and if they have they are doing so for commercial reasons.
Cheers,
Graham
The HB-25 seems to be able to handle the power ( including reversing the motor when in motion ) just fine. I would like a bit more voltage than the 12 volts the HB-25 uses.. but as an inexpensive servo drive package, the HB-25 combined with the proto board should be hard to beat. Like I said, I've got it working but it's a bit clunky, I haven't really written it as a PID function and the pulse-width speed/direction control is a bit akward in a servo drive function. I was hoping someone else might have done it better. Guess I'll have to keep going.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "
··············································· ( R.A.H. )
····································