---
+ Post New Thread
Results 1 to 19 of 19
  1. #1
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    How to generate PWM from PIC16F84A to control the 4 switches of a h-bridge?

    how to generate PWM from PIC16F84A to control the 4 switches of h-bridge? does anybody would like to share the schematic and components to be connected to the microcontroller? thanks =)

  2. #2
    Advanced Member level 2
    Points: 9,335, Level: 23
    Davood Amerion's Avatar
    Join Date
    Mar 2005
    Location
    Persia
    Posts
    585
    Helped
    115 / 115
    Points
    9,335
    Level
    23

    pwm schematic

    it is not need any schematic!
    you can use any of pins of 16F84.
    and with genarate PWM in your program.
    in this configuration frequency of PWM is not high,
    if you want higher frequency you can use other microcontroller which have internal PWM peripheral.


    1 members found this post helpful.

  3. #3
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    pic16f84 pwm

    can u suggest/show me more detail or perhaps example regarding this matter? sorry, this is my first time using microcontroller... thanks!!



    •   Alt22nd December 2005, 10:44

      advertising

        
       

  4. #4
    Advanced Member level 2
    Points: 9,335, Level: 23
    Davood Amerion's Avatar
    Join Date
    Mar 2005
    Location
    Persia
    Posts
    585
    Helped
    115 / 115
    Points
    9,335
    Level
    23

    pic16f84a pwm

    it is an example:
    http://ww1.microchip.com/downloads/e...tes/30450c.pdf
    i send you more later.


    1 members found this post helpful.

  5. #5
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    pwm pic16f84

    ok... thanks alot!! how nice of u...=)



  6. #6
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    pwm schema

    I think you should first familiarize yourself with generating PWM using PIC microcotroller; try this link: http://www.pages.drexel.edu/~kws23/t...s/PWM/PWM.html
    Once you fill comfortable with PWM you can switch over to more complex projects such as driving motors (H-bridge and PWM, for example: http://zebra.tky.hut.fi/~jap/Electronics/MotorCtrl/
    Regards,
    IanP


    1 members found this post helpful.

  7. #7
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    pwm with pic 16f84

    thank you very much... nice of u... =)

    Added after 23 minutes:

    does PIC16F84A still can be used if i want to do a four-quadrant dc motor wif speed control? do the pins enough? thanks



  8. #8
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    irf530 pwm

    Have a look at the configuration of this H-Bridge with P and N-channel MOSFETS ..
    As yo can see you need only two PICs pins to control this bridge ..

    For professional application, where high frequecy switching is required, you should consider microcontroller with build-in PWM hardware block, but at this stage you can easily work with frequencies such as, for example, 1kHz, and for that PIC16F84 is more than enough ..

    Regards,
    IanP


    1 members found this post helpful.

    •   Alt22nd December 2005, 13:53

      advertising

        
       

  9. #9
    Advanced Member level 2
    Points: 9,335, Level: 23
    Davood Amerion's Avatar
    Join Date
    Mar 2005
    Location
    Persia
    Posts
    585
    Helped
    115 / 115
    Points
    9,335
    Level
    23


    1 members found this post helpful.

    •   Alt22nd December 2005, 14:26

      advertising

        
       

  10. #10
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    pwm pic 16f84

    will PIC16F877A be more suitable for PWM dc motor speed control bcz i found that this microcontroller has built in PWM through pin CCP1&2? any external component to be connected to the pins? does it mean that PWM can be generated by the delay function in the programming part? is it possible to vary the duty cycle which affects the speed of the motor without changing the programming from time to time?

    thanks a lot!!



  11. #11
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    hbridge_theory.pdf

    PIC16F877 is much more versatile than PIC16F84 ..
    On top of the additional PWM module it has also 10-bit ADC, which in your case can be used as reference to the PWM output without the need of changing the program all the time ..
    Assuming, that the PWM generator is programmed and it is running "behind", you can connect a potentiometer to one of the Analog inputs and adjust the duty cycle from 0-100% at your will ..
    The outputs from the PWM module can be connected directly to the MOSFET H-Bridge from the previous post ..

    Regards,
    IanP


    1 members found this post helpful.

  12. #12
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    high current pwm schematic

    hi! really thanks for the schematic of h-bridge. it is really useful! i am thinking of building this circuit. btw, are the models&values of all the components in the circuit usable for +12Vdc motor? how to determine the model&value of the MOSFETs? really thank you very much! =)



  13. #13
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    pulse width modulator schematic

    This circuit is suitable for 12V motors ..
    I don't know the power rating of your motor, but I guess that >10A MOSFETS will be powerfull enough ..
    Have a look at these very common MOSFETS:
    MTP3055 N-Channel
    http://www.ee.washington.edu/stores/...et/mtp3055.pdf
    MTP2955 P-Channel
    http://www.ee.washington.edu/stores/...et/mtp2955.pdf

    Alternatively you can try: IRF530 (N) and IRF9530 (P) ..

    Regards,
    IanP


    1 members found this post helpful.

  14. #14
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    mosfet pwm circuit

    what should i know when buying a dc motor so that i can choose the suitable MOSFETs? power rating or current rating? let say current rating, my MOSFET current rating must be at least the current rating of the motor right? please guide...
    thanks a lot!!
    merry christmas!! =)



  15. #15
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    schema mosfet pwm

    Usually motors have certain current rating ..
    I would say, select a MOSFET which has at least 5 times that current, and the lowest possible Rds(ON) ..
    Now, when a MOSFET has a low RDS(on) rating, it usually has quite a
    high current rating typically in the 10s of amps. I needed 4 amps
    continous and the MOSFET I chose offered 25 amps. Naturally, the lower
    the RDS(on) rating, the more expensive the MOSFET. BTW, both types of
    MOSFETs are available in TO220 packages.
    This is a quotation from an article on the H-Bridge from one of the previous posts ..
    Here is the rest:
    http://www-isl.ece.arizona.edu/~socc...dge_Theory.pdf

    Regards,
    IanP


    1 members found this post helpful.

  16. #16
    Junior Member level 1
    Points: 1,369, Level: 8

    Join Date
    Dec 2005
    Posts
    19
    Helped
    0 / 0
    Points
    1,369
    Level
    8

    pwm circuit schematics

    Dear IanP,
    For the circuit that u showed me last time, izzit usable for 3-9V dc motor? the current for the motor is arround 0.5A only when no load... so will IRF530 and IRF9530 still applicable? Can I straight away connect pin A and B to microcontroller or I need a driver between microcontroller and both pin A and B? thanks!!happy new year!!



  17. #17
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    pulse width modulation schematic

    For the circuit that u showed me last time, izzit usable for 3-9V dc motor? the current for the motor is arround 0.5A only when no load... so will IRF530 and IRF9530 still applicable? Can I straight away connect pin A and B to microcontroller or I need a driver between microcontroller and both pin A and B? thanks!!happy new year!!
    I don't know of any microcontroller that can sink or source substantial currents; usually these currents are below 20mA per pin ..
    From that point of view you need a driver ..
    The proposed IRF MOSFETS are ovesized for 0.5A motor, but because most of availble MOSFETs are in TO220 package, you will not save much room and/or money ..

    Happy New Year to you too ...
    Regards,
    IanP


    1 members found this post helpful.

  18. #18
    Newbie level 4
    Points: 1,432, Level: 8

    Join Date
    Jan 2005
    Posts
    5
    Helped
    0 / 0
    Points
    1,432
    Level
    8

    n channel mosfet pwm circuits

    what should i know when buying a dc motor so that i can choose the suitable MOSFETs? power rating or current rating? let say current rating, my MOSFET current rating must be at least the current rating of the motor right? please guide



  19. #19
    Newbie level 3
    Points: 715, Level: 5

    Join Date
    Jan 2009
    Posts
    3
    Helped
    0 / 0
    Points
    715
    Level
    5

    pwm generator shema

    hi
    I'm using a 12v,80w,7A current rating dc motor.
    Can anyone sugget a H-bridge circuit for the same.
    What should be the mosfet current ratings if we use the schematic shown above.
    Thank you



+ Post New Thread
Please login