How can use a separate power source for powering Arduino, and another battery for powering the motors?
How can I make connections through the motor driver module L298N? I know how normally we use one battery to power the Arduino as well as the motors. But I am facing the problem while using different power sources.
-
make sure all ground pins are connected together. And please edit your answer and insert a photo of your setup so others can spot your problem– bb1950328Oct 21, 2020 at 16:54
-
I added the Image and want to know how the pins are connected when separate power source are used– Amit NikhadeOct 21, 2020 at 17:04
-
please edit the image so it's clearly visible which cable goes to which terminal, especially on the arduino and the L298 module– bb1950328Oct 21, 2020 at 17:06
-
That's what I want to know– Amit NikhadeOct 21, 2020 at 17:07
-
seems correctly connected ... two control signals and ground connected between the arduino and the motor driver– jsotolaOct 21, 2020 at 17:34
1 Answer
That motor driver has an optional on-board 5V regulator. It can be enabled / disabled with a jumper.
With that regulator enabled you just need to connect a ground and your control signals (ENA/IN1/IN2 or ENB/IN3/IN4).
If you disable that regulator (remove the jumper) then you need to provide power from the Arduino's 5V pin to the +5V screw terminal.
The ENx pin(s) (after removing any jumpers that may be on them) connect to any PWM capable pin (this is the speed control pin). IN1/IN2 or IN3/IN4 connect to any IO pin since these are just used to set the direction or control the braking modes. ENA controls the speed of motor 1, and IN1/IN2 control the direction of motor 1. ENB and IN3/IN4 are likewise for motor 2.
-
You mean to say that do not remove the jumper of the 5v regulator and then connect the ENA/IN1/IN2 And It's ready. Oct 22, 2020 at 8:58
-
-
-
-
So I will be able to power the arduino with a separate battery or through USB. And what about the motor driver connections with the other battery for motors. Oct 22, 2020 at 9:06