3

I have a 6V motor attached to a HiLetgo Module L298N Dual H Bridge and controlled via two Raspberry Pi 3B GPIO pins (current just using HIGH & LOW).

If I use a 5V power supply from my Raspberry USB port it works perfectly.

If I attempt to power the L298N from 4 x AA batteries it doesn't (the batteries are new duracell AAs).

The power L298N LED is on but the motor does not move when I set the GPIO pins (one HIGH, one LOW).

If I connect the 4 x AA batteries directly to the motor it works.

The voltage from the batteries are reading about 5.87V and a constant current of 55mA. The USB is showing about 4.8V and a current of 44mA when idle and about 65mA when the mottor is running.

The L298N bridge has 5V terminal and a 12V terminal (same results with both)

Will the L298N ONLY work with these voltages? (the description on Amazon says it works up to 46V so I assume not).

I was hoping to eventually run 4 motors via 2 L298N bridges using PWM via a PCA9685, ideally all motors powered from 4 AA batteries, but so far I can't get 1 motor to work.

Can anyone suggest a reason why the 4 x AA batteries don't work via a L298N bridge or another way to power my motors?

8
  • 6
    Check the battery output under load. Also make sure the battery/L298N ground (or "-") and the Raspberry ground are connected.
    – BobT
    Commented Jul 28, 2018 at 15:36
  • 3
    The likely problem is you haven't connected the battery ground to a Pi ground.
    – joan
    Commented Jul 28, 2018 at 15:59
  • 1
    AHA! Thank you BobT, I didn't have a shared ground! Which is obvious, now you point it out, the GPIO pins need a ground back to the Raspberry Pi! It's working now! Commented Jul 28, 2018 at 16:04
  • 1
    Can you please make an answer to finish this question?
    – Ingo
    Commented Jul 28, 2018 at 16:17
  • Note for future reference (if I read the question correctly...) - please don't try to power motors through the Pi itself, always use some form of external power!! (fine for test LEDs sort of though :-)
    – Wilf
    Commented Jul 28, 2018 at 22:28

2 Answers 2

7

The problem was that there was no ground between the L298N and the Raspberry Pi. By wiring the Ground (-'ve) terminal on the L298N to a ground pin on the Raspberry (as well as the batteries) it then worked.

2

On another (related) note - I see from the spec sheet that the module's power supply (not the motor supply) should be 6.5-12v... and you're powering it with 4xAA batteries, which is fine when they are fresh, since new, quality batteries output closer to 1.7v (around 6.8v total); but in THEORY, you're running a 6.5v device with a 6v battery pack...

Your module may start working erratically (or not at all) once those batteries wear down just a bit and the voltage drops. You should consider beefing up your battery pack, for more reliable performance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.