element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum L293D+Arduino+DC motors setup won't deliver enough power to wheels
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 18 replies
  • Subscribers 393 subscribers
  • Views 3225 views
  • Users 0 members are here
  • dc motor
  • step-down regulator
  • l293d
  • servo
  • lipo
  • arduino
Related

L293D+Arduino+DC motors setup won't deliver enough power to wheels

roineust
roineust over 8 years ago

Hello,

i'm not getting enough power to the driving wheels on the setup described in the following diagram.

i'v done very similar cuircuits in the past with the exact same components and the driving force from DC motors was much stronger. Can't seem to find what i'm doing wrong..

The DC motors used are these: https://www.pololu.com/product/2215

image

 

Here is the code used:

 

#include <Servo.h>

 

 

#define E 5  // Enable Pin for all motors

 

#define drive_up_left_wheel1 6  // Control pin 1 for motor 1

#define drive_up_left_wheel2 7  // Control pin 2 for motor 1

#define drive_up_right_wheel1 8  // Control pin 1 for motor 2

#define drive_up_right_wheel2 9  // Control pin 2 for motor 2

#define drive_down_right_wheel1 10  // Control pin 1 for motor 3

#define drive_down_right_wheel2 11  // Control pin 2 for motor 3

#define drive_down_left_wheel1 12  // Control pin 1 for motor 4

#define drive_down_left_wheel2 13  // Control pin 2 for motor 4

 

Servo steer_up_left_wheel;

Servo steer_up_right_wheel;

Servo steer_down_right_wheel;

Servo steer_down_left_wheel;

 

void setup() {

 

     set_low_speed();  

 

    attach_steer_servos();

  

    steer_vertical();

  

    drive_down();

  

    delay(6500);

  

    drive_stop();

  

    delay(1000);

     

}

 

void loop() {  

  

    steer_horizontal();

  

    delay(1000);

  

    drive_left();

  

    delay(2500);

  

    drive_stop();

  

    steer_vertical();

  

    delay(1000);

  

    drive_up();

  

    delay(4000);

  

    drive_stop();

  

    steer_horizontal();

  

    delay(1000);

 

    drive_right();

  

    delay(2500);

  

    drive_stop();

  

    steer_vertical();

  

    delay(1000);

  

    drive_down();

  

    delay(3600);

  

    drive_stop(); 

  

}

 

 

void attach_steer_servos(){

 

    steer_up_left_wheel.attach(A1);

    steer_up_right_wheel.attach(A0);

    steer_down_right_wheel.attach(A2);

    steer_down_left_wheel.attach(A3);

  

} 

  

  

void steer_horizontal(){

     

    steer_up_left_wheel.write(48);

    steer_up_right_wheel.write(128);

    steer_down_right_wheel.write(32);

    steer_down_left_wheel.write(154); 

                

}

 

void steer_vertical(){

 

    steer_up_left_wheel.write(144);

    steer_up_right_wheel.write(35);

    steer_down_right_wheel.write(122);

    steer_down_left_wheel.write(66);

  

    delay(500);

                

}

 

void steer_sleight_right(){

     

    steer_up_left_wheel.write(52);

    steer_up_right_wheel.write(134);

    steer_down_right_wheel.write(25);

    steer_down_left_wheel.write(128); 

    

   }

 

void steer_sleight_left(){

     

    steer_up_left_wheel.write(52);

    steer_up_right_wheel.write(134);

    steer_down_right_wheel.write(25);

    steer_down_left_wheel.write(128); 

    

   }

  

void set_medium_high_speed(){

 

  analogWrite(E, 250); // Run in almost full speed

 

}

 

void set_medium_speed(){

 

  analogWrite(E, 195); // Run in half speed

 

}

 

void set_low_speed(){

 

  analogWrite(E, 30);  // Run in low speed

 

}

 

void drive_stop(){

              

    digitalWrite(drive_up_left_wheel1, LOW);

    digitalWrite(drive_up_left_wheel2, LOW);

    digitalWrite(drive_up_right_wheel1, LOW);

    digitalWrite(drive_up_right_wheel2, LOW);

    digitalWrite(drive_down_right_wheel1, LOW);

    digitalWrite(drive_down_right_wheel2, LOW);

    digitalWrite(drive_down_left_wheel1, LOW);

    digitalWrite(drive_down_left_wheel2, LOW);

    

    }  

 

