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 Help with Arduino UNO powering 2 3V DC motors via L298N motor Bridge
  • 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
  • State Not Answered
  • Replies 3 replies
  • Subscribers 392 subscribers
  • Views 1088 views
  • Users 0 members are here
  • dc motor
  • motor shield
  • arduino uno
  • l298
  • l298hn
  • electronics.
Related

Help with Arduino UNO powering 2 3V DC motors via L298N motor Bridge

marcuso
marcuso over 9 years ago

Hi,

 

I have an Arduino Uno, and I want to connect up 2x 3v DC motors. So I got hold of a motor bridge,

the cheap and cheerful L298N.

 

I read up on everything, connected it all together, and couldn't get the motors to turn at anywhere

near the same rate. So I then bought a kit for another L298 based circuit, built this one myself,

replaced the motors, swapped the Uno and lo and behold the exact same problem.

 

Can anyone help me please ?

 

Problem

-------

One motor turns fine, in both directions (when I swap the high and lo) and with varying speeds

(using a PWM pin from the Arduino - connected to ENB on the L298N). The other motor, will not

change direction, runs at a constant speed (super slow), and has much less power.

 

My setup

--------

I have software I have written (I am a software engineer), it sends HIGH to pin 0, and LOW to

pin 1 on the arduino for forward, and the opposite for reverse (and I use the PWM pin for speed 0-255).

Then I do the same for motor B (on the other pins). So the software is really simple (and works when I

just send signals to one motor at a time). All the pins are set to output etc.

 

 

The arudino is connected to the L298N like this

 

Arduino Pin        L298N

0            IN1 - motor A pin in

1            IN2 - motor A second pin in

2            IN3 - motor B pin in

3            IN4 - motor B second pin in

 

DONT USE 4 as its not PWM

 

5            ENA - enable motor A - used for speed 0-255 from firmware

6            ENB - enable motor B - used for speed 0-255 from firmware

 

NOTE I also have the ground from the Arduino connected to the Ground pin on the L298N. And I have

the following on the L298N :

 

L298N

MOT A PIN 1 - Motor A

MOT A PIN 2 - Motor A

 

MOT B PIN 1 - Motor B

MOT B PIN 2 - Motor B

 

The L298N has a jumper, this is set to tell it that its using the same voltage as the motors, there is

another mode that makes it think the power for the motors is seperate from its own power (and thus the

built-in regulator is turned off). Again I have it in the first setting (telling it to share power with

the motors).

 

Power Supply

The first time I tried all this was connecting both the arduino and the L298N to seperate USB connectors on

my PC (stripped the cables to give 5v).

 

The second time I put the L298N (and Motor power) on a 5V mobile phone battery pack, then Arduino on USB

from the PC again.

 

The thrid time I put both the Arduino and the L298N (and motors) on the same USB 5v battery pack, then I

tried to split things again so one 5v battery to the Arduino and the other to the L298N (and motors).

 

So any ideas on all this ? Thanks.

  • Sign in to reply
  • Cancel

Top Replies

  • gihu
    gihu over 9 years ago +1
    Hi Marcus, Imho,I think that you cannot drive directly 3V motors with the L298N. See the datasheet of the driver: https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf And a picture of schematic…
  • marcuso
    marcuso over 9 years ago in reply to gihu +1
    Hi gihu, Thanks for taking the time to take a look for me, I really appreciate it. Bizarrely at 2am (yes it;s one of those projects !), I swapped the pins supplying the signal from the Arduino to the L298N…
Parents
  • gihu
    0 gihu over 9 years ago

    Hi Marcus,

     

    Imho,I think that you cannot drive directly 3V motors with the L298N.

    See the datasheet of the driver:

    https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf

    And a picture of schematic of one os this kind of modules:

    image

    taken from Tutorial de Uso del Módulo L298N

     

    Considering the datasheet indication VSmin should be at least VIN+2.5V, and a 5V voltage in the arduino output, you need 7.5V (min) to make it work properly, then you will need to use other DC motor with a higher voltage.

     

    Sorry for not being more helpful image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • gihu
    0 gihu over 9 years ago

    Hi Marcus,

     

    Imho,I think that you cannot drive directly 3V motors with the L298N.

    See the datasheet of the driver:

    https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf

    And a picture of schematic of one os this kind of modules:

    image

    taken from Tutorial de Uso del Módulo L298N

     

    Considering the datasheet indication VSmin should be at least VIN+2.5V, and a 5V voltage in the arduino output, you need 7.5V (min) to make it work properly, then you will need to use other DC motor with a higher voltage.

     

    Sorry for not being more helpful image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • marcuso
    0 marcuso over 9 years ago in reply to gihu

    Hi gihu,

     

    Thanks for taking the time to take a look for me, I really appreciate it. Bizarrely at 2am (yes it;s one of those projects !), I swapped the pins supplying the signal from the Arduino to the L298N for motor 1 (the problem motor IN1 and IN2), and it worked ! However only for about 30 seconds then BOTH the 5v mobile phone charger batteries, supplying the both the L298N (and motors) - battery 1, and the Arduino  - Battery 2 on the robot turned off. So I think you are dead right, my voltages are too low for the bridge and if I upped them it would be too high for the motors. I am going to try 6v motors with a 11.1 volt supply. I guess this is what happens when you are starting out and have no experience, you think you can get away with stuff, only to find out it will cost you many hours, and the final answer will always be the same...no you can't change the laws of physics !!

     

    Marcus

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gihu
    0 gihu over 9 years ago in reply to marcuso

    Hi Marcus,

     

    I think your DC motors should work at the power supply you use, I mean that if you use 12V DC motor, you must supply the L298N with 12VDC. If need help about connection, please ask.

     

    Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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