2

I'm using a pi 4 for a rover I want to build and I have 2 L298N drivers. I connected them using a breadboard to my pi so I don't need that much GPIO pins but only one pair of motors is working and when I unplug the driver that works the second pair of motors on the second driver are working. can u pls help me, I already double triple quadruple whatever checked my cables and connections but I can't find the error isn't there enough power output?How my setup works here u can see how I wired up all my cables.

tlfong01
  • 4,384
  • 3
  • 9
  • 23
Fabian
  • 29
  • 1
  • If they each work separately that would strongly suggest a lack of power. – joan Oct 07 '19 at 19:57
  • Do you need to drive all 4 motors independently? If not you can use 1 L298N driver board to control 2 left motors (wired in parallel) and 2 right motors wired in parallel. – CoderMike Oct 07 '19 at 21:55
  • You can use a multi-meter to check your battery power bank output. If (1) no motor running is 4.5V, (2) one battery is 3.0V, (3) two batteries is 2.0V, then it means your battery is too weak to drive two motors. If you don't have a multi-meter, you can DIY a LED based battery status indicator as follows: (a) connect a LED to series resistor, then connect one end of resistor to one end of battery power bank output, and one end of LED to the other end of battery power. Now you can test your L298N driver again. If for 0M, 1M, 2M LED shows Very Bright, NVB, NB, then time to buy new batteries. – tlfong01 Oct 08 '19 at 01:37

1 Answers1

-1

Question

The following two configurations work only one at a time:

(1) L298N Driver 1 (D1) works with motor pair (M1a + M1b).

(2) Similarly, D2 works with M2a + M2b.


Answer

There are a couple of possibilities, including:

(a) Motor power too weak. The 5V power from Rpi4B's 40 pin connector (pins 2, 4) might have a problem driving 4 motors. You might consider using an external power source, like a LiPo power bank (See Ref 2).

L298n and power bank

/to continue, ...


References

(1) Rpi L298N DC Motor Driver Problem

(2) Rpi L298N DC Motor Driver Code and LiPo Power Bank Example

(3) Rpi L298N Wiring, Troubleshooting, and Example Python Program

/ to continue, ...

Appendices

Appendix A - How to check if batteries run out

You can use a multi-meter to check your battery power bank output.

For example, if (1) no motor running is 4.5V, (2) one battery is 3.0V, (3) two batteries is 2.0V, then it means your battery is too weak to drive two motors.

If you don't have a multi-meter, you can DIY a LED based battery status indicator as follows:

Connect a LED to series resistor, then connect one end of resistor to one end of battery power bank output, and one end of LED to the other end of battery power.

Now you can test your L298N driver again. If no motors, LED is bright, two motors LED is dim, 4 motors LED is very dim, then it is time to buy new batteries.


tlfong01
  • 4,384
  • 3
  • 9
  • 23