Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hi,Hello,
Can anyone guide me on how to drive two six volt DC motors using pic18f452? I know that it is possible to drive the motors using L293d. However, it is not clear to me how to control the speed of the motors? Can anyone please help?
Thanks in advance!
PWM? Ok. How do I do that? According to the motor driver circuit. I have to connect 4 pins of the L293D to the pic. I dont have a clue on how to modulate the pulse width..can anyone please help?
PWM? Ok. How do I do that? According to the motor driver circuit. I have to connect 4 pins of the L293D to the pic. I dont have a clue on how to modulate the pulse width..can anyone please help?
hi,
I have used pwms before to drive a 24V DC brushless motor . But that motor had specific pin for the CCP1 pin on the PIC.So knew how to connect them. A L293 D however seems a little diffrent ...and i really dont know how to connect the CCP1 pin..any ideas?
hi,
Yes I had a look at the datasheet. You are saying that the CCP pins should be connected to 1A/3A and 2A/4A? But this pins are used for motor direction control and not speed control right?
The PWM rate on these pins control the motor speed.
enable 1A 2A Function
H L H turn right
H H L turn left
H L L fast motor stop
H H H fastmotor stop.
This is the table from the datasheet.
So i guess the CCP pins should be connected to the enable pin? Am i right?And I can use and inverter for 2A and use only one PIC pin for each motor..right?
Please correct me if I am wrong. Cheers mate!
hi,
I am suggesting the use of the Enable pins on the Bridge to select the motor which gets the PWM signals.
EDIT:
Select motor? ..err..now I am really confused ...can you tell me which pins are supposed to be connected where more clearly..pls?
These are the pins:
PIC L293D
CCP1 ?
CCP2 ?
? enable
Thanks for the help again.Mate
hi,
I was thinking of connecting the directional pins on L 293 d to PIC pins and connecting CCP1 to left motor enable and CCP2 to right motor enable. That way,I can use one particular CCP pin for one motor. I think by connecting the CCP pins which generate PWM to the enable I could still control the motor speed. Because, I works like turning the motor on and off very fast which regulates the speed, which depends on the duty cycle...right???
Its how long the ON period is, thats Pulse Width Modulation, that is the duty cycle of the pulse going to the motor.I works like turning the motor on and off very fast which regulates the speed, which depends on the duty cycle...right???