Asked — Edited

Back Again With The L289n Question

I am back again with the same problem with the motor driver. First, I have been experimenting for the past 3 weeks! without sucess! I have watched the L289N tutorial at least 2 dozen times. With out sucess. I really need some assistance here!!!! I have a lot of time and money invested in my robots. I think it is a reasonable expectation to have them operate correctly!!

I have exactly the same problem with "Gizmo" and "Servo" (Servo is a Radio Shack Robie Sr.)

  1. The robots will move forward and reverse as they should; but left and right are reversed!

  2. I assume that the H-bridge control is read as; top arrow is forward; bottom arrow is reverse; right arrow is right; and left arrow is left. Have I assumed correctly?

  3. The configuration I started out with is as follows: IN1 to D18 IN2 to D17 IN3 to D16 In4 to D15 PWM to D19

Since then I have tried every configuration possible. ie; changing around all of the triggers, one at a time. I've tried reversing the motor output leads from side to side and reversing the motor leads at the screw terminals. Believe me when I say I have tried every configuration!!!!! I find it difficult to believe that I have gotten 3 of the motor drivers that are bad. What are the chances of that??????? Since I have the same problem on both of my bots leads me to believe that I am making the same error on both! So, I"m asking for some help here! I have 2 robots sitting here that I can't proceed with until I get this problem resolved. I would REALLY appreciate any help in resolving the problem. I'd be so very dissappointed if I had to just let my projects sit on a shelf unused. As I always do; I thank anyone in advance for any assistance.


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#9  

Your right, his new video (I just watched it) does show it like that (though his diagram at synthiam.com/Tutorials/Hardware.aspx?id=25 shows it the correct way). But it's still a bad practice to propagate. Sure it works fine with small batteries & motor (like the AA batteries & little motor DJ used in that video), there's not allot of current flow.

Now imagen using big SLA batteries & motors that draw the L298N's max, 2.5A each Now your running 5A across the EZ-B ground plane & input connector, then add 4 amps in servos running off the EZ-B, now your running 9A through that ground plane / connector.

Now move up to a worse scenario, a 10A per channel (30A momentary) H-Bridge (like Josh has on Jarvis) with some scooter or windshield wiper motors that draw say 5A driving / 20A stalled) + servos... Now your running 14A through that Ground plane / connector, but wait it'll get worse if your Bot runs into something & stalls the motors, now your tryin to run 44amps through that ground plane.

That's what I mean by bad practice. While it may work (with lil motors), it's not proper DC wiring & could cause someone to kill their EZ-B (or worse, start a fire) if they upgrade to a bigger bot / motors / H-bridge without understanding how current works.

Canada
#10  

I hear ya.

So where would your ground the 5V feed? In the schematic drawing it doesn't show a ground from the EZ-B to H Bridge for the 5V side.

#11  

OK. Here are some pics of my hook up. Hope they are clear enough to see everything. I have put my battery ground back on the L289N. I did try the hook up Lumpy suggested and it made no difference. Still have the same problem.

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

User-inserted image

#12  

The ground is the same everywhere on the EZ-B (& should be everywhere on your Bot), meaning the ground at input connector is the same as every ground pin. Connecting both the motor controller & EZ-B's power input ground together at the power source does the job.

Sometimes connecting a ground from an EZ-B gnd pin to the motor controller, in addition to power grounds, can help clean up a signal issue to the motor controller, but can also cause a ground loop, so try it without first. Also, some motor controllers have separate inputs for motor ground & logic ground.

Also, be sure the L298N's lil white button is OFF, which disconnects the L298N's onboard 5V voltage regulator, since the EZ-B is providing the 5V. My L298N acts erratic if that button is on & the 2 5V regulators are interacting.

#13  

Please try this: In your H-Bridge Configuration: Left trigger A = D4 Left trigger B = D3 Right trigger A = D2 Right trigger B = D1

That's what fixed my same issue & it's what DJ means by "Your configuration needs to be reversed".

#14  

@ ndavid79: I'd like to also thank you for your input. Believe me. I sincerely appreciate any help from community members. I will try reversing the configuration. Another thought. The motors should run in either direction, however, I have tried reversing them and it had no apparent effect on the problem. I've also tried every H-Bridge configuration i.e. D1, D2, D3, D4 as I could, hoping to find the problem. Could it end up being some weird configuration such as D4, D1, D3, D2??????? A quick reality check. How many possible configurations could 4 wires contain??? I would think it would be 4 squared, or 16 possible configurations. Input please. Again thank you. I will be watching this thread for more suggestions.

#15  

Based on you bots behavior, forward & backward being correct but turning being reversed, a straight reversal of the pins in the settings like I suggest should correct it.

If everything or just one motor was reversed, an odd combination would be required.

Canada
#16  

Robotz,

I also found that disconnecting and reconnecting whenever I make a setting change helps. That was what happened when I was having issues.

Now I just reconnect, pop the PWM slider to ON (full up) and away she goes.

Ndavid79,

Which is on? Which is off? I'm guessing down is off? No documentation came with this little bugger.

"Also, be sure the L298N's lil white button is OFF, which disconnects the L298N's onboard 5V voltage regulator, since the EZ-B is providing the 5V. My L298N acts erratic if that button is on & the 2 5V regulators are interacting."