DC motor controll using a PIC Microcontroller

Status
Not open for further replies.

kad_911

Member level 2
Joined
Nov 15, 2009
Messages
52
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Location
earth
Activity points
1,623
PIC controlled motor

Im using a PIC16F877A to control a 12V DC Motor.
How can i controll the speed of the motor?

I know how to use pwm but how can i apply that here because the output of the PIC is 5V but i want the motor to run at 12V max...
 

Hi,
You can use a MOSFET like IanP showed, or you can use a BJT, but for MOSFET, a logic-level MOSFET, eg, IRL3303, should be used if you drive the MOSFET directly from the microcontroller. If you use a power MOSFET, eg IRF3205 you should use a MOSFET gate driver, like TC428, IR2110, etc.

Hope this helps.
Tahmid.
 

can u be more specific? like how the PIC comes in and how to control speed?
 

Hi,
You have some frequency, eg, 1kHz and you have a variable duty cycle (on time). You have time period of 1ms. So 50% duty cycle (50% on time) = 500us = 50% motor speed.
You can have a variable resistor or switches that set your speed accordingly, by changing the duty cycle.

The output PWM from the PIC goes to a driver and then MOSFET which controls the motor.

Hope this helps.
Tahmid.

Added after 5 minutes:

Take a look at this:


Hope this helps.
Tahmid.
 

    kad_911

    Points: 2
    Helpful Answer Positive Rating
thanx.. but what i dont understand is,
The output PWM from the PIC goes to a driver and then MOSFET which controls the motor.

what is a motor driver?
 

MOSFET is the motor driver ..
MOSFET’s gate is directly driven by your PIC, and that’s how you implement pulse-width-modulation ..
Just look at the drawing:
mosfet and motor2.gif

IanP
:idea:
 


PIC (PWM) ----> MOSFET Gate Driver --------> MOSFET Motor Driver -------> DC MOTOR
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…