PID-filter routine (2nd try).


Results 1 to 40 of 132

Threaded View

  1. #6
    Join Date
    May 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by infinitrix View Post
    can i use the code to control speed and position of motor using same pic?
    First step (get), you Get variables from hardware (via pot, encoder, ...)
    Second step (control), you correct those variables (PID between desired and got variables)) to reach your desired speed, direction & position by PWM and polarity (depending on the type of motor DC, BLDC or what ever). That is control.

    And yes, both steps you can perform them in a single MCU. Motor control oriented MCU's works great for this, such as a dsPIC30F3011; or for this compiler, a PIC18F2431 (or any of the family PIC18Fxx31) which have QEI peripheral, where QEI stands for Quadrature Encoder Interface, which decodes signal from a rotary Quadrature Encoder, ideal for gathering motor rotation activity.

    Rodrigo M.-
    Last edited by RodSTAR; - 27th March 2009 at 17:36.
    "Beethoven had his critics too, see if you can name 3 of them"

Similar Threads

  1. Darrel's latest 16 bit averaging routine?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th October 2009, 01:57
  2. 2nd order Low-pass passive RC filter on PWM
    By munromh in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 29th January 2009, 19:03
  3. Atod Digital Filter
    By GeoJoe in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd April 2008, 17:04
  4. PID controller in 16F737
    By joeri in forum mel PIC BASIC
    Replies: 8
    Last Post: - 24th June 2006, 11:39
  5. 2nd Order Digital Filter for 24-bit
    By sefayil in forum mel PIC BASIC
    Replies: 0
    Last Post: - 2nd December 2005, 21:55

Members who have read this thread : 2

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts