piclist 2001\01\31\163704a >
Thread: PWM motor control from frequency measurement
face picon face BY : Olin Lathrop email (remove spam text)

> I am using a 16F877 to control a motor within a pyrometer. The
> detector requires a 'chopped' signal, so there is a chopper on
> the end of the motor. The chopper is split into quarters, with
> two opersite quarters missing (if that makes sense!). There is
> another small detector and led at the edge of the chopper to
> give a 'synch pulse'.
> Basically I have to use this synch pulse to contol the motor
> (keep at a constant rmp) via the chips PWM output.

PWM is merely a means of adjusting the motor's effective drive voltage.
Once it is all set up, you can think if it like a D/A.  That's the easy

The more difficult part is to come up with an algorithm that figures out
what to set the PWM to given the measured motor speed.  I would start with a
strategy known as a PID (Proportional, Intergral, Derivative) controller.
There is LOTS of material out there about PID controllers.  The basic
concept is rather simple, but there are lots of wrinkles and details.
That's why there are graduate level courses in control theory dedicated just
to PID controllers.

To reassure you it's possible, I did a project a few months back with a
16F876 that controlled the RPM of a gaoline engine.  It captured tachometer
pulses with the CCP module and controlled the engine throttle via an
electric motor driven from the PWM output.

Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, EraseMEolinKILLspamspamembedinc.com, http://www.embedinc.com

http://www.piclist.com hint: To leave the PICList

<002b01c08bcd$1d895570$260bf6cd@pc> 7bit

See also: www.piclist.com/techref/microchip/ios.htm?key=motor
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) PWM motor control from frequency measurement

month overview.

new search...