void drive_right(){

  

       digitalWrite(drive_up_left_wheel1, LOW);

       digitalWrite(drive_up_left_wheel2, HIGH);

       digitalWrite(drive_up_right_wheel1, LOW);

       digitalWrite(drive_up_right_wheel2, HIGH);

       digitalWrite(drive_down_right_wheel1, LOW);

       digitalWrite(drive_down_right_wheel2, HIGH);

       digitalWrite(drive_down_left_wheel1, HIGH);

       digitalWrite(drive_down_left_wheel2, LOW);

   

    }

     

void drive_left (){

 

   digitalWrite(drive_up_left_wheel1, HIGH);

   digitalWrite(drive_up_left_wheel2, LOW);

   digitalWrite(drive_up_right_wheel1, HIGH);

   digitalWrite(drive_up_right_wheel2, LOW);

   digitalWrite(drive_down_right_wheel1, HIGH);

   digitalWrite(drive_down_right_wheel2, LOW);

   digitalWrite(drive_down_left_wheel1,LOW);

   digitalWrite(drive_down_left_wheel2, HIGH);

 

}

  

void drive_down (){

 

   digitalWrite(drive_up_left_wheel1, HIGH);

   digitalWrite(drive_up_left_wheel2, LOW);

   digitalWrite(drive_up_right_wheel1, LOW);

   digitalWrite(drive_up_right_wheel2, HIGH);

   digitalWrite(drive_down_right_wheel1, HIGH);

   digitalWrite(drive_down_right_wheel2, LOW);

   digitalWrite(drive_down_left_wheel1,HIGH);

   digitalWrite(drive_down_left_wheel2, LOW);

 

}

 

 

  void drive_up (){

  

   digitalWrite(drive_up_left_wheel1, LOW);

   digitalWrite(drive_up_left_wheel2, HIGH);

   digitalWrite(drive_up_right_wheel1, HIGH);

   digitalWrite(drive_up_right_wheel2, LOW);

   digitalWrite(drive_down_right_wheel1, LOW);

   digitalWrite(drive_down_right_wheel2, HIGH);

   digitalWrite(drive_down_left_wheel1,LOW);

   digitalWrite(drive_down_left_wheel2, HIGH);

 

}

 

 

Any ideas what could be the reason for that problem?

Thanks.

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 8 years ago +2
    Ensure you use heavy enough wire and connectors that can handle the current. Check the voltage getting to the motors and trace it back to the supply, making sure it is good at each intermediate node.
  • dougw
    dougw over 8 years ago in reply to roineust +2
    I can offer a theory, but it is just something I have thought about - I never tested it. In a normal DC motor torque goes up as speed goes down because the current increases as the back-emf goes down.…
  • jw0752
    jw0752 over 8 years ago in reply to roineust +2
    Hi Roi, Do you have flyback protection diodes across the motors. I have seen where the counter EMF if not eliminated can mess with the outputs of the drivers. John
Parents
  • dougw
    dougw over 8 years ago

    Ensure you use heavy enough wire and connectors that can handle the current.

    Check the voltage getting to the motors and trace it back to the supply, making sure it is good at each intermediate node.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • roineust
    roineust over 8 years ago in reply to dougw

    I'm getting 3.5V instead of 9V at the motors + and - while they are running. i'll be checking the intermediate points again soon, although i think i already did that and the only intermediate points are before and after the L293D and there i get 9V. The wires are about 1 meter long, but i think not too thin..they don't warm up, that is for sure..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • roineust
    roineust over 8 years ago in reply to dougw

    I'm getting 3.5V instead of 9V at the motors + and - while they are running. i'll be checking the intermediate points again soon, although i think i already did that and the only intermediate points are before and after the L293D and there i get 9V. The wires are about 1 meter long, but i think not too thin..they don't warm up, that is for sure..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube