1

Completely new to this stuff. For context, I am trying to connect 3 DC motors that probably are 12v. I haven't bought them yet, they will definitely be more than 5v. I want to be able to control all three motors from my pi.

In my head, I am thinking it would go like this. I will need three L298N's, one for each motor. I understand how you can use those motor drive controllers to power and interact with the motor from the pi but I am not understanding how I can use one single power source for all three motors. I want to use the micro usb to power the pi and a single power source for the motors.

Essentially, I need to power three 5v+ motors and control them each directionally from my pi. Would using three motor drivers be the way to do this? How can I power them all from one source?

Thank you for any insight at all, I appreciate it more than you know

1 Answer 1

1

The L298N can control two DC motors so you only need two L298N to drive your three motors.

The L298N motor driver module will have screw terminals for the +ve and -ve for the motor power supply. Connect the +ve to the +ve of your 12V power supply and the -ve to the -ve (ground) of your 12V power supply.

You connect the L298N control signals (usually marked IN1, IN2, IN3, IN4) to spare Pi GPIO.

The only other thing you need to do is connect a Pi ground to each L298N motor driver module -ve screw terminal (the same as you connected the 12V power supply ground to).

2
  • Ok so that all makes sense but I think I am missing something... how does the power supply connect to both motor drivers? I know you mentioned +ve and -ve from power supply to motor controller but where would the connection of power to both motor drivers come in? Should the power supply have a total of 4 cables? 2 cables to one controller and two cables to the other controller? Feb 17, 2022 at 18:52
  • 1
    That's just a case of splicing/joining cables. You could even daisy chain the leads. E.g. positive PSU lead to motor driver 1 then another wire from there to motor driver 2. I'd probably feed the wires into one end of a terminal block and then connect multiple wires to the other end.
    – joan
    Feb 17, 2022 at 20:44

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.