Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: motor with l293d rotating slowly and jerking

  1. #1

    Default motor with l293d rotating slowly and jerking

    i am making a line follower.the whole circuit is done.i am using a comparator(lm324) a uc(atmega8l) and a motor driver(l293d).there are 4 white leds and 4 red leds and 4 pairs of ir sensors.the power source is a 12.6v 2000mAh(2C).to the driver i have connected two tiny motors.the specs of the motors are
    Working voltage : 3V to 9V
    4.2 Kgf.cm torque
    No-load current = 60 mA, Stall current = 700 mA
    i am giving a voltage of 8.6V to drive the motors from the same power source(it being multi cell)
    the motor is rotating very slowly and jerking and the all the leds are flickering on the board.but when the motor is connected to the battery it rotates properly.what could be the reason?

  2. #2
    Senior Member Android
    Join Date
    Apr 2010
    Location
    Boston, USA
    Posts
    133

    Default

    Please make the motor voltage source different from the source that is powering the uC. A simple 9V battery should be good enough for your uC.

  3. #3
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    The 293D will eat up some voltage, so the motor will run at a lower speed than when connected directly to the motor. The datasheet will have the exact ratings.
    There is a high chance that your uc is getting reset, when the motor starts to spin, stop to spin or changes direction. this is because of the current surges developed by the coil in the motor.
    I assume you have not connected any decoupling capacitors. connect a .1uf disk cap from VCC to GND whereever possible, close to the controller pins. That will do the trick. also connect a.22uf cap across the motor terminals.
    That should do it, if your code is right, and I also assume you your code is running inside an infinite loop. (which does not meet the END statement.)
    .... I didnt do it ! ....

  4. #4
    Administrator T-1000 vikas's Avatar
    Join Date
    Feb 2004
    Location
    Delhi
    Posts
    1,922
    Blog Entries
    14

    Default

    1. Put decoupling cap's
    2. Test motors and l29d without microcontroller connected ( Do they behave as expected ? )
    3. When robot is on connected check current and voltage ( some number might be helpful )
    4. If possible post pic , code and schematic.

    Either is a decopling issue , or your motors are causing voltage drop and uC reset .
    Vikas Patial

  5. #5

    Default still no success

    I had connected two different power sources .The motor was only slightly faster but it was still jerking and the LEDs were still flickering . Then I connected 1N4007 diodes between the mircocontroller output pins and the the motor driver input pins . After this the LEDs were not flickering . The motors were also not moving(not even a bit) . On checking the voltages at all the pins of l293d motor driver without the motors connected this is what they read.
    microcontroller output pin voltages:
    0v,5v,5v,0v
    motor driver input pin voltages:
    1.6v,4.6v,4.6v,1.6v
    motor driver output pin voltages:
    8.6v,8.6v,8.6v,8.6v
    I am not able to understand that when the uc is giving out 0 Volts on the pin how is the motor driver getting 1.6 Volts ?And how is the motor driver showing the same voltage on all four output pins ?Has this got anything to do with the diodes? I have even connected 1.0uF capacitors between Vcc and Gnd wherever possbile.

  6. #6
    Super Moderator T-1000 docel's Avatar
    Join Date
    Sep 2005
    Location
    BANGALORE
    Posts
    1,441
    Blog Entries
    3

    Default

    Instead of so many words and posts, why don't you post a drawing of your circuits?
    http://www.roboticsindia.com/showthr...-l293d-trouble

    1. We still don't know if your code is correct or not. Most beginners in microcontrollers write some weird PWM routines that expect the motors to switch on and off 20times /sec and the on time @ 1/20 of the off time. All it will do is 'jerk' ofcourse !
    2. It is not clear whether you have used a 5v regulator.
    3. how is the En pins connected?
    4. Have you grounded both the Battery -ves together?
    5. Are ALL the -ve pins connected together ?
    6. White red and IR combo may not always work- assuming you're using white as indicators, Red as Source for the IR sensors. Just because someone told you or used Red LEDs with IR sensors does not mean it will work with YOUR sensors.
    7. How do you know the LM324 is not oscillating?
    8. You may be working under a Tube light and it is getting into the sensors, so switching the motors 50times /sec. ( apart from your PWM routine)
    9. you might have connected 5v to pin8 & 12v or 8.6 to pin16.
    10. The Opamp may not have oh! wait !!!
    Are you using the LM324 as a Comparator or an Op-Amp ?
    Ooof... am out of breath... but there are even more questions - maybe i'll wait for your response before I ask....

    Instead, why not be a good boy and post the circuit diagram ?
    Last edited by docel; 08-18-2010 at 01:39 AM.
    docel
    ^Anything is possible..
    after YOU prove it!!

    http://bangalorerobotics.tripod.com

  7. #7

    Question schematic.

    Sorry sir .But this is my first schematic .And the black rectangle is actually the ISP port which consists of 6 pins .When i made the diagram monochrome it turned out like this .There is a 5 volt regulator (IC7805) in the circuit but i did not draw it because it was getting complex .Wherever there is +5v written it is coming from the 7805 regulator .But I have no idea where to put capacitors in the circuit .I have just put two 0.1uF capacitors between the Vcc and the Gnd wherver possible close the MCU and those are the only places in the entire circuit i have put capacitors .As i told youll it is fairly accurate .Dont think i have not drawn something .If its not there here its not there in the circuit board also .The only things missing here are the power source and the 7805 regulator .There are no capacitors even across the regulator .Can you guys give me an idea of where all to install these capacitors ?Where else do i put these bypass capacitors ?I couldnt find the LM324 comparator in the library so i had two use these four op amps to give youll an idea .So please bear with me and try to help me out.
    Attached Images Attached Images

  8. #8
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    i am not sure if i am getting old, or if the circuit diagram is actually small. cant read a thing.post a bigger one.
    And you dont have to convert to monochrome!!
    .... I didnt do it ! ....

  9. #9
    Super Moderator T-1000 docel's Avatar
    Join Date
    Sep 2005
    Location
    BANGALORE
    Posts
    1,441
    Blog Entries
    3

    Default

    Yes Allbits !! Had to pull out my Lens do some extensive photoshopping

    007roy :

    1. Disconnect the indicator LEDs from the points at the Microcontroller.
    2. Remove the series diodes between the Micro to the L293d inputs and connect directly.
    3. connect a 12v battery to Pin8.
    4. Check it out .
    5. take a video of the entire thing when powered up and post.
    6. Post the program
    docel
    ^Anything is possible..
    after YOU prove it!!

    http://bangalorerobotics.tripod.com

  10. #10

    Default

    Sir .I accept i have bitten more than i can chew .But once i am in between a project i wont quit no matter what .So i disconnected the LEDs and the diodes from the microcontroller output .I individually tested the motordriver and even before i connected the motors i noticed that even if i give only high(5 volts) input out of the four inputs of the motor driver all the four outputs were reading 12 volts.What could be the reason for this ?Does this mean that the motor drivers are fried ?Yet to connect the capacitors youll suggested.Will try with a new motor driver tomorrow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •