HWPWM and 4 motors


Closed Thread
Results 1 to 9 of 9
  1. #1
    Macgman2000's Avatar
    Macgman2000 Guest

    Question HWPWM and 4 motors

    Hello,

    I want to control 4 DC motors (single direction, no H-bridge) using 4 HWPWM outputs from a PIC. The PWM frequency is the same on all 4 outputs, the only thing that is different is duty cycle (since I want to change speed). I am also monitoring the BEMF from each motor commutation to "close the loop" and maintain set speed.

    I looked at the 16F616, this is set up to drive 1/2 bridge or full bridge but does NOT allow all 4 HWPWM output at the same time. I would appreciate input from the group, if anyone has experience with this, your insight would be greatly appreciated!!!!

    Best Regards,
    Nick

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    At least, 4 possible solutions


    1. Use 4 different PIC like 12F683 wich have PWM, ADC, and comparator available

    2. Use one pic but no HPWM. You do your PWM signal using an TIMER interrupt. Once in the interrupt routine you just play with the duty delay of each outputs. Depending the frequency... it could work really well

    3. Use external DAC converter OR digital pots.

    4. Search for another PIC that allow 4 independant PWM... if it exist.
    Last edited by mister_e; - 3rd May 2006 at 21:44.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    fanie's Avatar
    fanie Guest


    Did you find this post helpful? Yes | No

    Default

    Have a look at the 16F684...

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Cool Muti_SPWM

    Hi Nick,

    Taylor made to your request, 2 years in advance.

    Multiple Slow speed Software PWM
    http://www.pbpgroup.com/modules/wfse...p?articleid=12
    <br>
    DT

  5. #5
    Macgman2000's Avatar
    Macgman2000 Guest


    Did you find this post helpful? Yes | No

    Default

    The 16F684 is a 1/2 or full bridge driver. It will only output PWM on 2 ports and give steering logic to activate an H-bridge (FWD / REV). Has anyone used it to put out 4 PWM signals? I don't think it is possible per spec sheet.

    Best Regards,
    Nick

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    You are correct!

    You can only get 2 PWM's from it.

    The ECCP does have several outputs. But, they can not be configured to output different frequencies or PWM dutycycles.
    <br>
    DT

  7. #7
    fanie's Avatar
    fanie Guest


    Did you find this post helpful? Yes | No

    Default

    If you want more PWM's have a look at the 18F2431 - sports up to 4 PWM's with complimentary outputs...

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Now that's a Cool chip.

    I can't believe I haven't seen it before.

    Wow, all those PWM's, and Capture channels.
    Built in Quadrature Encoder Interface.
    Super Fast A/D.

    And everything else a good 18F would have.

    Geez, where have I been..

    Thanks fanie!
    <br>
    DT

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I have to agree it's a nice PIC even if it's hundred times too big for a so simple task.

    Sorry to be a pest but, the Darrel's Link or the interrupt based routine is still the cheapest solution and will learn you something.
    Last edited by mister_e; - 5th May 2006 at 02:52.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

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

Posting Permissions

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