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 =)
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 =)
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.
can u suggest/show me more detail or perhaps example regarding this matter? sorry, this is my first time using microcontroller... thanks!!
it is an example:
http://ww1.microchip.com/downloads/e...tes/30450c.pdf
i send you more later.
ok... thanks alot!! how nice of u...=)
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
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
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
see also:
http://www.atmel.com/products/avr/mc/
http://www.microchip.com/stellent/id...0&filterID=421
and one simple project with 16f84
http://www.willcoxonline.com/Curtain/PICcontrol.html
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!!
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
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! =)
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
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!! =)
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) ..
This is a quotation from an article on the H-Bridge from one of the previous posts ..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.
Here is the rest:
http://www-isl.ece.arizona.edu/~socc...dge_Theory.pdf
Regards,
IanP
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!!
I don't know of any microcontroller that can sink or source substantial currents; usually these currents are below 20mA per pin ..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!!
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
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
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