0

I am trying to drive a 6v dc motor with L293D driver and Atmega8 without PWM. The problem is i am getting very low speed while connecting the motor with L293D driver. But, it rotates well when i provide direct 6V dc supply to the motor. I am using external 6v source at V2(motor supply) pin of L293D, but no improvement. The motor does not rotate until i turn the rotor with hand. Is the problem remaining for not using PWM? My code is here:

 DDRB = 0xFF;


while(1)
{

    PORTB = 0B00000010;
    _delay_ms(20000);

}
Nafees
  • 13
  • 1
  • 1
  • 6
  • 1
    This question appears to be off-topic because it is about electrical engineering. Try http://electronics.stackexchange.com/questions instead. – starblue Oct 05 '13 at 17:40
  • PWM is not the issue, and you can take the writing to portB out of the loop and remove the delay. It is probably wiring. You do have both Vcc1 and Vcc2 tied to the 6V battery, right? Only one is not enough. – UncleO Oct 07 '13 at 06:37

1 Answers1

0

i think may be you forgot to make Enable 1 pin high, if your connections is like this than

PB0 --> IN1 Penter code hereenter code here`B1 --> IN2 PB3 --> EN1

and pin 8 of L293d will connected with External Battery.

than code like this :

 DDRB = 0xFF;
   while(1) {
   PORTB = 0B00000110;
   _delay_ms(20000);
   }