Pages: [1]   Go Down
Author Topic: Arduino + h bridge l298n + dc motors, robot move a litle and then gets crazy  (Read 175 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello friends, newbie here! sorry about mi english.

I have a tipical configuration, Arduino + h bridge l298n + 2 dc motors

this is mi h bridge: http://www.haoyuelectronics.com/Attachment/L298N_module/1.jpg

pins 2,3,4,5 goto h bridge, 4 AA bateries alimentate the h bridge, and i put common ground betwen arduino and h bridge.

I controll all this, from serial monitor from arduino ide

MY PROBLEM: Robot works fine 3 seconds, and then serial communication gets lose, and motors move and move, and i have to restart arduino board to make them stop. This happends in every direction.

Thanks for your help
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12412
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could be interference from the motor circuitry being picked up by the Arduino, even
with separate supplies.

First with the L298 I believe you have to keep the motor voltage at least 5V or
else the Arduino power will be used to help drive the motor - in other words the L298 and
similar drivers have a diode between motor and logic supplies as part of their
construction.   Normally the motor supply would be a lot more than 5V and this wouldn't
show up, but with 4 AA's for the motor supply its close to the limit.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks MarkT, this you told gives me some clues to start debuggin, i forgot to say i alimentate arduino and h bridge separated
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5592
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also realize that the L298 drops a couple of volts from the supply - so your 4.8 - 6 volt supply (not sure what kind of batteries you are using) could be as low as 2.8 - 4 volts by the time it gets to the motors...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Pages: [1]   Go Up
Jump to: