L298N motor driver ground connection with arduino

Hello, I'm working on a project where I have to run a 5V dc motor using an L298N motor driver with Arduino. In this project, I've used two different power supplies. One is for Arduino nano which is a 5V adapter another one is for the motor driver which is a 9V adapter (this 9V adapter provides almost 840 mA current). Now, my question is do I need to connect the ground of the motor driver with the Arduino ground? I have provided the connection that I have made.


Well, my motor is not working that's why I'm asking this question. I'm a little bit nervous that if I connected both common grounds, my circuit might blast. So,please give me some suggestions about it.

No, don't connect motor GND to nano GND.

If You would post a real schematic instead of this picture it might show the reason for the error.
What are the three wires, red, green and yellow, between the L298N and the nano?
Schematics provide pin designations!

You have to connect the grounds. It will not work otherwise. By that I mean the 9V ground and the 5V ground. I do not mean connect either of the motor wires to ground. Disconnect both power supplies before you attach a ground wire between the driver board and the Nano (you should never make any changes to a circuit with the power supply or battery connected).

You can also power the Nano from the 5V and GND terminals on the motor driver, assuming you actually have a motor driver like the one shown in your diagram.

1 Like

Really? Usually the receiver parts of drivers need 5 volt into them.

Yes, you are correct. I forgot to say this: you can use the 5V terminal to power the Nano, because these boards normally contain a voltage regulator. To enable this, you need to make a link on the motor board. It is only safe do to this is the motor power supply is between about 6.5 and 12V.

https://www.google.com/amp/s/lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/amp/

@ PaulRB
Thanks for the lesson!
I've seen members assuming 5 volt production from boards consuming 5 volt. Now I know this board and will not cut heads...

I don't know what that means!

L298N-Motor-Driver-Module-5V-Jumper-Power-Supply-Pins-Regulator

Yes, I saw that regulator!
Try again: "not cut heads off of ignorant members" not reading datasheets, specs, manuals...

Electricity flows in a loop called a circuit, so you send a signal from Arduino to the drive, that's half the circuit. How does that signal flow through a circuit and back to Arduino? Connect Arduino's GND terminal to the driver's GND. That's the other half of the signal circuit.

1 Like

Exactly. Schematics show that immediately....

Thank you very much. I've connected both grounds and my motors worked properly. Thanks a lot to all of you.