To Mr. Darrel Taylor once again


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2007
    Location
    Denmark
    Posts
    28

    Wink To Mr. Darrel Taylor once again

    Again Darrel, I want to thanks you for another of your great extensions, this time the Multi_SPWM. It works great, I have a question tho.

    Suppose I want to use those PWM's to drive a motor, where currents can be high. How can I step up the voltage? Using transistors maybe? A ULN2803A perhaps? What would you recommend? Maybe a npn with a pnp, dunno..

    thanks in advance!

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


    Did you find this post helpful? Yes | No

    Default

    Hi Art,

    The question of low frequency PWM driving motors has come up before.
    malc-c was trying to use it on a model train.

    There was lot's of whining coming from the motor.
    Didn't sound good at all.

    I'm more of a software guy, so I really don't have much to offer on the hardware side.
    But it seems that motors want a much higher frequency than Multi_SPWM can deliver.
    <br>
    DT

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink

    Hi, Art

    you will find the whole "story" here:

    http://www.picbasic.co.uk/forum/showthread.php?t=5687

    and

    http://www.picbasic.co.uk/forum/showthread.php?t=6205

    in the end ... we used a 16F872/876 @ 4Mhz ... that allows a 245 Hz HPwm ... and you can use the TWO channels of the device, if needed .

    an IRLZ 44 ( do not forget the flywheel diode !!! ) was used to drive power and a simple relay used for inverting polarity ...

    May be MalcC will add here some "user infos" ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I do a lot of motor speed control using PWM. Generally, you should choose a PWM frequency above human hearing (>20KHz). This guarantees that you won't create any growls, squeals or other noises.
    Also, a lot of motors don't like the chopped DC that PWM produces (this is especially true of the brushless types). In that case, you need to provide a storage inductor and a filtering capacitor to smooth the output. By properly choosing the components, you can wind up with a signal to the motor that is a varying DC voltage with only tens of millivolts of ripple. The higher the PWM frequency, the smaller the inductor needs to be. I generally use 78KHz as the minimum frequency.
    Generally, the topology you will want to use is called a "buck" regulator. An excellent tutorial, as well as component selection guides can be found on the National Semiconductor website.

    I realize that such frequencies generally eliminates the possibility of using software PWM, but such an approach is necessary for serious use. As an example, one of my designs uses one PWM channel of an 18F8722, and smoothly controls a 25A at 48V brushless motor (over 1HP).
    Charles Linquist

  5. #5
    Join Date
    Nov 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default freq

    Hello,

    Could there be a way to adjust frequency on the fly?

    Thanks
    Jordan Adair

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Hardware or software ?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Nov 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Hardware..

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    You will need to setup a couple of variables. One for Dutycycle and one for Frequency to control the Channel.
    Code:
    DC  VAR BYTE   'Dutycycle
    FQ  VAR WORD  'Frequency
    
    HPWM 1,DC,FQ
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Nov 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default multi_SPWM

    I'm using multi_SPWM. I'm wondering if there is a way to change the frequency using a pot?

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


    Did you find this post helpful? Yes | No

    Default

    Not the way it is written.

    The frequency is calculated a compile-time and cannot be changed at run-time.

    Of course, that doesn't mean it can't be done.
    Just that you can't do it with that program.
    <br>
    DT

  11. #11
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post

    May be MalcC will add here some "user infos" ...

    Alain
    Not much to add, in that, whilst it worked there were issues, one of which later came to light later after some use in that the motor life was shortened some what (these small 5 pole motors apparently don't like pulsed supplies as it has a heating effect on the motor).

Similar Threads

  1. Timer1 and Timer2 interrupts, Darrel Taylor
    By ronbowalker in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th December 2009, 19:38
  2. darrel taylor's instant interrupt compiler error
    By delta_boogie in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 20th October 2009, 20:07
  3. Darrel Taylor Interrupts I2C Problem
    By dcorraliza in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 26th March 2008, 03:13
  4. To Mr. Darrel T. :)
    By atwoz in forum General
    Replies: 3
    Last Post: - 16th December 2007, 20:24
  5. using darrel taylor's instant interrupts
    By Michael Wakileh in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st July 2007, 05:07

Members who have read this thread : 1

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