0

I am powering 2 stepper motors with an L298N driver each (from a 9V 2A external power supply powered from the mains: https://www.amazon.co.uk/BERLS-Power-Adapter-Elegoo-Connectors/dp/B07GSM6YLX/ref=sr_1_5?ie=UTF8&qid=1550859082&sr=8-5&keywords=AC%2FDC+Power+Adapter+for+Arduino).

I am wondering how I can connect the driver 5V and GND pins to the power supply?

Thanks in advance!

2 Answers 2

0

You would not connect the +5V lead to the power supply. Connect the ground between the driver, the Arduino, and the power supply. Connect the 9V from the power supply to the driver. Connect the logic lines from the Arduino to the inputs on the driver.

4
  • Thanks Duncan for your advice. However, given that the external 9V DC adaptor is connected through the barrel jack to the Arduino Mega, how could i connect this to the driver directly? Similarly, how would the ground connect to this power supply adaptor?
    – Anonymous
    Commented Feb 23, 2019 at 1:49
  • If you're going to use the same power supply for both you should probably build a splitter out of a female power jack and 2 male cables. You'd connect one to the Arduino and the other to the motor driver. The Arduino would regulate the 9V down to 5V and the motor driver would use the 9V directly. They would have common grounds.
    – Duncan C
    Commented Feb 23, 2019 at 1:56
  • You might need to add a fairly large electrolytic capacitor between 9V and ground right near the barrel connector for the Arduino. This would serve to even out dips in voltage as the motor driver turns the motor coils on and off, and prevent the Arduino from dropping out. (That would really only be needed if the voltage to the Arduino's barrel connector drops below around 7V at peak current demand from the motor driver, and would likely only happen if your peak current gets close to the 2A limit of your power supply.)
    – Duncan C
    Commented Feb 23, 2019 at 1:59
  • i see many thanks for your advice ille take a look into that
    – Anonymous
    Commented Feb 23, 2019 at 16:50
0

You'll need another supply, or a step-down supply for the 5v; same ground for all.

Also H-bridges are really inefficient to drive steppers, you should get a dedicate stepper driver.

2
  • Thanks for your advice. How exactly would the step-down supply be connected from the power supply to the driver, given that the 9V DC adaptor is connected to the Arduino barrel jack?
    – Anonymous
    Commented Feb 23, 2019 at 1:53
  • @Anonymous well in that case you are actually using the arduino's voltage regulator, IIRC as long as your under the power budget you can power the driver boards logic from the 5v line of the Arduino, and connect 9v to both the Arduino and the motor in on the driver.
    – esoterik
    Commented Feb 23, 2019 at 3:05

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